[gtk/matthiasc/color-profile-rebased: 43/46] gsk: Fix a formatting mishap




commit e623007759fef1552e69e411cb73c0ac8cb61b82
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 9 08:28:35 2022 -0400

    gsk: Fix a formatting mishap

 gsk/gl/gskgldriver.c | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/gsk/gl/gskgldriver.c b/gsk/gl/gskgldriver.c
index f820bdd9f3..43b01ea5ee 100644
--- a/gsk/gl/gskgldriver.c
+++ b/gsk/gl/gskgldriver.c
@@ -694,24 +694,21 @@ draw_rect (GskGLCommandQueue *command_queue,
            float              max_y,
            gboolean           flip)
 {
-  GskGLDrawVertex *vertices = gsk_gl_command_queue_add_vertices (command_queue);
+  GskGLDrawVertex *vertices;
   float min_u = 0;
   float max_u = 1;
   float min_v = flip ? 0 : 1;
   float max_v = flip ? 1 : 0;
-  guint16 c[4] = { FP16_ZERO, FP16_ZERO, FP16_ZERO, FP16_ZERO };
-
-  vertices[0] = (GskGLDrawVertex) { .position = { min_x, min_y }, .uv = { min_u, min_v }, .color = { c[0], 
c[1], c[2
-], c[3] } };
-  vertices[1] = (GskGLDrawVertex) { .position = { min_x, max_y }, .uv = { min_u, max_v }, .color = { c[0], 
c[1], c[2
-], c[3] } };
-  vertices[2] = (GskGLDrawVertex) { .position = { max_x, min_y }, .uv = { max_u, min_v }, .color = { c[0], 
c[1], c[2
-], c[3] } };
-  vertices[3] = (GskGLDrawVertex) { .position = { max_x, max_y }, .uv = { max_u, max_v }, .color = { c[0], 
c[1], c[2
-], c[3] } };
-  vertices[4] = (GskGLDrawVertex) { .position = { min_x, max_y }, .uv = { min_u, max_v }, .color = { c[0], 
c[1], c[2
-], c[3] } };
-  vertices[5] = (GskGLDrawVertex) { .position = { max_x, min_y }, .uv = { max_u, min_v }, .color = { c[0], 
c[1], c[2], c[3] } };
+  guint16 c = FP16_ZERO;
+
+  vertices = gsk_gl_command_queue_add_vertices (command_queue);
+
+  vertices[0] = (GskGLDrawVertex) { .position = { min_x, min_y }, .uv = { min_u, min_v }, .color = { c, c, 
c, c } };
+  vertices[1] = (GskGLDrawVertex) { .position = { min_x, max_y }, .uv = { min_u, max_v }, .color = { c, c, 
c, c } };
+  vertices[2] = (GskGLDrawVertex) { .position = { max_x, min_y }, .uv = { max_u, min_v }, .color = { c, c, 
c, c } };
+  vertices[3] = (GskGLDrawVertex) { .position = { max_x, max_y }, .uv = { max_u, max_v }, .color = { c, c, 
c, c } };
+  vertices[4] = (GskGLDrawVertex) { .position = { min_x, max_y }, .uv = { min_u, max_v }, .color = { c, c, 
c, c } };
+  vertices[5] = (GskGLDrawVertex) { .position = { max_x, min_y }, .uv = { max_u, min_v }, .color = { c, c, 
c, c } };
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]