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/PartPainter.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/PartPainter.cpp
diff --git a/Source/core/paint/PartPainter.cpp b/Source/core/paint/PartPainter.cpp
index 8eba600cf3bd8803d8cdc048a2f848ac0a0a21e4..e3f28fdd2a9a53ce947fa5c3d13c7a6f98175f2b 100644
--- a/Source/core/paint/PartPainter.cpp
+++ b/Source/core/paint/PartPainter.cpp
@@ -37,7 +37,7 @@ void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
visualOverflowRect.moveBy(adjustedPaintOffset);
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && m_layoutPart.style()->hasOutline())
- ObjectPainter(m_layoutPart).paintOutline(paintInfo, borderRect, visualOverflowRect);
+ ObjectPainter(m_layoutPart).paintOutline(paintInfo, borderRect, visualOverflowRect, adjustedPaintOffset);
if (paintInfo.phase != PaintPhaseForeground)
return;
@@ -63,11 +63,11 @@ void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
}
// Paint a partially transparent wash over selected widgets.
- if (m_layoutPart.isSelected() && !paintInfo.isPrinting() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutPart, paintInfo.phase)) {
+ if (m_layoutPart.isSelected() && !paintInfo.isPrinting() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutPart, paintInfo.phase, adjustedPaintOffset)) {
LayoutRect rect = m_layoutPart.localSelectionRect();
rect.moveBy(adjustedPaintOffset);
IntRect selectionRect = pixelSnappedIntRect(rect);
- LayoutObjectDrawingRecorder drawingRecorder(*paintInfo.context, m_layoutPart, paintInfo.phase, selectionRect);
+ LayoutObjectDrawingRecorder drawingRecorder(*paintInfo.context, m_layoutPart, paintInfo.phase, selectionRect, adjustedPaintOffset);
paintInfo.context->fillRect(selectionRect, m_layoutPart.selectionBackgroundColor());
}

Powered by Google App Engine
This is Rietveld 408576698