| Index: Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm
|
| diff --git a/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm b/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm
|
| index 829fb23bc947e20f5ed148ac91562739308b4384..f565bdbaa382b6280594746658727e87d269f2ee 100644
|
| --- a/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm
|
| +++ b/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm
|
| @@ -86,10 +86,11 @@ ScrollbarPainter ScrollbarThemeMacOverlayAPI::painterForScrollbar(ScrollbarTheme
|
| }
|
|
|
| void ScrollbarThemeMacOverlayAPI::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) {
|
| - DrawingRecorder recorder(*context, *scrollbar, DisplayItem::ScrollbarTrackBackground, rect);
|
| - if (recorder.canUseCachedDrawing())
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*context, *scrollbar, DisplayItem::ScrollbarTrackBackground))
|
| return;
|
|
|
| + DrawingRecorder recorder(*context, *scrollbar, DisplayItem::ScrollbarTrackBackground, rect);
|
| +
|
| ASSERT(isOverlayAPIAvailable());
|
|
|
| GraphicsContextStateSaver stateSaver(*context);
|
| @@ -106,12 +107,13 @@ void ScrollbarThemeMacOverlayAPI::paintTrackBackground(GraphicsContext* context,
|
| }
|
|
|
| void ScrollbarThemeMacOverlayAPI::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) {
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*context, *scrollbar, DisplayItem::ScrollbarThumb))
|
| + return;
|
| +
|
| // Expand dirty rect to allow for scroll thumb anti-aliasing in minimum thumb size case.
|
| IntRect dirtyRect = IntRect(rect);
|
| dirtyRect.inflate(1);
|
| DrawingRecorder recorder(*context, *scrollbar, DisplayItem::ScrollbarThumb, dirtyRect);
|
| - if (recorder.canUseCachedDrawing())
|
| - return;
|
|
|
| ASSERT(isOverlayAPIAvailable());
|
|
|
|
|