Bug 130427

Summary: [iOS][WebKit2] Mark layer contents as being opaque if they are
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, sam, sergio, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch simon.fraser: review+

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