diff options
author | Rui Matos <tiagomatos@gmail.com> | 2016-09-21 15:06:08 +0200 |
---|---|---|
committer | Rui Matos <tiagomatos@gmail.com> | 2016-10-17 13:47:20 +0200 |
commit | fc8de3d0c85f14078db330751c04940edcf4e118 (patch) | |
tree | 49785d74d5a84e0c00b5897626555920320d7d20 | |
parent | 3e2555667f32d456c024b46869dd2049de094ef8 (diff) | |
download | mutter-fc8de3d0c85f14078db330751c04940edcf4e118.tar.gz |
clutter/stage: Fix framebuffer capture origin offset (again)
Commit 5fbb4793017b1891f0de4720a9793e8cfc1c8483 was wrong too. What we
really want to do here is getting view relative coordinates given the
view's and the rectangle's global coordinates so we need to subtract
the view's origin from the rectangle's.
https://bugzilla.gnome.org/show_bug.cgi?id=771502
-rw-r--r-- | clutter/clutter/clutter-stage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index 1d2c0bca7..21968b973 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -4712,8 +4712,8 @@ capture_view (ClutterStage *stage, clutter_stage_view_get_layout (view, &view_layout); cogl_framebuffer_read_pixels_into_bitmap (framebuffer, - view_layout.x + rect->x, - view_layout.y + rect->y, + rect->x - view_layout.x, + rect->y - view_layout.y, COGL_READ_PIXELS_COLOR_BUFFER, bitmap); |