Bug 231427 - CA Accelerated compositing compositor should not refer to WebGLLayer for contents provided layers
Summary: CA Accelerated compositing compositor should not refer to WebGLLayer for cont...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: 231009
  Show dependency treegraph
 
Reported: 2021-10-08 07:26 PDT by Kimmo Kinnunen
Modified: 2021-11-15 05:43 PST (History)
11 users (show)

See Also:


Attachments
Patch (17.82 KB, patch)
2021-10-08 07:36 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (17.85 KB, patch)
2021-10-08 07:37 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (16.94 KB, patch)
2021-10-08 07:41 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (16.94 KB, patch)
2021-10-08 07:43 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (17.11 KB, patch)
2021-10-11 05:28 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-10-08 07:26:16 PDT
CA Accelerated compositing compositor should not refer to WebGLLayer for contents provided layers

If it does, all contents provided layers need to be subclasses of WebGLLayer

UI side compositing for WebGL needs a hosted CA layer.
This layer cannot be the sole layer in the layer hierarchy, because the layer also needs to capture setBounds and send it to the GPU Process CALayer.
Comment 1 Kimmo Kinnunen 2021-10-08 07:36:13 PDT
Created attachment 440607 [details]
Patch
Comment 2 Kimmo Kinnunen 2021-10-08 07:37:38 PDT
Created attachment 440608 [details]
Patch
Comment 3 Kimmo Kinnunen 2021-10-08 07:41:14 PDT
Created attachment 440609 [details]
Patch
Comment 4 Kimmo Kinnunen 2021-10-08 07:43:39 PDT
Created attachment 440611 [details]
Patch
Comment 5 Kimmo Kinnunen 2021-10-11 05:28:10 PDT
Created attachment 440777 [details]
Patch
Comment 6 Tim Horton 2021-10-11 11:09:23 PDT
Comment on attachment 440777 [details]
Patch

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

> Source/WebCore/platform/graphics/ca/cocoa/WebContentsProviderLayer.h:34
> +@interface WebContentsProviderLayer : CALayer {
> +}

Get rid of random curly braces

> Source/WebCore/platform/graphics/ca/cocoa/WebContentsProviderLayer.mm:35
> +    for (CALayer* layer in self.sublayers)
> +        layer.frame = bounds;

This is pretty surprising behavior to have generically; usually I would expect this to be up to each subclass (and probably in -layoutSublayers). Alternatively like smfr suggested, use -autoresizingMask

> Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm:59
> +    contentsLayer.get().transform = CATransform3DScale(CATransform3DIdentity, 1, -1, 1);

`[x set*:]` instead of .get(). (https://trac.webkit.org/changeset/283706/webkit)
Comment 7 Kimmo Kinnunen 2021-10-15 06:21:15 PDT
Comment on attachment 440777 [details]
Patch

probably not needed in this form
Comment 8 Radar WebKit Bug Importer 2021-10-15 07:27:15 PDT
<rdar://problem/84300467>