Bug 88906 - Tiled drawing means some elements can disappear behind the page
Summary: Tiled drawing means some elements can disappear behind the page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-06-12 13:28 PDT by Dean Jackson
Modified: 2012-07-27 07:46 PDT (History)
6 users (show)

See Also:


Attachments
Test case (424 bytes, text/html)
2012-06-12 13:39 PDT, Dean Jackson
no flags Details
Patch (9.63 KB, patch)
2012-06-14 17:10 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (17.34 KB, patch)
2012-07-06 15:42 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (16.77 KB, patch)
2012-07-08 17:04 PDT, Dean Jackson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2012-06-12 13:28:32 PDT
When tiled drawing (TileCache) is enabled on a page, and the page has preserve-3d, then elements can potentially disappear behind the tiles.
Comment 1 Dean Jackson 2012-06-12 13:29:51 PDT
<rdar://problem/11601834>
Comment 2 Radar WebKit Bug Importer 2012-06-12 13:30:52 PDT
<rdar://problem/11649569>
Comment 3 Dean Jackson 2012-06-12 13:39:06 PDT
Created attachment 147146 [details]
Test case
Comment 4 Dean Jackson 2012-06-14 17:10:51 PDT
Created attachment 147683 [details]
Patch
Comment 5 Dean Jackson 2012-07-06 15:42:13 PDT
Created attachment 151121 [details]
Patch
Comment 6 Simon Fraser (smfr) 2012-07-06 15:52:46 PDT
Comment on attachment 151121 [details]
Patch

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

> Source/WebCore/platform/graphics/ca/mac/TileCache.mm:67
> +    [m_tileContainerLayer.get() setName:@"TileCache Container Layer"];

We normally only set layer names in debug.

> Source/WebCore/rendering/RenderLayerBacking.cpp:145
> +        m_creatingPrimaryGraphicsLayer = true;

I think m_creatingPrimaryGraphicsLayer could just be a static.

> Source/WebCore/rendering/RenderLayerBacking.cpp:176
> +    m_graphicsLayer = createGraphicsLayer(layerName, true);

Not a big fan of the 'true' here.

> Source/WebCore/rendering/RenderLayerBacking.cpp:570
> +            if (m_containmentLayer && !m_usingTiledCacheLayer) {

I think the m_containmentLayer && !m_usingTiledCacheLayer thing everywhere is confusing.

Maybe add:
GraphicsLayer* tileCacheFlatteningLayer() const { return m_usingTiledCacheLayer ? m_containmentLayer : 0; }
GraphicsLayer* clippingLayer() const { return !m_usingTiledCacheLayer ? m_containmentLayer : 0; }

and use them like:

if (GraphicsLayer* clippingLayer = clippingLayer())
  clippingLayer->....
Comment 7 Dean Jackson 2012-07-08 16:54:23 PDT
(In reply to comment #6)
> (From update of attachment 151121 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=151121&action=review
> 
> > Source/WebCore/platform/graphics/ca/mac/TileCache.mm:67
> > +    [m_tileContainerLayer.get() setName:@"TileCache Container Layer"];
> 
> We normally only set layer names in debug.

Done.

> 
> > Source/WebCore/rendering/RenderLayerBacking.cpp:145
> > +        m_creatingPrimaryGraphicsLayer = true;
> 
> I think m_creatingPrimaryGraphicsLayer could just be a static.

Done.

> 
> > Source/WebCore/rendering/RenderLayerBacking.cpp:176
> > +    m_graphicsLayer = createGraphicsLayer(layerName, true);
> 
> Not a big fan of the 'true' here.

I removed the default parameter, and had createPrimaryGraphicsLayer just wrap its call to createGraphicsLayer in the yucky setting of the static bool.


> > Source/WebCore/rendering/RenderLayerBacking.cpp:570
> > +            if (m_containmentLayer && !m_usingTiledCacheLayer) {
> 
> I think the m_containmentLayer && !m_usingTiledCacheLayer thing everywhere is confusing.
> 
> ...

I did this where I could. There are still come cases where we need to check m_usingTileCacheLayer directly, such as when we create the layers, but it's better now.
Comment 8 Dean Jackson 2012-07-08 17:04:18 PDT
Created attachment 151167 [details]
Patch
Comment 9 Simon Fraser (smfr) 2012-07-09 10:30:15 PDT
Comment on attachment 151167 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        some 3d transforms, the elements could disappear behind the
> +        page background (which is rendered into the tile cache). Fix

... and could intersect with the tile cache tiles.
Comment 10 Dean Jackson 2012-07-09 13:39:27 PDT
Committed r122152: <http://trac.webkit.org/changeset/122152>