Commit e1ac6078 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: Remove some redundant and compiler-unfriendly pixel format checking code.

Spotted by Gerald Pfeifer and Nicolas Le Cam.
parent b17fd2a3
...@@ -702,13 +702,11 @@ static void copy_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsize, ...@@ -702,13 +702,11 @@ static void copy_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsize,
for(x = 0;x < minwidth;x++) { for(x = 0;x < minwidth;x++) {
/* extract source color components */ /* extract source color components */
if(srcformat->type == FORMAT_ARGB) { pixel = dword_from_bytes(srcptr, srcformat->bytes_per_pixel);
pixel = dword_from_bytes(srcptr, srcformat->bytes_per_pixel); get_relevant_argb_components(&conv_info, pixel, channels);
get_relevant_argb_components(&conv_info, pixel, channels);
}
/* recombine the components */ /* recombine the components */
if(destformat->type == FORMAT_ARGB) val = make_argb_color(&conv_info, channels); val = make_argb_color(&conv_info, channels);
if(colorkey) { if(colorkey) {
get_relevant_argb_components(&ck_conv_info, pixel, channels); get_relevant_argb_components(&ck_conv_info, pixel, channels);
...@@ -769,13 +767,11 @@ static void point_filter_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsi ...@@ -769,13 +767,11 @@ static void point_filter_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsi
DWORD val = 0; DWORD val = 0;
/* extract source color components */ /* extract source color components */
if(srcformat->type == FORMAT_ARGB) { pixel = dword_from_bytes(srcptr, srcformat->bytes_per_pixel);
pixel = dword_from_bytes(srcptr, srcformat->bytes_per_pixel); get_relevant_argb_components(&conv_info, pixel, channels);
get_relevant_argb_components(&conv_info, pixel, channels);
}
/* recombine the components */ /* recombine the components */
if(destformat->type == FORMAT_ARGB) val = make_argb_color(&conv_info, channels); val = make_argb_color(&conv_info, channels);
if(colorkey) { if(colorkey) {
get_relevant_argb_components(&ck_conv_info, pixel, channels); get_relevant_argb_components(&ck_conv_info, pixel, channels);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment