[mutter] clutter: Let the stage window translate dirty pixel according to view
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Let the stage window translate dirty pixel according to view
- Date: Thu, 15 Sep 2016 02:33:12 +0000 (UTC)
commit 219d2304e0654548446f5b9b8d55f82b74380866
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue Sep 13 18:12:41 2016 +0800
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
clutter/clutter/clutter-stage.c | 2 --
clutter/clutter/cogl/clutter-stage-cogl.c | 7 +++++--
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index aec68e7..b7489bc 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -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)))
{
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 448e2ee..32a6978 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]