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

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

Issue 1755853002: Remove old paint offset caching code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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/paint/BlockPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
index 08e2e24f9a16c66c87bdebba0e933d65eaa35db1..189d4a9b2aeacd16d9adbe1218656256370c2ad9 100644
--- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
@@ -128,17 +128,6 @@ void BlockPainter::paintInlineBox(const InlineBox& inlineBox, const PaintInfo& p
void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && m_layoutBlock.childrenInline() && !paintInfo.context.paintController().skippingCache()) {
- if (m_layoutBlock.paintOffsetChanged(paintOffset)) {
- LineBoxListPainter(m_layoutBlock.lineBoxes()).invalidateLineBoxPaintOffsets(paintInfo);
- paintInfo.context.paintController().invalidatePaintOffset(m_layoutBlock);
- }
- // Set previousPaintOffset here in case that m_layoutBlock paints nothing and no
- // LayoutObjectDrawingRecorder updates its previousPaintOffset.
- // TODO(wangxianzhu): Integrate paint offset checking into new paint invalidation.
- m_layoutBlock.getMutableForPainting().setPreviousPaintOffset(paintOffset);
- }
-
const PaintPhase paintPhase = paintInfo.phase;
if (shouldPaintSelfBlockBackground(paintPhase)) {
@@ -195,10 +184,10 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa
// If the caret's node's layout object's containing block is this block, and the paint action is PaintPhaseForeground,
// then paint the caret.
- if (paintPhase == PaintPhaseForeground && m_layoutBlock.hasCaret() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutBlock, DisplayItem::Caret, paintOffset)) {
+ if (paintPhase == PaintPhaseForeground && m_layoutBlock.hasCaret() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutBlock, DisplayItem::Caret)) {
LayoutRect bounds = m_layoutBlock.visualOverflowRect();
bounds.moveBy(paintOffset);
- LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutBlock, DisplayItem::Caret, bounds, paintOffset);
+ LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutBlock, DisplayItem::Caret, bounds);
paintCarets(paintInfo, paintOffset);
}
}

Powered by Google App Engine
This is Rietveld 408576698