Index: Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
diff --git a/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp b/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
index 9e86707434e257940d82b03f430f1e0ba620ac41..93d8c4524609958083a954a31ffb9f2ccec9e3b6 100644 |
--- a/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
+++ b/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp |
@@ -52,18 +52,17 @@ namespace { |
void drawNothing(GraphicsContext& context, const LayoutView& layoutView, PaintPhase phase, const FloatRect& bound) |
{ |
- LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound); |
- |
- // Redundant when there's nothing to draw but we must always do this check. |
- if (drawingRecorder.canUseCachedDrawing()) |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutView, phase)) |
return; |
+ |
+ LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound); |
} |
void drawRect(GraphicsContext& context, LayoutView& layoutView, PaintPhase phase, const FloatRect& bound) |
{ |
- LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound); |
- if (drawingRecorder.canUseCachedDrawing()) |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutView, phase)) |
return; |
+ LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound); |
IntRect rect(0, 0, 10, 10); |
context.drawRect(rect); |
} |