Bug 153751

Summary: Snapshot surfaces are forever wired after being compressed
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Tim Horton 2016-02-01 10:23:52 PST
Snapshot surfaces are forever wired after being compressed
Comment 1 Tim Horton 2016-02-01 10:24:13 PST
Created attachment 270399 [details]
Patch
Comment 2 Darin Adler 2016-02-01 10:25:49 PST
Comment on attachment 270399 [details]
Patch

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

> Source/WebCore/platform/graphics/cocoa/IOSurface.mm:42
>  CGContextRef CGIOSurfaceContextCreate(IOSurfaceRef, size_t, size_t, size_t, size_t, CGColorSpaceRef, CGBitmapInfo);
>  CGImageRef CGIOSurfaceContextCreateImage(CGContextRef);
>  CGImageRef CGIOSurfaceContextCreateImageReference(CGContextRef);

Why isn’t any of this in the SPI header?

> Source/WebCore/platform/graphics/cocoa/IOSurface.mm:45
> +const NSString *WebIOSurfaceAcceleratorUnwireSurfaceKey = @"UnwireSurface";

The const here is placed wrong. I think you want NSString * const.

There’s no reason to put this inside the extern "C".
Comment 3 Tim Horton 2016-02-01 10:28:13 PST
(In reply to comment #2)
> Comment on attachment 270399 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270399&action=review
> 
> > Source/WebCore/platform/graphics/cocoa/IOSurface.mm:42
> >  CGContextRef CGIOSurfaceContextCreate(IOSurfaceRef, size_t, size_t, size_t, size_t, CGColorSpaceRef, CGBitmapInfo);
> >  CGImageRef CGIOSurfaceContextCreateImage(CGContextRef);
> >  CGImageRef CGIOSurfaceContextCreateImageReference(CGContextRef);
> 
> Why isn’t any of this in the SPI header?

Good question.

> > Source/WebCore/platform/graphics/cocoa/IOSurface.mm:45
> > +const NSString *WebIOSurfaceAcceleratorUnwireSurfaceKey = @"UnwireSurface";
> 
> The const here is placed wrong. I think you want NSString * const.
> 
> There’s no reason to put this inside the extern "C".

OK!

Thank you!
Comment 4 Tim Horton 2016-02-01 10:47:30 PST
Created attachment 270401 [details]
Patch
Comment 5 Tim Horton 2016-02-01 11:29:47 PST
Created attachment 270407 [details]
Patch
Comment 6 WebKit Commit Bot 2016-02-01 12:47:17 PST
Comment on attachment 270407 [details]
Patch

Clearing flags on attachment: 270407

Committed r195975: <http://trac.webkit.org/changeset/195975>
Comment 7 WebKit Commit Bot 2016-02-01 12:47:20 PST
All reviewed patches have been landed.  Closing bug.