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

Side by Side Diff: Source/core/paint/SVGShapePainter.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/SVGPaintContext.cpp ('k') | Source/core/paint/TableCellPainter.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/SVGShapePainter.h" 6 #include "core/paint/SVGShapePainter.h"
7 7
8 #include "core/layout/PaintInfo.h" 8 #include "core/layout/PaintInfo.h"
9 #include "core/layout/svg/LayoutSVGPath.h" 9 #include "core/layout/svg/LayoutSVGPath.h"
10 #include "core/layout/svg/LayoutSVGResourceMarker.h" 10 #include "core/layout/svg/LayoutSVGResourceMarker.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 PaintInfo paintInfoBeforeFiltering(paintInfo); 55 PaintInfo paintInfoBeforeFiltering(paintInfo);
56 FloatRect boundingBox = m_renderSVGShape.paintInvalidationRectInLocalCoordin ates(); 56 FloatRect boundingBox = m_renderSVGShape.paintInvalidationRectInLocalCoordin ates();
57 57
58 TransformRecorder transformRecorder(*paintInfoBeforeFiltering.context, m_ren derSVGShape, m_renderSVGShape.localTransform()); 58 TransformRecorder transformRecorder(*paintInfoBeforeFiltering.context, m_ren derSVGShape, m_renderSVGShape.localTransform());
59 { 59 {
60 SVGPaintContext paintContext(m_renderSVGShape, paintInfoBeforeFiltering) ; 60 SVGPaintContext paintContext(m_renderSVGShape, paintInfoBeforeFiltering) ;
61 if (paintContext.applyClipMaskAndFilterIfNecessary()) { 61 if (paintContext.applyClipMaskAndFilterIfNecessary()) {
62 LayoutObjectDrawingRecorder recorder(paintContext.paintInfo().contex t, m_renderSVGShape, paintContext.paintInfo().phase, boundingBox); 62 LayoutObjectDrawingRecorder recorder(paintContext.paintInfo().contex t, m_renderSVGShape, paintContext.paintInfo().phase, boundingBox);
63 if (!recorder.canUseCachedDrawing()) { 63 if (!recorder.canUseCachedDrawing()) {
64 const SVGLayoutStyle& svgStyle = m_renderSVGShape.style()->svgSt yle(); 64 const SVGComputedStyle& svgStyle = m_renderSVGShape.style()->svg Style();
65 65
66 bool shouldAntiAlias = svgStyle.shapeRendering() != SR_CRISPEDGE S; 66 bool shouldAntiAlias = svgStyle.shapeRendering() != SR_CRISPEDGE S;
67 // We're munging GC paint attributes without saving first (and s o does 67 // We're munging GC paint attributes without saving first (and s o does
68 // updateGraphicsContext below). This is in line with making GC less stateful, 68 // updateGraphicsContext below). This is in line with making GC less stateful,
69 // but we should keep an eye out for unintended side effects. 69 // but we should keep an eye out for unintended side effects.
70 // 70 //
71 // FIXME: the mutation avoidance check should be in (all) the GC setters. 71 // FIXME: the mutation avoidance check should be in (all) the GC setters.
72 if (shouldAntiAlias != paintContext.paintInfo().context->shouldA ntialias()) 72 if (shouldAntiAlias != paintContext.paintInfo().context->shouldA ntialias())
73 paintContext.paintInfo().context->setShouldAntialias(shouldA ntiAlias); 73 paintContext.paintInfo().context->setShouldAntialias(shouldA ntiAlias);
74 74
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 tempPath.clear(); 232 tempPath.clear();
233 if (m_renderSVGShape.style()->svgStyle().capStyle() == SquareCap) 233 if (m_renderSVGShape.style()->svgStyle().capStyle() == SquareCap)
234 tempPath.addRect(LayoutSVGPath::zeroLengthSubpathRect(linecapPosition, m _renderSVGShape.strokeWidth())); 234 tempPath.addRect(LayoutSVGPath::zeroLengthSubpathRect(linecapPosition, m _renderSVGShape.strokeWidth()));
235 else 235 else
236 tempPath.addEllipse(LayoutSVGPath::zeroLengthSubpathRect(linecapPosition , m_renderSVGShape.strokeWidth())); 236 tempPath.addEllipse(LayoutSVGPath::zeroLengthSubpathRect(linecapPosition , m_renderSVGShape.strokeWidth()));
237 237
238 return &tempPath; 238 return &tempPath;
239 } 239 }
240 240
241 } // namespace blink 241 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/SVGPaintContext.cpp ('k') | Source/core/paint/TableCellPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698