Neil Roberts cb146dc515 Add a workaround for slow read pixels on Mesa
Mesa before version 8.0.2 has a slow read pixels path that gets used
with the Intel driver where it converts all of the pixels into a
floating point representation and back even if the data is being read
into exactly the same format. There is however a faster path using the
blitter when reading into a PBO with BGRA format. It works out faster
to read into a PBO and then memcpy back out into the application's
buffer even though it adds an extra memcpy. This patch adds a
workaround in cogl_framebuffer_read_pixels_into_bitmap when it detects
this situation. In that case it will create a temporary CoglBitmap
using cogl_bitmap_new_with_size, read into it and then memcpy the data
back out.

The main impetus for this patch is that Gnome Shell has implemented
this workaround directly using GL calls but it seems like the kind of
thing that would sit better at the Cogl layer.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-04-05 13:52:43 +01:00
..
2012-04-05 13:47:36 +01:00
2012-03-23 13:51:08 +00:00
2010-06-01 12:08:18 +01:00
2012-04-05 13:47:36 +01:00
2012-02-14 20:42:10 +00:00
2012-02-14 20:42:10 +00:00
2011-11-01 12:03:02 +00:00
2012-02-15 14:57:59 +00:00
2012-04-05 13:47:36 +01:00
2012-03-23 13:51:08 +00:00
2012-03-20 13:17:07 +00:00
2012-03-14 12:19:56 +00:00
2012-04-04 17:02:23 +01:00
2012-03-21 22:15:34 +08:00
2011-08-12 15:28:42 +01:00