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 c7c3029150c9625c1acbc6f9ecb6ae0a7926e62c..b814f7866fbcfeb5c7b825102074bc7d9bfbf0db 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
@@ -800,19 +800,21 @@ static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context, |
scrollbar->paint(&context, CullRect(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 |