The colors are all wrong when calling DrawWindow() on an Intel Mac. The problem seems to be that nsCanvasRenderingContext2D::DrawNativeSurfaces() assumes that the byte order in the native image matches the machine's byte order (which is not the case on Intel Mac). patch coming...
From: http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/chapter_5_section_15.html "By default, NewGWorld always creates big-endian pixel formats (k16BE555PixelFormat or k32ARGBPixelFormat), regardless of the endian format of the system." And: "For best performance, it is generally preferable for you to use a pixel format that corresponds to the native byte ordering of the system. When you pass kNativeEndianPixMap in the flags parameter to NewGWorld, the byte ordering of the pixel format is big-endian on big-endian systems, and little-endian on little-endian systems." But kNativeEndianPixMap is not used in the Mozilla code, so big-endian it is.
Attachment #222128 - Flags: superreview?(roc) → superreview+
Comment on attachment 222128 [details] [diff] [review] patch v1 r=me;this might re-break once mac goes cairo, but I suspect a lot of this code will change heavily then anyway. Asking for 1.8.1; small change, fixes mac issue.
Comment on attachment 222128 [details] [diff] [review] patch v1 Given that the fix only affects Intel Mac and is just a byte-order correction, is it possible to land this for 1.5.0.x Firefox release? We have many people requesting an Intel Mac version of our Page Saver extension but this bug makes saved images nearly useless for them. It also affects all extensions that use canvas.drawWindow().
fix checked into trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Comment on attachment 222128 [details] [diff] [review] patch v1 We have 188.8.131.52 in-hand already, unfortunately this is not a stop-ship and missed the boat
(In reply to comment #1) > Created an attachment (id=222128)  > patch v1 > I'm experiencing the color-problem on my MacBook Pro. Firefox 184.108.40.206 is running fine but I use "reveal" and "tab preview" and the colors of the thumbs are wrong. In 16,7mio colors mode every thumb is very cyan and in 32768 colors mode the thumbs are magenta. Will the fix be approved for the branches (so it will make it into an upcoming Firefox release)? I think many Mac-users would apreciate it.
This bug is really annoying. The tab-previews with wrong colors are pretty useless!
Comment on attachment 222128 [details] [diff] [review] patch v1 approved for 1.8.0 branch, a=dveditz for drivers
Checked in: nsCanvasRenderingContext2D.cpp 220.127.116.11 (branch for 1.8.1+) nsCanvasRenderingContext2D.cpp 18.104.22.168.2.3 (branch for 22.214.171.124)
Keywords: fixed126.96.36.199, fixed1.8.1
The testcase that Ted Mielczarek attached to bug 298375 can be used to verify this bug as well. Attachment 213143 [details]: https://bugzilla.mozilla.org/attachment.cgi?id=213143&action=view (requires signed.applets.codebase_principal_support=true)
verified fixed on the 1.8.0 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:188.8.131.52) Gecko/20060706 Firefox/184.108.40.206. I used the test case cited in Comment 11 with the about:config pref change and I do see the two red boxes.
Keywords: fixed220.127.116.11 → verified18.104.22.168
You need to log in before you can comment on or make changes to this bug.