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

Unified Diff: Source/core/layout/LayoutScrollbarTheme.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 | « no previous file | Source/core/layout/LayoutTextControlSingleLine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutScrollbarTheme.cpp
diff --git a/Source/core/layout/LayoutScrollbarTheme.cpp b/Source/core/layout/LayoutScrollbarTheme.cpp
index bb70cc78b57392071cd0162589acfa797b723074..a30eb91d994606244b3779a0c64d65c640444c97 100644
--- a/Source/core/layout/LayoutScrollbarTheme.cpp
+++ b/Source/core/layout/LayoutScrollbarTheme.cpp
@@ -113,10 +113,12 @@ IntRect LayoutScrollbarTheme::constrainTrackRectToTrackPieces(ScrollbarThemeClie
void LayoutScrollbarTheme::paintScrollCorner(GraphicsContext* context, const DisplayItemClientWrapper& displayItemClient, const IntRect& cornerRect)
{
+ if (DrawingRecorder::useCachedDrawingIfPossible(*context, displayItemClient, DisplayItem::ScrollbarCorner))
+ return;
+
DrawingRecorder recorder(*context, displayItemClient, DisplayItem::ScrollbarCorner, cornerRect);
// FIXME: Implement.
- if (!recorder.canUseCachedDrawing())
- context->fillRect(cornerRect, Color::white);
+ context->fillRect(cornerRect, Color::white);
}
void LayoutScrollbarTheme::paintScrollbarBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar)
« no previous file with comments | « no previous file | Source/core/layout/LayoutTextControlSingleLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698