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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Non-scaling stroke needs to reset the transform b
ack to the host transform. | 86 // Non-scaling stroke needs to reset the transform b
ack to the host transform. |
87 additionalPaintServerTransform = &nonScalingTransfor
m; | 87 additionalPaintServerTransform = &nonScalingTransfor
m; |
88 } | 88 } |
89 | 89 |
90 SkPaint strokePaint; | 90 SkPaint strokePaint; |
91 if (!SVGPaintContext::paintForLayoutObject(paintContext.
paintInfo(), m_layoutSVGShape.styleRef(), m_layoutSVGShape, ApplyToStrokeMode, s
trokePaint, additionalPaintServerTransform)) | 91 if (!SVGPaintContext::paintForLayoutObject(paintContext.
paintInfo(), m_layoutSVGShape.styleRef(), m_layoutSVGShape, ApplyToStrokeMode, s
trokePaint, additionalPaintServerTransform)) |
92 break; | 92 break; |
93 strokePaint.setAntiAlias(shouldAntiAlias); | 93 strokePaint.setAntiAlias(shouldAntiAlias); |
94 | 94 |
95 StrokeData strokeData; | 95 StrokeData strokeData; |
96 SVGLayoutSupport::applyStrokeStyleToStrokeData(strokeDat
a, m_layoutSVGShape.styleRef(), m_layoutSVGShape); | 96 SVGLayoutSupport::applyStrokeStyleToStrokeData(strokeDat
a, m_layoutSVGShape.styleRef(), m_layoutSVGShape, m_layoutSVGShape.dashScaleFact
or()); |
97 strokeData.setupPaint(&strokePaint); | 97 strokeData.setupPaint(&strokePaint); |
98 | 98 |
99 strokeShape(paintContext.paintInfo().context, strokePain
t); | 99 strokeShape(paintContext.paintInfo().context, strokePain
t); |
100 } | 100 } |
101 break; | 101 break; |
102 case PT_MARKERS: | 102 case PT_MARKERS: |
103 paintMarkers(paintContext.paintInfo(), boundingBox); | 103 paintMarkers(paintContext.paintInfo(), boundingBox); |
104 break; | 104 break; |
105 default: | 105 default: |
106 ASSERT_NOT_REACHED(); | 106 ASSERT_NOT_REACHED(); |
(...skipping 111 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 |