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

Unified Diff: Source/core/paint/BlockPainter.cpp

Issue 1315213002: (WIP) Paint invalidation for slimming paint v2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/paint/PaintPhase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BlockPainter.cpp
diff --git a/Source/core/paint/BlockPainter.cpp b/Source/core/paint/BlockPainter.cpp
index 7e38f20f45d8223a1dd554ac18c686e4adbddf35..47d7dc99fdcb944b05b8fbd7c508d4ffa9f85c3c 100644
--- a/Source/core/paint/BlockPainter.cpp
+++ b/Source/core/paint/BlockPainter.cpp
@@ -28,6 +28,15 @@
namespace blink {
+static inline LayoutRect visualOverflowRectWithPaintOffset(const LayoutBlock& layoutBox, const LayoutPoint& paintOffset)
+{
+ if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
+ return LayoutRect();
+ LayoutRect bounds = layoutBox.visualOverflowRect();
+ bounds.moveBy(paintOffset);
+ return bounds;
+}
+
void BlockPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
PaintInfo localPaintInfo(paintInfo);
@@ -43,6 +52,9 @@ void BlockPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOff
if (!overflowBox.intersects(LayoutRect(localPaintInfo.rect)))
return;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ m_layoutBlock.invalidatePaintIfNeededForSlimmingPaintV2(adjustedPaintOffset);
+
SubtreeRecorder subtreeRecorder(*paintInfo.context, m_layoutBlock, paintInfo.phase);
if (subtreeRecorder.canUseCache())
return;
@@ -151,15 +163,6 @@ void BlockPainter::paintAsInlineBlock(LayoutObject& layoutObject, const PaintInf
}
}
-static inline LayoutRect visualOverflowRectWithPaintOffset(const LayoutBlock& layoutBox, const LayoutPoint& paintOffset)
-{
- if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
- return LayoutRect();
- LayoutRect bounds = layoutBox.visualOverflowRect();
- bounds.moveBy(paintOffset);
- return bounds;
-}
-
void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
const PaintPhase paintPhase = paintInfo.phase;
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/paint/PaintPhase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698