Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 358153003: Get rid of one-off paint invalidation code for paints-into-ancestor compositing state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comment from vollick@ Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index 4ba28f57c0d9d02067112deb5889b31d1e3167e5..fe43d68ad79bfabea7474ca656874d57a76306b7 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -1844,10 +1844,12 @@ bool CompositedLayerMapping::updateRequiresOwnBackingStoreForAncestorReasons(con
bool canPaintIntoAncestor = compositingAncestorLayer
&& (compositingAncestorLayer->compositedLayerMapping()->mainGraphicsLayer()->drawsContent()
|| compositingAncestorLayer->compositedLayerMapping()->paintsIntoCompositedAncestor());
- m_requiresOwnBackingStoreForAncestorReasons = !canPaintIntoAncestor;
if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor)
- paintsIntoCompositedAncestorChanged();
+ compositor()->repaintOnCompositingChange(&m_owningLayer);
+
+ m_requiresOwnBackingStoreForAncestorReasons = !canPaintIntoAncestor;
+
return m_requiresOwnBackingStoreForAncestorReasons != previousRequiresOwnBackingStoreForAncestorReasons;
}
@@ -1866,18 +1868,10 @@ bool CompositedLayerMapping::updateRequiresOwnBackingStoreForIntrinsicReasons()
|| renderer->hasFilter();
if (paintsIntoCompositedAncestor() != previousPaintsIntoCompositedAncestor)
- paintsIntoCompositedAncestorChanged();
- return m_requiresOwnBackingStoreForIntrinsicReasons != previousRequiresOwnBackingStoreForIntrinsicReasons;
-}
+ compositor()->repaintOnCompositingChange(&m_owningLayer);
-void CompositedLayerMapping::paintsIntoCompositedAncestorChanged()
-{
- // The answer to paintsIntoCompositedAncestor() affects cached clip rects, so when
- // it changes we have to clear clip rects on descendants.
- m_owningLayer.clipper().clearClipRectsIncludingDescendants(PaintingClipRects);
- m_owningLayer.repainter().computeRepaintRectsIncludingNonCompositingDescendants();
- compositor()->repaintInCompositedAncestor(&m_owningLayer, compositedBounds());
+ return m_requiresOwnBackingStoreForIntrinsicReasons != previousRequiresOwnBackingStoreForIntrinsicReasons;
}
void CompositedLayerMapping::setBlendMode(blink::WebBlendMode blendMode)
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.h ('k') | Source/core/rendering/compositing/GraphicsLayerUpdater.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698