[mutter/gbsneto/tracing: 11/11] clutter/stage-cogl: Simplify redraw function



commit 3e2a2cf532d633a3fa0a323f2ffb07de798f4a1b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon May 20 10:37:52 2019 -0300

    clutter/stage-cogl: Simplify redraw function
    
    Spotted while adding tracing to swap buffers, we only enter
    the first part of the if condition when use_clipped_redraw
    is TRUE, so it's pretty safe to assume it's TRUE.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/197

 clutter/clutter/cogl/clutter-stage-cogl.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 4d2bd3f9c..e8ea80d7f 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -907,26 +907,16 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
    */
   if (use_clipped_redraw)
     {
-      if (use_clipped_redraw && clip_region_empty)
+      if (clip_region_empty)
         {
           do_swap_buffer = FALSE;
         }
-      else if (use_clipped_redraw)
+      else
         {
           swap_region = fb_clip_region;
           g_assert (swap_region.width > 0);
           do_swap_buffer = TRUE;
         }
-      else
-        {
-          swap_region = (cairo_rectangle_int_t) {
-            .x = 0,
-            .y = 0,
-            .width = view_rect.width * fb_scale,
-            .height = view_rect.height * fb_scale,
-          };
-          do_swap_buffer = TRUE;
-        }
     }
   else
     {


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