Bug 130427 - [iOS][WebKit2] Mark layer contents as being opaque if they are
Summary: [iOS][WebKit2] Mark layer contents as being opaque if they are
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-18 15:08 PDT by Tim Horton
Modified: 2014-03-18 18:52 PDT (History)
7 users (show)

See Also:


Attachments
patch (17.33 KB, patch)
2014-03-18 18:12 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-03-18 15:08:18 PDT
<rdar://problem/15540434>
Comment 1 Tim Horton 2014-03-18 18:12:27 PDT
Created attachment 227141 [details]
patch
Comment 2 WebKit Commit Bot 2014-03-18 18:15:08 PDT
Attachment 227141 [details] did not pass style-queue:


ERROR: Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h:66:  The parameter name "layer" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2014-03-18 18:17:36 PDT
Comment on attachment 227141 [details]
patch

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

> Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm:793
> +            if (const RemoteLayerBackingStore* backingStore = layerProperties.backingStore.get())

we should log something if it goes away too...
Comment 4 Simon Fraser (smfr) 2014-03-18 18:20:42 PDT
Comment on attachment 227141 [details]
patch

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

> Source/WebCore/platform/graphics/GraphicsLayerClient.h:91
> +    virtual bool willPaintOpaqueAtNonIntegralScale(const GraphicsLayer*) const { return false; }

This sounds like it only applies to the next paint. Maybe paintsOpaquelyAtNonIntegralScales?

> Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h:84
> +    RetainPtr<CGImageRef> image() const;

Does this actually need to return a RetainPtr?
Comment 5 Tim Horton 2014-03-18 18:26:58 PDT
(In reply to comment #4)
> (From update of attachment 227141 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=227141&action=review
> 
> > Source/WebCore/platform/graphics/GraphicsLayerClient.h:91
> > +    virtual bool willPaintOpaqueAtNonIntegralScale(const GraphicsLayer*) const { return false; }
> 
> This sounds like it only applies to the next paint. Maybe paintsOpaquelyAtNonIntegralScales?

Sure.

> > Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h:84
> > +    RetainPtr<CGImageRef> image() const;
> 
> Does this actually need to return a RetainPtr?

I think so? It creates a fresh CGImage from the ShareableBitmap. Maybe I should rename it createImageForFrontBuffer() or something.
Comment 6 Tim Horton 2014-03-18 18:52:43 PDT
http://trac.webkit.org/changeset/165863