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

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

Issue 1441973003: Use recomputed interest rect only if it changed enough (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix release builds Created 5 years, 1 month 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 aa46e43940742b229900fa201650938a29b61626..9da22566895ffbc48af7b3532a3e9ad083fbabc9 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -800,21 +800,19 @@ 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
+IntRect PaintLayerCompositor::computeInterestRect(const GraphicsLayer* graphicsLayer, const IntRect&) const
{
- IntRect defaultClip;
- if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled() && !clip) {
- defaultClip.setSize(m_layoutView.layoutSize(IncludeScrollbars));
- clip = &defaultClip;
- }
- ASSERT(clip);
+ return IntRect(IntPoint(), m_layoutView.layoutSize(IncludeScrollbars));
+}
+void PaintLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect& interestRect) const
+{
if (graphicsLayer == layerForHorizontalScrollbar())
- paintScrollbar(m_layoutView.frameView()->horizontalScrollbar(), context, *clip);
+ paintScrollbar(m_layoutView.frameView()->horizontalScrollbar(), context, interestRect);
else if (graphicsLayer == layerForVerticalScrollbar())
- paintScrollbar(m_layoutView.frameView()->verticalScrollbar(), context, *clip);
+ paintScrollbar(m_layoutView.frameView()->verticalScrollbar(), context, interestRect);
else if (graphicsLayer == layerForScrollCorner())
- FramePainter(*m_layoutView.frameView()).paintScrollCorner(&context, *clip);
+ FramePainter(*m_layoutView.frameView()).paintScrollCorner(&context, interestRect);
}
bool PaintLayerCompositor::supportsFixedRootBackgroundCompositing() const
@@ -1184,7 +1182,7 @@ DocumentLifecycle& PaintLayerCompositor::lifecycle() const
return m_layoutView.document().lifecycle();
}
-String PaintLayerCompositor::debugName(const GraphicsLayer* graphicsLayer)
+String PaintLayerCompositor::debugName(const GraphicsLayer* graphicsLayer) const
{
String name;
if (graphicsLayer == m_rootContentLayer.get()) {

Powered by Google App Engine
This is Rietveld 408576698