-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-05-20 17:17, schrieb Henri Verbeet:
I don't think we need that since afaik we should never do RGBA -> P8 blits / presents. But even then, does this even work for swapchain surfaces? I'd expect the alpha channel to just be lost.
I'm not sure what you mean with RGBA -> P8 blits. Those never worked, and I don't expect them to do anything reasonable on Windows.
But still I think you're right and it is safe to remove this code. What we needed this for is reading back P8 drawables that were converted to RGBA, and since 7b049245 that's only the front buffer. If the conversion is done with the shader we have the unmodified ALPHA8 texture. Otherwise we set SFLAG_CONVERTED and never free sysmem and don't do GL-side blits. (Ddraw will never read back the front buffer, but wined3d doesn't know that.)
Re GDI presents: A HPALETTE attached to the device context doesn't do anything, as expected. If I understand GDI palette handling correctly, the attached palette only matters when drawing to a device context that has a palette-indexed bitmap / window attached, but not when reading from it. The DIB color table determines the color values produced when reading from a palette-indexed DIB section.