From 8fd47276b7958f1f494e98da1dcce2b5802d1e05 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 17 Nov 2010 17:45:27 +0000 Subject: [PATCH] cogl_read_pixels: Fix the format used in GLES2 When converting the data in cogl_read_pixels it was using bmp_format instead of the format passed in to the function. bmp_format is the same as the passed in format except that it always has the premult bit set. Therefore the conversion would not handle premultiply correctly. http://bugzilla.clutter-project.org/show_bug.cgi?id=2414 --- cogl/cogl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/cogl.c b/cogl/cogl.c index 0dd4156b5..7cc2d66d7 100644 --- a/cogl/cogl.c +++ b/cogl/cogl.c @@ -655,7 +655,7 @@ _cogl_read_pixels_with_rowstride (int x, allocating its own buffer so we have to copy the data again */ if ((dst_bmp = _cogl_bitmap_convert_format_and_premult (tmp_bmp, - bmp_format))) + format))) { _cogl_bitmap_copy_subregion (dst_bmp, bmp,