Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index 2499b0365de08b2b19824780c8af16bcf705f6f5..ad57d632833fd684f32e16f60599e7cc52f595d2 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -1197,6 +1197,10 @@ void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai |
| if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) |
| return; |
| + FrameView* frameView = paintInvalidationContainer.frameView(); |
| + if (frameView && frameView->shouldThrottleRenderingIfAllowed()) |
|
esprehn
2015/10/14 22:09:46
ditto, the frameView must not be null if the Layou
Sami
2015/10/16 16:48:09
Done.
|
| + return; |
| + |
| ASSERT(gDisablePaintInvalidationStateAsserts || document().lifecycle().state() == DocumentLifecycle::InPaintInvalidation); |
| if (dirtyRect.isEmpty()) |
| @@ -3246,7 +3250,8 @@ void LayoutObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas |
| if (!isUpgradingDelayedFullToFull) { |
| ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidation); |
| - frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). |
| + if (!frameView() || !frameView()->shouldThrottleRendering()) |
|
esprehn
2015/10/14 22:09:46
no null check
Sami
2015/10/16 16:48:09
Done.
|
| + frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). |
| markContainerChainForPaintInvalidation(); |
| } |
| } |
| @@ -3257,7 +3262,8 @@ void LayoutObject::setMayNeedPaintInvalidation() |
| return; |
| m_bitfields.setMayNeedPaintInvalidation(true); |
| markContainerChainForPaintInvalidation(); |
| - frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). |
| + if (!frameView() || !frameView()->shouldThrottleRendering()) |
| + frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). |
|
esprehn
2015/10/14 22:09:46
this should be inside a helper so we don't need th
Sami
2015/10/16 16:48:09
Added Frame::scheduleVisualUpdateUnlessThrottled()
|
| } |
| void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState) |