clutter: Let the stage window translate dirty pixel according to view

Otherwise if buffer age is not supported the dirty pixel would be
shifted potentially in unpaintable position.

https://bugzilla.gnome.org/show_bug.cgi?id=770672
This commit is contained in:
Jonas Ådahl 2016-09-13 18:12:41 +08:00
parent fb6b0de48b
commit 219d2304e0
2 changed files with 5 additions and 4 deletions

View File

@ -1404,8 +1404,6 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
view_layout.height);
_clutter_stage_window_get_dirty_pixel (priv->impl, view, &dirty_x, &dirty_y);
dirty_x -= view_layout.x;
dirty_y -= view_layout.y;
if (G_LIKELY (!(clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS)))
{

View File

@ -820,10 +820,13 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (view);
ClutterStageViewCoglPrivate *view_priv =
clutter_stage_view_cogl_get_instance_private (view_cogl);
cairo_rectangle_int_t view_layout;
clutter_stage_view_get_layout (view, &view_layout);
rect = &view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - 1)];
*x = rect->x;
*y = rect->y;
*x = rect->x - view_layout.x;
*y = rect->y - view_layout.y;
}
}