DescriptionRevert 114283 - Avoid using backing store for compositing layers that just need to clip
https://bugs.webkit.org/show_bug.cgi?id=40547
Source/WebCore:
Reviewed by Dean Jackson.
If a layer becomes composited because it needs to clip composited
descendants, or if it has perspective, then it doesn't actually
needs its own backing store; its contents can be painted by an
ancestor, and we can just have an empty layer that does the clipping
or applies the perspective transform.
This saves backing store memory on some pages.
Tests: compositing/backing/no-backing-for-clip-overlap.html
compositing/backing/no-backing-for-clip.html
compositing/backing/no-backing-for-perspective.html
* rendering/RenderLayer.cpp:
(WebCore):
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::containsPaintedContent):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
(WebCore::RenderLayerBacking::paintsIntoCompositedAncestor):
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerWillBeRemoved):
(WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore):
(WebCore):
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containerForRepaint):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
LayoutTests:
Reviewed by Dean Jackson.
New tests for backing store elimination with clip or perspective.
New results for some tests that no longer have backing store on some
layers.
* compositing/backing/no-backing-for-clip-expected.txt: Added.
* compositing/backing/no-backing-for-clip-overlap-expected.txt: Added.
* compositing/backing/no-backing-for-clip-overlap.html: Added.
* compositing/backing/no-backing-for-clip.html: Added.
* compositing/backing/no-backing-for-perspective-expected.txt: Added.
* compositing/backing/no-backing-for-perspective.html: Added.
* compositing/geometry/preserve-3d-switching-expected.txt:
* compositing/visibility/layer-visible-content-expected.png:
* compositing/visibility/layer-visible-content-expected.txt:
TBR=simon.fraser@apple.com
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=115914
Patch Set 1 #Messages
Total messages: 2 (0 generated)
|