summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2013-12-04 23:54:27 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2013-12-05 08:40:53 -0500
commita2dfe2562fa9a455518d4c10c334f9ed7d92f96b (patch)
tree41f02e6cd749ce55414268b29ede3c07fb90899e
parentf9e8c2147edea09039061d4c3ba0eb0ca69afab1 (diff)
downloadclutter-a2dfe2562fa9a455518d4c10c334f9ed7d92f96b.tar.gz
ClutterStageCogl: Ignore a clip the size of the stage
If the clip region includes the entire stage, ignore it - we aren't actually clipped. https://bugzilla.gnome.org/show_bug.cgi?id=719901
-rw-r--r--clutter/cogl/clutter-stage-cogl.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c
index 3aa02bdad..86546b1ec 100644
--- a/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/cogl/clutter-stage-cogl.c
@@ -398,6 +398,8 @@ static void
clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+ cairo_rectangle_int_t geom;
+ gboolean have_clip;
gboolean may_use_clipped_redraw;
gboolean use_clipped_redraw;
gboolean can_blit_sub_buffer;
@@ -435,11 +437,19 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
has_buffer_age = cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
+ _clutter_stage_window_get_geometry (stage_window, &geom);
+
+ /* NB: a zero width redraw clip == full stage redraw */
+ have_clip = (stage_cogl->bounding_redraw_clip.width != 0 &&
+ !(stage_cogl->bounding_redraw_clip.x == 0 &&
+ stage_cogl->bounding_redraw_clip.y == 0 &&
+ stage_cogl->bounding_redraw_clip.width == geom.width &&
+ stage_cogl->bounding_redraw_clip.height == geom.height));
+
may_use_clipped_redraw = FALSE;
if (_clutter_stage_window_can_clip_redraws (stage_window) &&
can_blit_sub_buffer &&
- /* NB: a zero width redraw clip == full stage redraw */
- stage_cogl->bounding_redraw_clip.width != 0 &&
+ have_clip &&
/* some drivers struggle to get going and produce some junk
* frames when starting up... */
stage_cogl->frame_count > 3)