Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/surface.c:
}
}
+static void convert_argb_pixel(const uint8_t *src_ptr, const struct pixel_format_desc *src_fmt, uint8_t *dst_ptr,
const struct pixel_format_desc *dst_fmt, const PALETTEENTRY *palette, struct argb_conversion_info *conv_info,
D3DCOLOR color_key, const struct pixel_format_desc *ck_format, struct argb_conversion_info *ck_conv_info)
I intentionally didn't factor out this chunk at the time, because calling a function once per pixel is potentially a lot of overhead and such a large function might end up not being inlined (regardless of the presence of any `inline` qualifier). It looks like, indeed, it's not inlined by the compiler for me.
I guess the question is how much this actually affects performance. Can you run some quick benchmarks on a variety of images to have some idea of the effect of this change?