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

Side by Side 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: Fix test for the moon lander. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/SVGShapePainter.cpp ('k') | Source/core/rendering/PaintInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/SVGTextPainter.h" 6 #include "core/paint/SVGTextPainter.h"
7 7
8 #include "core/paint/BlockPainter.h" 8 #include "core/paint/BlockPainter.h"
9 #include "core/rendering/PaintInfo.h" 9 #include "core/rendering/PaintInfo.h"
10 #include "core/rendering/svg/RenderSVGText.h" 10 #include "core/rendering/svg/RenderSVGText.h"
11 #include "platform/graphics/GraphicsContextStateSaver.h" 11 #include "platform/graphics/GraphicsContextStateSaver.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 void SVGTextPainter::paint(const PaintInfo& paintInfo) 15 void SVGTextPainter::paint(const PaintInfo& paintInfo)
16 { 16 {
17 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection) 17 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection)
18 return; 18 return;
19 19
20 PaintInfo blockInfo(paintInfo); 20 PaintInfo blockInfo(paintInfo);
21 GraphicsContextStateSaver stateSaver(*blockInfo.context, false); 21 GraphicsContextStateSaver stateSaver(*blockInfo.context, false);
22 22
23 blockInfo.applyTransform(m_renderSVGText.localToParentTransform(), &stateSav er); 23 blockInfo.applyTransform(m_renderSVGText.localToParentTransform(), &stateSav er);
24 24
25 // When transitioning from SVG to block painters we need to keep the PaintIn fo rect up-to-date
26 // because it can be used for clipping.
27 m_renderSVGText.updatePaintInfoRect(blockInfo.rect);
28
25 BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint()); 29 BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint());
26 30
27 // Paint the outlines, if any 31 // Paint the outlines, if any
28 if (paintInfo.phase == PaintPhaseForeground) { 32 if (paintInfo.phase == PaintPhaseForeground) {
29 blockInfo.phase = PaintPhaseSelfOutline; 33 blockInfo.phase = PaintPhaseSelfOutline;
30 BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint()); 34 BlockPainter(m_renderSVGText).paint(blockInfo, LayoutPoint());
31 } 35 }
32 } 36 }
33 37
34 } // namespace blink 38 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/SVGShapePainter.cpp ('k') | Source/core/rendering/PaintInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698