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

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: 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
« no previous file with comments | « Source/platform/graphics/paint/DrawingRecorder.cpp ('k') | Source/platform/scroll/ScrollbarThemeAura.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/platform/graphics/paint/DrawingRecorder.cpp ('k') | Source/platform/scroll/ScrollbarThemeAura.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698