[webkit-reviews] review granted: [Bug 231009] Cocoa WebGL should support UI side compositing : [Attachment 445717] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 2 09:48:57 PST 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Kimmo Kinnunen
<kkinnunen at apple.com>'s request for review:
Bug 231009: Cocoa WebGL should support UI side compositing
https://bugs.webkit.org/show_bug.cgi?id=231009

Attachment 445717: Patch

https://bugs.webkit.org/attachment.cgi?id=445717&action=review




--- Comment #31 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 445717
  --> https://bugs.webkit.org/attachment.cgi?id=445717
Patch

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

> Source/WebCore/platform/graphics/GraphicsLayer.h:526
> +    virtual void
setContentsToDisplayDelegate(RefPtr<GraphicsLayerContentsDisplayDelegate>&&,
ContentsLayerPurpose);

The name is a bit odd. Maybe setContentsDisplayDelegate?

Does calling setContentsToSolidColor() or setContentsToPlatformLayer() remove
the delegate?

> Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.h:47
> +    virtual void willDelegateDisplay(PlatformCALayer&);

This name is ambiguous. On first reading I expect it to return a bool. Does it
mean "prepare to render a frame"?

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1363
> +	   m_contentsLayer =
createPlatformCALayer(PlatformCALayer::LayerTypeContentsProvidedLayer, this);

Naively I would expect that the GraphicsLayerContentsDisplayDelegate would do
the layer creation?

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1369
> +	   m_contentsLayer->setBackingStoreAttached(true);
> +	   m_contentsLayer->setAcceleratesDrawing(true);

I feel like these should be under delegate control too?

> Source/WebCore/platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:49
> +    }
> +    void display(PlatformCALayer& layer) final

Blank lines between functions please.

> Source/WebCore/platform/graphics/mac/WebLayer.mm:86
> +    if (!layer->owner()->platformCALayerDrawsContent() &&
!layer->owner()->platformCALayerDelegatesDisplay(layer.get()))

Maybe we should add a function that does both these checks.

>
Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.m
m:56
> +    }
> +    void display(WebCore::PlatformCALayer& layer) final

Blank lines please


More information about the webkit-reviews mailing list