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

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

Issue 1376523002: Support 'pathLength' for stroking operations on <path> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove double space Created 4 years, 10 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
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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698