Index: Source/platform/graphics/GraphicsLayer.cpp |
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp |
index aa293079f3c08e1eb19ef284a47bd1d93323ca6c..d16aea9c1018e4fa0dcd9e3ba65cb7b1d326b256 100644 |
--- a/Source/platform/graphics/GraphicsLayer.cpp |
+++ b/Source/platform/graphics/GraphicsLayer.cpp |
@@ -288,9 +288,10 @@ void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const I |
if (m_displayItemList && contentsOpaque()) { |
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
FloatRect rect(FloatPoint(), size()); |
- DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect); |
- if (!recorder.canUseCachedDrawing()) |
+ if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, DisplayItem::DebugRedFill)) { |
+ DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect); |
context.fillRect(rect, SK_ColorRED); |
+ } |
} |
#endif |
m_client->paintContents(this, context, m_paintingPhase, clip); |