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

Unified Diff: Source/platform/scroll/ScrollbarThemeNonMacCommon.cpp

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix some !'s and &&'s. De Morgan would be proud. Created 5 years, 6 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/ScrollbarThemeNonMacCommon.cpp
diff --git a/Source/platform/scroll/ScrollbarThemeNonMacCommon.cpp b/Source/platform/scroll/ScrollbarThemeNonMacCommon.cpp
index 6e3d3f04a80adf06499477bb272374520f8c71e8..0e53c351a8dbfd144ed68289a7b87ad11117170f 100644
--- a/Source/platform/scroll/ScrollbarThemeNonMacCommon.cpp
+++ b/Source/platform/scroll/ScrollbarThemeNonMacCommon.cpp
@@ -107,10 +107,10 @@ void ScrollbarThemeNonMacCommon::paintTickmarks(GraphicsContext* context, Scroll
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);
GraphicsContextStateSaver stateSaver(*context);
context->setShouldAntialias(false);

Powered by Google App Engine
This is Rietveld 408576698