Bug 149820 - WebCore::IOSurface should ask the IOSurface for the pixel format instead of caching it
Summary: WebCore::IOSurface should ask the IOSurface for the pixel format instead of c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-05 15:37 PDT by Beth Dakin
Modified: 2015-10-05 16:18 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.54 KB, patch)
2015-10-05 15:38 PDT, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch (3.75 KB, patch)
2015-10-05 15:54 PDT, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch (4.57 KB, patch)
2015-10-05 16:09 PDT, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2015-10-05 15:37:08 PDT
WebCore::IOSurface should ask the IOSurface for the pixel format instead of caching it
Comment 1 Beth Dakin 2015-10-05 15:38:59 PDT
Created attachment 262470 [details]
Patch
Comment 2 Beth Dakin 2015-10-05 15:54:34 PDT
Created attachment 262472 [details]
Patch
Comment 3 Tim Horton 2015-10-05 15:56:33 PDT
Comment on attachment 262470 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=262470&action=review

> Source/WebCore/platform/graphics/cocoa/IOSurface.mm:242
> +    if (pixelFormat == 'BGRA')
> +        return Format::RGBA;

I wonder if we should call the format BGRA since that's what it really is

> Source/WebCore/platform/graphics/cocoa/IOSurface.mm:243
> +#if PLATFORM(IOS)

Why is this (and the other yuv stuff) iOS specific? Only the transform part should be iOS specific.

That will fix your build error, too.
Comment 4 Beth Dakin 2015-10-05 16:09:08 PDT
(In reply to comment #3)
> Comment on attachment 262470 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=262470&action=review
> 
> > Source/WebCore/platform/graphics/cocoa/IOSurface.mm:242
> > +    if (pixelFormat == 'BGRA')
> > +        return Format::RGBA;
> 
> I wonder if we should call the format BGRA since that's what it really is
> 

NOOOOOOOOO

> > Source/WebCore/platform/graphics/cocoa/IOSurface.mm:243
> > +#if PLATFORM(IOS)
> 
> Why is this (and the other yuv stuff) iOS specific? Only the transform part
> should be iOS specific.
> 
> That will fix your build error, too.
 
Okay!
Comment 5 Beth Dakin 2015-10-05 16:09:28 PDT
Created attachment 262476 [details]
Patch
Comment 6 Beth Dakin 2015-10-05 16:18:59 PDT
Thanks Tim! 

http://trac.webkit.org/changeset/190587