mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
clutter-stage: Pass framebuffer to read pixels from
Instead of using cogl_read_pixels(), which is deprecated and uses the implicit framebuffer, pass the current CoglFramebuffer and use cogl_framebuffer_read_pixels().
This commit is contained in:
parent
dd82fbebf6
commit
c1b6184e0a
@ -1391,7 +1391,8 @@ clutter_stage_get_redraw_clip_bounds (ClutterStage *stage,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
read_pixels_to_file (char *filename_stem,
|
read_pixels_to_file (CoglFramebuffer *fb,
|
||||||
|
char *filename_stem,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width,
|
int width,
|
||||||
@ -1405,8 +1406,8 @@ read_pixels_to_file (char *filename_stem,
|
|||||||
read_count);
|
read_count);
|
||||||
|
|
||||||
data = g_malloc (4 * width * height);
|
data = g_malloc (4 * width * height);
|
||||||
cogl_read_pixels (x, y, width, height,
|
cogl_framebuffer_read_pixels (fb,
|
||||||
COGL_READ_PIXELS_COLOR_BUFFER,
|
x, y, width, height,
|
||||||
CLUTTER_CAIRO_FORMAT_ARGB32,
|
CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
@ -1532,7 +1533,7 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
|
|||||||
_clutter_actor_get_debug_name (actor),
|
_clutter_actor_get_debug_name (actor),
|
||||||
view_layout.x);
|
view_layout.x);
|
||||||
|
|
||||||
read_pixels_to_file (file_name, 0, 0, fb_width, fb_height);
|
read_pixels_to_file (fb, file_name, 0, 0, fb_width, fb_height);
|
||||||
|
|
||||||
g_free (file_name);
|
g_free (file_name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user