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

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

Issue 1197843004: Allocate a drawing recorder locally to BoxPainter code in the mask phase. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/ReplacedPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxPainter.cpp
diff --git a/Source/core/paint/BoxPainter.cpp b/Source/core/paint/BoxPainter.cpp
index 160934f6c864c0aa4a631263a67ee4fc20b294f3..ceb004bef5a509b98bd38200bf42bf310e23299c 100644
--- a/Source/core/paint/BoxPainter.cpp
+++ b/Source/core/paint/BoxPainter.cpp
@@ -519,9 +519,14 @@ void BoxPainter::paintFillLayerExtended(LayoutBoxModelObject& obj, const PaintIn
void BoxPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
+ LayoutRect visualOverflowRect(m_layoutBox.visualOverflowRect());
+ visualOverflowRect.moveBy(paintOffset);
+
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutBox, paintInfo.phase, visualOverflowRect);
+ if (recorder.canUseCachedDrawing())
wkorman 2015/06/19 23:20:43 Could also just add this to the three bail-out con
chrishtr 2015/06/20 02:22:45 I prefer separate, to make it clear we are checkin
+ return;
if (!paintInfo.shouldPaintWithinRoot(&m_layoutBox) || m_layoutBox.style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
return;
-
LayoutRect paintRect = LayoutRect(paintOffset, m_layoutBox.size());
paintMaskImages(paintInfo, paintRect);
}
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/ReplacedPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698