Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
index 7ff3eef3fabf9fcbf135b808dc4f78bcae459381..cb195caf5deb2f3ab9c1f2bc4312355e8551d175 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
@@ -4,6 +4,7 @@ |
#include "core/paint/PaintLayerPainter.h" |
+#include "core/frame/FrameView.h" |
#include "core/frame/Settings.h" |
#include "core/layout/ClipPathOperation.h" |
#include "core/layout/LayoutBlock.h" |
@@ -80,10 +81,6 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayer(GraphicsContext& co |
if (shouldSuppressPaintingLayer(&m_paintLayer)) |
return FullyPainted; |
- // TODO(skyostil): Unify this early-out logic with subsequence caching. |
- if (m_paintLayer.layoutObject()->isLayoutPart() && toLayoutPart(m_paintLayer.layoutObject())->isThrottledFrameView()) |
- return FullyPainted; |
- |
// If this layer is totally invisible then there is nothing to paint. |
if (!m_paintLayer.layoutObject()->opacity() && !m_paintLayer.layoutObject()->hasBackdropFilter()) |
return FullyPainted; |
@@ -269,9 +266,13 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon |
if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !m_paintLayer.layoutObject()->isLayoutView() && !m_paintLayer.layoutObject()->isDocumentElement()) |
return result; |
- // TODO(skyostil): Unify this early-out logic with subsequence caching. |
- if (m_paintLayer.layoutObject()->isLayoutPart() && toLayoutPart(m_paintLayer.layoutObject())->isThrottledFrameView()) |
- return FullyPainted; |
+ if (m_paintLayer.layoutObject()->isLayoutView() && toLayoutView(m_paintLayer.layoutObject())->frameView()->shouldThrottleRendering()) { |
+ // Make sure we re-record any cached subsequence when this layer becomes |
+ // unthrottled again. |
+ result = MayBeClippedByPaintDirtyRect; |
+ m_paintLayer.setPreviousPaintResult(result); |
+ return result; |
chrishtr
2016/01/20 17:08:11
I think you need to call m_paintLayer.setPreviousP
Sami
2016/01/20 18:06:42
Hmm, isn't that what I'm doing on line 273 or did
Sami
2016/01/20 18:10:09
And to be clear the other part of the bugfix is th
Xianzhu
2016/01/20 18:31:12
I think we need to clear m_paintLayer's other prev
Sami
2016/01/20 18:49:31
Good point. Looks like it should be sufficient to
Xianzhu
2016/01/20 18:51:03
needsRepaint should be suffice.
|
+ } |
// Ensure our lists are up-to-date. |
m_paintLayer.stackingNode()->updateLayerListsIfNeeded(); |