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

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

Issue 799563002: Use DrawingRecorder::canUseCachedDrawing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
« no previous file with comments | « no previous file | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BlockPainter.cpp
diff --git a/Source/core/paint/BlockPainter.cpp b/Source/core/paint/BlockPainter.cpp
index 69e1de607b0b216ae5ba535e96923ce4f68920f7..8b1b93a4b19a3f2fac0433cacce6685f1b73103b 100644
--- a/Source/core/paint/BlockPainter.cpp
+++ b/Source/core/paint/BlockPainter.cpp
@@ -177,14 +177,16 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa
}
if (paintPhase == PaintPhaseMask && m_renderBlock.style()->visibility() == VISIBLE) {
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase, bounds);
- m_renderBlock.paintMask(paintInfo, paintOffset);
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderBlock, paintPhase, bounds);
+ if (!recorder.canUseCachedDrawing())
+ m_renderBlock.paintMask(paintInfo, paintOffset);
return;
}
if (paintPhase == PaintPhaseClippingMask && m_renderBlock.style()->visibility() == VISIBLE) {
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase, bounds);
- m_renderBlock.paintClippingMask(paintInfo, paintOffset);
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderBlock, paintPhase, bounds);
+ if (!recorder.canUseCachedDrawing())
+ m_renderBlock.paintClippingMask(paintInfo, paintOffset);
return;
}
@@ -224,8 +226,9 @@ void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa
// If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground,
// then paint the caret.
if (paintPhase == PaintPhaseForeground) {
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderBlock, paintPhase, bounds);
- paintCarets(paintInfo, paintOffset);
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderBlock, paintPhase, bounds);
+ if (!recorder.canUseCachedDrawing())
+ paintCarets(paintInfo, paintOffset);
}
}
« no previous file with comments | « no previous file | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698