Bug 123537 - Lots of layers get solid color but transparent contents layers now
Summary: Lots of layers get solid color but transparent contents layers now
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on:
Reported: 2013-10-30 16:10 PDT by Simon Fraser (smfr)
Modified: 2013-11-07 17:41 PST (History)
3 users (show)

See Also:

Patch (5.95 KB, patch)
2013-11-07 17:30 PST, Simon Fraser (smfr)
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 5 Tim Horton 2013-11-07 17:32:26 PST
Comment on attachment 216343 [details]

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