Bug 45332 - gl-teximage fails on chrome mac bot
Summary: gl-teximage fails on chrome mac bot
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Zhenyao Mo
URL:
Keywords:
Depends on: 45316 45336
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-07 15:58 PDT by Zhenyao Mo
Modified: 2010-09-27 10:02 PDT (History)
2 users (show)

See Also:


Attachments
patch (7.96 KB, patch)
2010-09-24 16:36 PDT, Zhenyao Mo
kbr: review+
zmo: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Zhenyao Mo 2010-09-07 16:04:28 PDT
Add the test to test_expectations.txt (see r66922).
Comment 2 Kenneth Russell 2010-09-07 16:08:38 PDT
This test passes on my Snow Leopard machine, so I assume that Leopard (which the bot is running) is doing something different with the image data. The test output indicates that the color channels are swapped, so we are probably misinterpreting the image data obtained from CGImageGetDataProvider / CGDataProviderCopyData. I suspect we need to call CGImageGetBitmapInfo and pay attention to the byte order bits.
Comment 3 Zhenyao Mo 2010-09-07 16:32:55 PDT
If you don't mind, I'd like to take this bug since it's originally my code.
Comment 4 Kenneth Russell 2010-09-07 16:33:59 PDT
(In reply to comment #3)
> If you don't mind, I'd like to take this bug since it's originally my code.

Thanks, I definitely appreciate that.
Comment 5 Zhenyao Mo 2010-09-24 16:36:21 PDT
Created attachment 68790 [details]
patch

It's confirmed that in Mac OS 10.5 (possibly up to Mac OS 10.6.3), CG's decoder outputs alpha-first pixel format, and from 10.6.4, it's alpha last pixel formats.

This patch adds path to deal with alpha first formats.  Tested on 10.5 machine.
Comment 6 Kenneth Russell 2010-09-24 19:22:53 PDT
Comment on attachment 68790 [details]
patch

Looks good.
Comment 7 Zhenyao Mo 2010-09-27 10:02:10 PDT
Committed r68399: <http://trac.webkit.org/changeset/68399>