Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Unified Diff: Source/core/paint/InlineFlowBoxPainter.cpp

Issue 799563002: Use DrawingRecorder::canUseCachedDrawing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/InlineFlowBoxPainter.cpp
diff --git a/Source/core/paint/InlineFlowBoxPainter.cpp b/Source/core/paint/InlineFlowBoxPainter.cpp
index 928eb67b6092cc5e6b951433573193835869397e..4266da52af1660555b57d49762a18998b4b31e5a 100644
--- a/Source/core/paint/InlineFlowBoxPainter.cpp
+++ b/Source/core/paint/InlineFlowBoxPainter.cpp
@@ -61,8 +61,9 @@ void InlineFlowBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoint&
}
}
} else if (paintInfo.phase == PaintPhaseMask) {
- RenderDrawingRecorder recorder(paintInfo.context, &m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(overflowRect));
- paintMask(paintInfo, paintOffset);
+ RenderDrawingRecorder recorder(paintInfo.context, m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(overflowRect));
+ if (!recorder.canUseCachedDrawing())
+ paintMask(paintInfo, paintOffset);
return;
} else if (paintInfo.phase == PaintPhaseForeground) {
// Paint our background, border and box-shadow.
@@ -212,7 +213,9 @@ void InlineFlowBoxPainter::paintBoxDecorationBackground(const PaintInfo& paintIn
LayoutRect paintRect = LayoutRect(adjustedPaintOffset, frameRect.size());
- RenderDrawingRecorder recorder(paintInfo.context, &m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(paintRect));
+ RenderDrawingRecorder recorder(paintInfo.context, m_inlineFlowBox.renderer(), paintInfo.phase, pixelSnappedIntRect(paintRect));
+ if (recorder.canUseCachedDrawing())
+ return;
// Shadow comes first and is behind the background and border.
if (!m_inlineFlowBox.boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBleedNone, &m_inlineFlowBox))

Powered by Google App Engine
This is Rietveld 408576698