Bug 43291 - [chromium] Pure container platform layers should never render
Summary: [chromium] Pure container platform layers should never render
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 18:14 PDT by Vangelis Kokkevis
Modified: 2010-08-05 11:45 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (4.66 KB, patch)
2010-08-02 14:17 PDT, Vangelis Kokkevis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vangelis Kokkevis 2010-07-30 18:14:42 PDT
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.
Comment 1 Vangelis Kokkevis 2010-08-02 14:17:37 PDT
Created attachment 63259 [details]
Proposed patch
Comment 2 James Robinson 2010-08-02 16:07:05 PDT
I think that's only true if the WebGL/video/image does not have border decorations or a background.  See RenderLayerBacking::containsPaintedContent().
Comment 3 Vangelis Kokkevis 2010-08-02 18:35:02 PDT
(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-
Comment 4 Vangelis Kokkevis 2010-08-05 11:45:50 PDT
Marking this one INVALID.