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

Unified Diff: Source/platform/scroll/ScrollbarThemeMacCommon.mm

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 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/platform/scroll/ScrollbarThemeMacCommon.mm
diff --git a/Source/platform/scroll/ScrollbarThemeMacCommon.mm b/Source/platform/scroll/ScrollbarThemeMacCommon.mm
index 40a8c8721ebe3f59f9f3add4747ffba5c0de08ba..7fe83e932946fadeced1b4fbe290b844e03ccd36 100644
--- a/Source/platform/scroll/ScrollbarThemeMacCommon.mm
+++ b/Source/platform/scroll/ScrollbarThemeMacCommon.mm
@@ -151,10 +151,11 @@ void ScrollbarThemeMacCommon::paintTickmarks(GraphicsContext* context, Scrollbar
if (!tickmarks.size())
return;
- DrawingRecorder recorder(*context, *scrollbar, DisplayItem::ScrollbarTickmarks, rect);
- if (recorder.canUseCachedDrawing())
+ if (DrawingRecorder::useCachedDrawingIfPossible(*context, *scrollbar, DisplayItem::ScrollbarTickmarks))
return;
+ DrawingRecorder recorder(*context, *scrollbar, DisplayItem::ScrollbarTickmarks, rect);
+
// Inset a bit.
IntRect tickmarkTrackRect = rect;
tickmarkTrackRect.setX(tickmarkTrackRect.x() + 1);
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeAura.cpp ('k') | Source/platform/scroll/ScrollbarThemeMacNonOverlayAPI.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698