A GraphicsLayerChromium corresponding to a WebGL/video/Image element creates a hierarchy of LayerChromium's. At the root of that hierarchy is a LayerChromium that's a pure container layer and below it are the content layers that should do the actual rendering. As the code stands, that root LayerChromium can be asked to draw (for example if its size changes) and it will do so via a temporary GraphicsContext. In the case of a WebGL layer, the root Layer will try to do a readback which has two problems: 1. It's slow 2. It switches the current GL context from the compositor to the one used by WebGL thus messing up the compositor. We need to make sure that pure container layers get skipped during compositing.
Created attachment 63259 [details] Proposed patch
I think that's only true if the WebGL/video/image does not have border decorations or a background. See RenderLayerBacking::containsPaintedContent().
(In reply to comment #2) > I think that's only true if the WebGL/video/image does not have border decorations or a background. See RenderLayerBacking::containsPaintedContent(). You are right! Thanks for catching that. R-
Marking this one INVALID.