Bug 123537

Summary: Lots of layers get solid color but transparent contents layers now
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: noam, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Simon Fraser (smfr) 2013-10-30 16:10:57 PDT
After making layers with contents layers have pink borders, we can see from http://www.webkit.org/blog-files/3d-transforms/poster-circle.html that we're making color contents layers for lots of things now, but setting a transparent color on them.

RenderLayerBacking::updateDirectlyCompositedBackgroundColor() is getting rendererBackgroundColor(), which returns a valid (but transparent) color.
Comment 1 Noam Rosenthal 2013-10-30 16:24:40 PDT
At least for TextureMapper this is not a problem, I'm not familiar with the implications of this for CA.
Comment 2 Simon Fraser (smfr) 2013-10-30 16:30:42 PDT
Do you avoid contentsLayers for the transparent color?
Comment 3 Noam Rosenthal 2013-10-30 16:33:33 PDT
Content layers are really more of a CA concept... In TextureMapper we just mark those layers as having a solid color and no backing store and they're rendered that way.
But in general it should be safe to treat "transparent" solid color as a sign to delete the content layer, as an optimization inside GraphicsLayerCA and friends.
Comment 4 Simon Fraser (smfr) 2013-11-07 17:30:40 PST
Created attachment 216343 [details]
Patch
Comment 5 Tim Horton 2013-11-07 17:32:26 PST
Comment on attachment 216343 [details]
Patch

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

> Source/WebCore/ChangeLog:13
> +        Fix only making a background-color layer if the color is not transparent (zero alpha).

fix only making.
Comment 6 Simon Fraser (smfr) 2013-11-07 17:41:30 PST
https://trac.webkit.org/r158889