[mutter/gbsneto/software-picking: 62/67] cluter/stage: Use clear4f() variant when picking



commit 606665b4d82fa46fec1cd5fbd68d61bd4259e645
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Jan 19 11:56:06 2019 -0200

    cluter/stage: Use clear4f() variant when picking
    
    There is no need to initialize a CoglColor there and pass
    it to cogl_framebuffer_clear() when we can just pass the
    white color directly.
    
    Use the clear4f() variant and remove the now unused pick_id
    variable.

 clutter/clutter/clutter-stage.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 04367b0ee..295522af7 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1437,7 +1437,6 @@ _clutter_stage_do_pick_on_view (ClutterStage     *stage,
   cairo_rectangle_int_t view_layout;
   ClutterMainContext *context;
   guchar pixel[4] = { 0xff, 0xff, 0xff, 0xff };
-  CoglColor stage_pick_id;
   gboolean dither_enabled_save;
   ClutterActor *retval;
   gint dirty_x;
@@ -1500,8 +1499,9 @@ _clutter_stage_do_pick_on_view (ClutterStage     *stage,
                 view_layout.width, view_layout.height,
                 view_layout.x, view_layout.y, fb_scale);
 
-  cogl_color_init_from_4ub (&stage_pick_id, 255, 255, 255, 255);
-  cogl_framebuffer_clear (fb, COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_DEPTH, &stage_pick_id);
+  cogl_framebuffer_clear4f (fb,
+                            COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_DEPTH,
+                            1.0f, 1.0f, 1.0f, 1.0f);
 
   /* Disable dithering (if any) when doing the painting in pick mode */
   dither_enabled_save = cogl_framebuffer_get_dither_enabled (fb);


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