| Index: Source/platform/scroll/ScrollbarThemeAura.cpp
|
| diff --git a/Source/platform/scroll/ScrollbarThemeAura.cpp b/Source/platform/scroll/ScrollbarThemeAura.cpp
|
| index 9354c27f7db73c4f311ebbd1693b9b1c6011dd02..09190ff1e700d07ae8c91efa9dc6a71195e4efcd 100644
|
| --- a/Source/platform/scroll/ScrollbarThemeAura.cpp
|
| +++ b/Source/platform/scroll/ScrollbarThemeAura.cpp
|
| @@ -72,15 +72,17 @@ int ScrollbarThemeAura::scrollbarThickness(ScrollbarControlSize controlSize)
|
|
|
| void ScrollbarThemeAura::paintTrackPiece(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart partType)
|
| {
|
| + DisplayItem::Type displayItemType = trackPiecePartToDisplayItemType(partType);
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*gc, *scrollbar, displayItemType))
|
| + return;
|
| +
|
| + DrawingRecorder recorder(*gc, *scrollbar, displayItemType, rect);
|
| +
|
| WebThemeEngine::State state = scrollbar->hoveredPart() == partType ? WebThemeEngine::StateHover : WebThemeEngine::StateNormal;
|
|
|
| if (useMockTheme() && !scrollbar->enabled())
|
| state = WebThemeEngine::StateDisabled;
|
|
|
| - DrawingRecorder recorder(*gc, *scrollbar, trackPiecePartToDisplayItemType(partType), rect);
|
| - if (recorder.canUseCachedDrawing())
|
| - return;
|
| -
|
| IntRect alignRect = trackRect(scrollbar, false);
|
| WebThemeEngine::ExtraParams extraParams;
|
| extraParams.scrollbarTrack.isBack = (partType == BackTrackPart);
|
| @@ -120,10 +122,12 @@ void ScrollbarThemeAura::paintButton(GraphicsContext* gc, ScrollbarThemeClient*
|
| }
|
| }
|
|
|
| - DrawingRecorder recorder(*gc, *scrollbar, buttonPartToDisplayItemType(part), rect);
|
| - if (recorder.canUseCachedDrawing())
|
| + DisplayItem::Type displayItemType = buttonPartToDisplayItemType(part);
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*gc, *scrollbar, displayItemType))
|
| return;
|
|
|
| + DrawingRecorder recorder(*gc, *scrollbar, displayItemType, rect);
|
| +
|
| if (useMockTheme() && !scrollbar->enabled()) {
|
| state = WebThemeEngine::StateDisabled;
|
| } else if (!useMockTheme() && ((checkMin && (scrollbar->currentPos() <= 0))
|
| @@ -140,10 +144,11 @@ void ScrollbarThemeAura::paintButton(GraphicsContext* gc, ScrollbarThemeClient*
|
|
|
| void ScrollbarThemeAura::paintThumb(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect)
|
| {
|
| - DrawingRecorder recorder(*gc, *scrollbar, DisplayItem::ScrollbarThumb, rect);
|
| - if (recorder.canUseCachedDrawing())
|
| + if (DrawingRecorder::useCachedDrawingIfPossible(*gc, *scrollbar, DisplayItem::ScrollbarThumb))
|
| return;
|
|
|
| + DrawingRecorder recorder(*gc, *scrollbar, DisplayItem::ScrollbarThumb, rect);
|
| +
|
| WebThemeEngine::State state;
|
| WebCanvas* canvas = gc->canvas();
|
| if (scrollbar->pressedPart() == ThumbPart)
|
|
|