OLD | NEW |
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 "core/paint/SVGShapePainter.h" | 5 #include "core/paint/SVGShapePainter.h" |
6 | 6 |
7 #include "core/layout/svg/LayoutSVGResourceMarker.h" | 7 #include "core/layout/svg/LayoutSVGResourceMarker.h" |
8 #include "core/layout/svg/LayoutSVGShape.h" | 8 #include "core/layout/svg/LayoutSVGShape.h" |
9 #include "core/layout/svg/SVGLayoutSupport.h" | 9 #include "core/layout/svg/SVGLayoutSupport.h" |
10 #include "core/layout/svg/SVGMarkerData.h" | 10 #include "core/layout/svg/SVGMarkerData.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 default: | 105 default: |
106 ASSERT_NOT_REACHED(); | 106 ASSERT_NOT_REACHED(); |
107 break; | 107 break; |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 if (m_layoutSVGShape.style()->outlineWidth()) { | 113 if (m_layoutSVGShape.style()->outlineWidth()) { |
114 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); | 114 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); |
115 outlinePaintInfo.phase = PaintPhaseSelfOutline; | 115 outlinePaintInfo.phase = PaintPhaseSelfOutlineOnly; |
116 ObjectPainter(m_layoutSVGShape).paintOutline(outlinePaintInfo, LayoutPoi
nt(boundingBox.location())); | 116 ObjectPainter(m_layoutSVGShape).paintOutline(outlinePaintInfo, LayoutPoi
nt(boundingBox.location())); |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 class PathWithTemporaryWindingRule { | 120 class PathWithTemporaryWindingRule { |
121 public: | 121 public: |
122 PathWithTemporaryWindingRule(Path& path, SkPath::FillType fillType) | 122 PathWithTemporaryWindingRule(Path& path, SkPath::FillType fillType) |
123 : m_path(const_cast<SkPath&>(path.skPath())) | 123 : m_path(const_cast<SkPath&>(path.skPath())) |
124 { | 124 { |
125 m_savedFillType = m_path.getFillType(); | 125 m_savedFillType = m_path.getFillType(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 return; | 218 return; |
219 | 219 |
220 TransformRecorder transformRecorder(paintInfo.context, marker, marker.marker
Transformation(position.origin, position.angle, strokeWidth)); | 220 TransformRecorder transformRecorder(paintInfo.context, marker, marker.marker
Transformation(position.origin, position.angle, strokeWidth)); |
221 Optional<FloatClipRecorder> clipRecorder; | 221 Optional<FloatClipRecorder> clipRecorder; |
222 if (SVGLayoutSupport::isOverflowHidden(&marker)) | 222 if (SVGLayoutSupport::isOverflowHidden(&marker)) |
223 clipRecorder.emplace(paintInfo.context, marker, paintInfo.phase, marker.
viewport()); | 223 clipRecorder.emplace(paintInfo.context, marker, paintInfo.phase, marker.
viewport()); |
224 SVGContainerPainter(marker).paint(paintInfo); | 224 SVGContainerPainter(marker).paint(paintInfo); |
225 } | 225 } |
226 | 226 |
227 } // namespace blink | 227 } // namespace blink |
OLD | NEW |