[1/3] gdiplus: Process a row instead of a column in inner conversion loop.
Vincent Povirk
madewokherd at gmail.com
Fri Sep 19 11:23:59 CDT 2014
-------------- next part --------------
From 5180b10a2751196059025f824ff6039e06fdb69e Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 18 Sep 2014 13:22:14 -0500
Subject: [PATCH 1/3] gdiplus: Process a row instead of a column in inner
conversion loop.
---
dlls/gdiplus/image.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 7964cd8..0564f33 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -582,8 +582,8 @@ GpStatus convert_pixels(INT width, INT height,
}
#define convert_indexed_to_rgb(getpixel_function, setpixel_function) do { \
- for (x=0; x<width; x++) \
- for (y=0; y<height; y++) { \
+ for (y=0; y<height; y++) \
+ for (x=0; x<width; x++) { \
BYTE index; \
ARGB argb; \
BYTE *color = (BYTE *)&argb; \
@@ -595,8 +595,8 @@ GpStatus convert_pixels(INT width, INT height,
} while (0);
#define convert_rgb_to_rgb(getpixel_function, setpixel_function) do { \
- for (x=0; x<width; x++) \
- for (y=0; y<height; y++) { \
+ for (y=0; y<height; y++) \
+ for (x=0; x<width; x++) { \
BYTE r, g, b, a; \
getpixel_function(&r, &g, &b, &a, src_bits+src_stride*y, x); \
setpixel_function(r, g, b, a, dst_bits+dst_stride*y, x); \
@@ -605,8 +605,8 @@ GpStatus convert_pixels(INT width, INT height,
} while (0);
#define convert_rgb_to_indexed(getpixel_function, setpixel_function) do { \
- for (x=0; x<width; x++) \
- for (y=0; y<height; y++) { \
+ for (y=0; y<height; y++) \
+ for (x=0; x<width; x++) { \
BYTE r, g, b, a; \
getpixel_function(&r, &g, &b, &a, src_bits+src_stride*y, x); \
setpixel_function(r, g, b, a, dst_bits+dst_stride*y, x, palette); \
--
1.9.1
More information about the wine-patches
mailing list