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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1424933004: Changes in PaintLayer and PaintLayerPainter for synchronized painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 03faeedc28f2300eb665ac90d6f33873b43e2037..15b0c804d92e667f0293f6a0ff79ef431b90714e 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2672,19 +2672,10 @@ void PaintLayer::computeSelfHitTestRects(LayerHitTestRects& rects) const
void PaintLayer::setNeedsRepaint()
{
- PaintLayer* layer = this;
- while (layer && !layer->isSelfPaintingLayer() && !layer->hasSelfPaintingLayerDescendant())
- layer = layer->parent();
-
- // This layer is in an orphaned layer tree. Will mark ancestor for repaint when
- // the orphaned tree is added into another tree.
- if (!layer)
- return;
-
- layer->m_needsRepaint = true;
+ m_needsRepaint = true;
// Do this unconditionally to ensure container chain is marked when compositing status of the layer changes.
- layer->markAncestorChainForNeedsRepaint();
+ markAncestorChainForNeedsRepaint();
}
void PaintLayer::markAncestorChainForNeedsRepaint()
@@ -2708,11 +2699,9 @@ void PaintLayer::markAncestorChainForNeedsRepaint()
break;
container = owner->enclosingLayer();
}
- if (container->isSelfPaintingLayer() || container->hasSelfPaintingLayerDescendant()) {
- if (container->m_needsRepaint)
- break;
- container->m_needsRepaint = true;
- }
+ if (container->m_needsRepaint)
+ break;
+ container->m_needsRepaint = true;
layer = container;
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698