Closed Bug 358560 Opened 18 years ago Closed 18 years ago

Canvas2D renders black with 16M colors on OS/2

Categories

(Core Graveyard :: GFX: OS/2, defect)

x86
OS/2
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mozilla, Assigned: mozilla)

Details

(Keywords: verified1.8.1.1)

Attachments

(1 file)

As noted in the newsgroup the canvas that is created by the Firefox Showcase extension or the SeaMonkey tab preview tooltips displays black when the system is set to 16M colors with the SNAP driver. With the 64K colors setting it displays just fine.
The problem is simply because nsOffscreenSurface::GetPixelFormat() does not implement 32bit depths, just 24bit depth. I don't know why SNAP implements 16M colors as 32bit instead of 24bit but this patch seems to fix the problem here. It implements 32bit as BGR_A8 which is what OS/2+SNAP seems to be using (at least that is the format that always worked in the SVG code). It uses basically the same bit masks as GetPixelFormat() on Windows.

Andy, would be great if you could confirm that this patch fixes the problem for you, too.
Attachment #243934 - Flags: superreview?(mozilla)
Attachment #243934 - Flags: review?(abwillis1)
Comment on attachment 243934 [details] [diff] [review]
add pixel format for BGR_A8

Works like a charm.
Attachment #243934 - Flags: review?(abwillis1) → review+
Comment on attachment 243934 [details] [diff] [review]
add pixel format for BGR_A8

sr=mkaply (OS2 only)
Attachment #243934 - Flags: superreview?(mozilla) → superreview+
Fix checked into trunk (with an additional "break;" that was missing from the patch).
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment on attachment 243934 [details] [diff] [review]
add pixel format for BGR_A8

Would be great to get this OS/2 only, trunk tested fix into 1.8 branch.
Attachment #243934 - Flags: approval1.8.1.1?
Comment on attachment 243934 [details] [diff] [review]
add pixel format for BGR_A8

approved for 1.8 branch, a=dveditz for drivers
Attachment #243934 - Flags: approval1.8.1.1? → approval1.8.1.1+
Keywords: fixed1.8.1.1
Verifying some older bugs.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: