Index: Source/core/paint/BoxPainter.cpp |
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp |
index 6044ebb7427cb00aaab132ea3bc1f481f32c6b15..ce09539312785250cfa6a991912f5b5ddea93855 100644 |
--- a/Source/core/paint/BoxPainter.cpp |
+++ b/Source/core/paint/BoxPainter.cpp |
@@ -69,11 +69,13 @@ LayoutRect BoxPainter::boundsForDrawingRecorder(const LayoutPoint& paintOffset) |
void BoxPainter::paintBoxDecorationBackgroundWithRect(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const LayoutRect& paintRect) |
{ |
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderBox, paintInfo.phase, boundsForDrawingRecorder(paintOffset)); |
+ if (recorder.canUseCachedDrawing()) |
+ return; |
+ |
RenderStyle* style = m_renderBox.style(); |
BoxDecorationData boxDecorationData(*style, m_renderBox.canRenderBorderImage(), m_renderBox.backgroundHasOpaqueTopLayer(), m_renderBox.backgroundShouldAlwaysBeClipped(), paintInfo.context); |
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderBox, paintInfo.phase, boundsForDrawingRecorder(paintOffset)); |
- |
// FIXME: Should eventually give the theme control over whether the box shadow should paint, since controls could have |
// custom shadows of their own. |
if (!m_renderBox.boxShadowShouldBeAppliedToBackground(boxDecorationData.bleedAvoidance())) |