Bug 153751 - Snapshot surfaces are forever wired after being compressed
Summary: Snapshot surfaces are forever wired after being compressed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-01 10:23 PST by Tim Horton
Modified: 2016-02-01 12:47 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.19 KB, patch)
2016-02-01 10:24 PST, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (2.20 KB, patch)
2016-02-01 10:47 PST, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (2.27 KB, patch)
2016-02-01 11:29 PST, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.