Add a public cogl_framebuffer_read_pixels_into_bitmap

This adds a public function to read pixels from a framebuffer into a
CoglBitmap. This replaces the internal function
_cogl_read_pixels_with_rowstride because a CoglBitmap contains a
rowstride so it can be used for the same purpose. A CoglBitmap already
has public API to make one that points to a CoglPixelBuffer so this
function can be used to read pixels into a PBO. It also avoids the
need to push the framebuffer on to the context's stack so it provides
a function which can be used in the 2.0 API after the stack is
removed.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts
2012-02-25 19:23:51 +00:00
parent 2501899044
commit 10a38bb14f
9 changed files with 328 additions and 226 deletions

View File

@ -406,6 +406,7 @@ cogl_framebuffer_set_point_samples_per_pixel
cogl_framebuffer_get_context
cogl_framebuffer_clear
cogl_framebuffer_clear4f
cogl_framebuffer_read_pixels_into_bitmap
<SUBSECTION>
cogl_framebuffer_draw_primitive