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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 1428643004: Repaint on interest rect change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableSyncPaint
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
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

Powered by Google App Engine
This is Rietveld 408576698