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

Unified Diff: Source/core/layout/LayoutTextControlSingleLine.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/layout/LayoutTextControlSingleLine.cpp
diff --git a/Source/core/layout/LayoutTextControlSingleLine.cpp b/Source/core/layout/LayoutTextControlSingleLine.cpp
index e5c9e5e56766beee07abe19e7882681457b35940..94827d4975153eba78161a27bb9b0f77f7a041a7 100644
--- a/Source/core/layout/LayoutTextControlSingleLine.cpp
+++ b/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -75,7 +75,7 @@ void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout
LayoutTextControl::paint(paintInfo, paintOffset);
if (paintInfo.phase == PaintPhaseBlockBackground && m_shouldDrawCapsLockIndicator) {
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, *this, paintInfo.phase))
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, *this, paintInfo.phase, paintOffset))
return;
LayoutRect contentsRect = contentBoxRect();
@@ -89,7 +89,7 @@ void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout
// Convert the rect into the coords used for painting the content
contentsRect.moveBy(paintOffset + location());
IntRect snappedRect = pixelSnappedIntRect(contentsRect);
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, *this, paintInfo.phase, snappedRect);
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, *this, paintInfo.phase, snappedRect, paintOffset);
LayoutTheme::theme().painter().paintCapsLockIndicator(this, paintInfo, snappedRect);
}
}

Powered by Google App Engine
This is Rietveld 408576698