Commit 219d2304 authored by Jonas Ådahl's avatar Jonas Ådahl

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
parent fb6b0de4
......@@ -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)))
{
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment