ClutterStageCogl: Don't get buffer damage dirty pixel when not supported

Now with the existance of offscreen view framebuffers the buffer age
damage regions are only valid if the view in question doesn't doesn't
have an intermediate offscreen. So, for views that doesn't have buffer
age, return the dirty pixel (0,0).

https://bugzilla.gnome.org/show_bug.cgi?id=770672
This commit is contained in:
Jonas Ådahl 2016-09-13 18:18:02 +08:00
parent 219d2304e0
commit 342532a98d

View File

@ -806,7 +806,9 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
int *x, int *x,
int *y) int *y)
{ {
CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
gboolean has_buffer_age = gboolean has_buffer_age =
cogl_is_onscreen (framebuffer) &&
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE); cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
cairo_rectangle_int_t *rect; cairo_rectangle_int_t *rect;