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

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

Issue 1315993004: Implement a paint offset cache for slimming paint v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
Index: Source/core/paint/BlockFlowPainter.cpp
diff --git a/Source/core/paint/BlockFlowPainter.cpp b/Source/core/paint/BlockFlowPainter.cpp
index ebdd561c8eec5f13ce2ae4cee0188fd7918e67c8..3ae78d194448c855bf67333d470bb1c6663cfb0b 100644
--- a/Source/core/paint/BlockFlowPainter.cpp
+++ b/Source/core/paint/BlockFlowPainter.cpp
@@ -64,11 +64,11 @@ void BlockFlowPainter::paintSelection(const PaintInfo& paintInfo, const LayoutPo
// Only create a DrawingRecorder and ClipScope if skipRecording is false. This logic is needed
// because selectionGaps(...) needs to be called even when we do not record.
- bool skipRecording = LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap);
- Optional<DrawingRecorder> drawingRecorder;
+ bool skipRecording = LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap, paintOffset);
Xianzhu 2015/08/27 17:20:10 I remember your idea of DrawingParameters when add
pdr. 2015/08/28 03:31:41 I'm afraid I don't remember what DrawingParameters
Xianzhu 2015/08/28 03:59:00 It is actually DrawingRecorderCacheParameters whic
+ Optional<LayoutObjectDrawingRecorder> drawingRecorder;
Optional<ClipScope> clipScope;
if (!skipRecording) {
- drawingRecorder.emplace(*paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap, FloatRect(bounds));
+ drawingRecorder.emplace(*paintInfo.context, m_layoutBlockFlow, DisplayItem::SelectionGap, FloatRect(bounds), paintOffset);
clipScope.emplace(paintInfo.context);
}

Powered by Google App Engine
This is Rietveld 408576698