Index: Source/core/paint/VideoPainter.cpp |
diff --git a/Source/core/paint/VideoPainter.cpp b/Source/core/paint/VideoPainter.cpp |
index bf00db6f7cde27016b8dfa5c8aa99a44b3b2cd46..ecb9949b8754a2887d8cd78fe8d51fed9e507d72 100644 |
--- a/Source/core/paint/VideoPainter.cpp |
+++ b/Source/core/paint/VideoPainter.cpp |
@@ -28,13 +28,13 @@ void VideoPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint& |
return; |
rect.moveBy(paintOffset); |
- LayoutRect contentRect = m_layoutVideo.contentBoxRect(); |
- contentRect.moveBy(paintOffset); |
GraphicsContext* context = paintInfo.context; |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, m_layoutVideo, paintInfo.phase)) |
+ return; |
+ LayoutRect contentRect = m_layoutVideo.contentBoxRect(); |
+ contentRect.moveBy(paintOffset); |
LayoutObjectDrawingRecorder drawingRecorder(*context, m_layoutVideo, paintInfo.phase, contentRect); |
- if (drawingRecorder.canUseCachedDrawing()) |
- return; |
bool clip = !contentRect.contains(rect); |
if (clip) { |