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

Unified Diff: Source/platform/scroll/ScrollbarTheme.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/ScrollbarTheme.cpp
diff --git a/Source/platform/scroll/ScrollbarTheme.cpp b/Source/platform/scroll/ScrollbarTheme.cpp
index 71eb81f8d67906f2812518b444d528f38669c043..a74393eb342882f277b58b0a4399d938fae14aee 100644
--- a/Source/platform/scroll/ScrollbarTheme.cpp
+++ b/Source/platform/scroll/ScrollbarTheme.cpp
@@ -215,10 +215,10 @@ void ScrollbarTheme::paintScrollCorner(GraphicsContext* context, const DisplayIt
if (cornerRect.isEmpty())
return;
- DrawingRecorder recorder(*context, displayItemClient, DisplayItem::ScrollbarCorner, cornerRect);
- if (recorder.canUseCachedDrawing())
+ if (DrawingRecorder::useCachedDrawingIfPossible(*context, displayItemClient, DisplayItem::ScrollbarCorner))
return;
+ DrawingRecorder recorder(*context, displayItemClient, DisplayItem::ScrollbarCorner, cornerRect);
#if OS(MACOSX)
context->fillRect(cornerRect, Color::white);
#else

Powered by Google App Engine
This is Rietveld 408576698