Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
composited canvas element should update the layer configuration after…
… creating a WebGL context https://bugs.webkit.org/show_bug.cgi?id=243629 Reviewed by Simon Fraser. Because WebGL is GPU accelerated, creating a WebGL context makes the canvas element have a compositing layer. However, if a canvas element had a compositing layer before creating a WebGL context, it didn't update the content layer. When canvas.getContext('webgl') creates a WebGL context, HTMLCanvasElement::createContextWebGL calls invalidateStyleAndLayerComposition to create a new compositing layer for the canvas element and set the WebGL layer as the content layer of the layer. However, if the canvas element already had a compositing layer, the content layer wasn't set as expected. * LayoutTests/compositing/webgl/update-composited-canvas-layer-expected.html: Added. * LayoutTests/compositing/webgl/update-composited-canvas-layer.html: Added. * Source/WebCore/html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createContextWebGL): Call RenderBoxModelObject::contentChanged to ensure the content layer updated if it already has a renderer. Canonical link: https://commits.webkit.org/253231@main
- Loading branch information