Created attachment 53328 [details] [review]
Fix A1 format win32 surfaces
The in-memory format for a depth 1 bitmap in GDI is not the same as cairo/pixman. To convert from one to the other you need to mirror the bits in each byte.
I.e. for the leftmost bit set in a 4 byte sequence pixman would use:
0x01, 0x00, 0x00, 0x00
Whereas GDI uses:
0x80, 0x00, 0x00, 0x00
This means the DIB bits in the win32 surface are not right in the CAIRO_FORMAT_A1 case. I'm attaching a patch that fixes this by skipping some optimization in this case and converting things when needed.
This was originally discovered inh Gtk+ on win32, see https://bugzilla.gnome.org/show_bug.cgi?id=653653 for the bug report.
Author: Chris Wilson <firstname.lastname@example.org>
Date: Sun Feb 12 11:25:07 2012 +0000
win32: Rebase on the new compositor infrastructure
Try and undo all the damage that has acrued over the years by plugging
into the compositor pipeline.
Signed-off-by: Chris Wilson <email@example.com>
on Dec 03, 2016 at 04:44:08.
(provided by the Example extension).