Bug 149820

Summary: WebCore::IOSurface should ask the IOSurface for the pixel format instead of caching it
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, simon.fraser, thorton
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch thorton: review+

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