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

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

Issue 802833003: Remove the SVG paint culling optimization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove spurious lines 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/SVGTextPainter.cpp
diff --git a/Source/core/paint/SVGTextPainter.cpp b/Source/core/paint/SVGTextPainter.cpp
index 5c80177165e5aa16d99883d9556de86be56264b0..1550b2936d64466715e46391ae02f6b41fbda06f 100644
--- a/Source/core/paint/SVGTextPainter.cpp
+++ b/Source/core/paint/SVGTextPainter.cpp
@@ -22,6 +22,12 @@ void SVGTextPainter::paint(const PaintInfo& paintInfo)
blockInfo.applyTransform(m_renderSVGText.localToParentTransform(), &stateSaver);
+ // When transitioning from SVG to block painters we need to keep the PaintInfo rect up-to-date
+ // because it can be used for clipping.
+ AffineTransform transformToRoot = m_renderSVGText.cachedPaintInvalidationTransform() * m_renderSVGText.localToParentTransform();
fs 2014/12/17 10:16:10 Nit: Same as for fO. (Would it make sense to move
pdr. 2014/12/18 22:22:40 Good idea. Done.
+ if (blockInfo.rect != LayoutRect::infiniteRect())
+ blockInfo.rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(blockInfo.rect)));
+
BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint());
// Paint the outlines, if any

Powered by Google App Engine
This is Rietveld 408576698