Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
index 3e4f079d35943e1535f6891dce47fb64813f6774..f8a38055ebfe2e2ced5b5c673e7c96f8db1138aa 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
@@ -799,19 +799,21 @@ static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context, |
scrollbar->paint(&context, transformedClip); |
} |
-void PaintLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect& clip) const |
+void PaintLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect* clip) const |
{ |
+ IntRect defaultClip; |
+ if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled() && !clip) { |
+ defaultClip.setSize(m_layoutView.layoutSize(IncludeScrollbars)); |
+ clip = &defaultClip; |
+ } |
+ ASSERT(clip); |
+ |
if (graphicsLayer == layerForHorizontalScrollbar()) |
- paintScrollbar(m_layoutView.frameView()->horizontalScrollbar(), context, clip); |
+ paintScrollbar(m_layoutView.frameView()->horizontalScrollbar(), context, *clip); |
else if (graphicsLayer == layerForVerticalScrollbar()) |
- paintScrollbar(m_layoutView.frameView()->verticalScrollbar(), context, clip); |
+ paintScrollbar(m_layoutView.frameView()->verticalScrollbar(), context, *clip); |
else if (graphicsLayer == layerForScrollCorner()) |
- FramePainter(*m_layoutView.frameView()).paintScrollCorner(&context, clip); |
-} |
- |
-void PaintLayerCompositor::paintContentsIfNeeded(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase phase) const |
-{ |
- paintContents(graphicsLayer, context, phase, IntRect()); |
+ FramePainter(*m_layoutView.frameView()).paintScrollCorner(&context, *clip); |
} |
bool PaintLayerCompositor::supportsFixedRootBackgroundCompositing() const |