[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] Cairo video rendering with correct scaling and offset
From: |
Timothy Lee |
Subject: |
Re: [Gnash-dev] Cairo video rendering with correct scaling and offset |
Date: |
Wed, 11 Jul 2007 23:33:58 +0800 |
User-agent: |
Thunderbird 3.0a1pre (X11/2007070303) |
Dear all,
Patch to fix a bug in rgba_to_cairo_argb32(), which incremented only 3
instead of 4 bytes per pixel.
Regards,
Timothy
strk wrote:
On Wed, Jul 11, 2007 at 06:24:15PM +0800, Timothy Lee wrote:
Video rendering in Cairo backend should have correct scaling and offset
with this patch.
Committed. Thanks.
--strk;
_______________________________________________
Gnash-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnash-dev
|
Index: backend/render_handler_cairo.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_cairo.cpp,v
retrieving revision 1.21
diff -p -u -b -r1.21 render_handler_cairo.cpp
--- backend/render_handler_cairo.cpp 11 Jul 2007 15:18:00 -0000 1.21
+++ backend/render_handler_cairo.cpp 11 Jul 2007 15:31:07 -0000
@@ -25,7 +25,7 @@ static cairo_t* g_cr_output = 0;
static cairo_t* g_cr = 0;
-// Converts from RGBA image to 32-bit pixels in CAIRO_FORMAT_RGB24 format
+// Converts from RGB image to 32-bit pixels in CAIRO_FORMAT_RGB24 format
static void
rgb_to_cairo_rgb24(uint8_t* dst, const image::rgb* im)
{
@@ -50,7 +50,7 @@ rgba_to_cairo_argb32(uint8_t* dst, const
for (int y = 0; y < im->m_height; y++)
{
const uint8_t* src = image::scanline(im, y);
- for (int x = 0; x < im->m_width; x++, src += 3)
+ for (int x = 0; x < im->m_width; x++, src += 4)
{
// 32-bit ARGB data in native endian format
*dst32++ = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3];