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 "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/LayoutSVGResourceMarker.h" | 10 #include "core/layout/svg/LayoutSVGResourceMarker.h" |
| 11 #include "core/layout/svg/LayoutSVGShape.h" |
10 #include "core/layout/svg/SVGLayoutSupport.h" | 12 #include "core/layout/svg/SVGLayoutSupport.h" |
11 #include "core/layout/svg/SVGMarkerData.h" | 13 #include "core/layout/svg/SVGMarkerData.h" |
12 #include "core/layout/svg/SVGResources.h" | 14 #include "core/layout/svg/SVGResources.h" |
13 #include "core/layout/svg/SVGResourcesCache.h" | 15 #include "core/layout/svg/SVGResourcesCache.h" |
14 #include "core/paint/GraphicsContextAnnotator.h" | 16 #include "core/paint/GraphicsContextAnnotator.h" |
15 #include "core/paint/ObjectPainter.h" | 17 #include "core/paint/ObjectPainter.h" |
16 #include "core/paint/RenderDrawingRecorder.h" | 18 #include "core/paint/RenderDrawingRecorder.h" |
17 #include "core/paint/SVGContainerPainter.h" | 19 #include "core/paint/SVGContainerPainter.h" |
18 #include "core/paint/SVGPaintContext.h" | 20 #include "core/paint/SVGPaintContext.h" |
19 #include "core/paint/TransformRecorder.h" | 21 #include "core/paint/TransformRecorder.h" |
20 #include "core/rendering/svg/RenderSVGPath.h" | |
21 #include "core/rendering/svg/RenderSVGShape.h" | |
22 #include "platform/graphics/paint/DisplayItemList.h" | 22 #include "platform/graphics/paint/DisplayItemList.h" |
23 #include "third_party/skia/include/core/SkPicture.h" | 23 #include "third_party/skia/include/core/SkPicture.h" |
24 | 24 |
25 namespace blink { | 25 namespace blink { |
26 | 26 |
27 static bool setupNonScalingStrokeContext(AffineTransform& strokeTransform, Graph
icsContextStateSaver& stateSaver) | 27 static bool setupNonScalingStrokeContext(AffineTransform& strokeTransform, Graph
icsContextStateSaver& stateSaver) |
28 { | 28 { |
29 if (!strokeTransform.isInvertible()) | 29 if (!strokeTransform.isInvertible()) |
30 return false; | 30 return false; |
31 | 31 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 context->fillPath(*usePath); | 225 context->fillPath(*usePath); |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 Path* SVGShapePainter::zeroLengthLinecapPath(const FloatPoint& linecapPosition)
const | 229 Path* SVGShapePainter::zeroLengthLinecapPath(const FloatPoint& linecapPosition)
const |
230 { | 230 { |
231 DEFINE_STATIC_LOCAL(Path, tempPath, ()); | 231 DEFINE_STATIC_LOCAL(Path, tempPath, ()); |
232 | 232 |
233 tempPath.clear(); | 233 tempPath.clear(); |
234 if (m_renderSVGShape.style()->svgStyle().capStyle() == SquareCap) | 234 if (m_renderSVGShape.style()->svgStyle().capStyle() == SquareCap) |
235 tempPath.addRect(RenderSVGPath::zeroLengthSubpathRect(linecapPosition, m
_renderSVGShape.strokeWidth())); | 235 tempPath.addRect(LayoutSVGPath::zeroLengthSubpathRect(linecapPosition, m
_renderSVGShape.strokeWidth())); |
236 else | 236 else |
237 tempPath.addEllipse(RenderSVGPath::zeroLengthSubpathRect(linecapPosition
, m_renderSVGShape.strokeWidth())); | 237 tempPath.addEllipse(LayoutSVGPath::zeroLengthSubpathRect(linecapPosition
, m_renderSVGShape.strokeWidth())); |
238 | 238 |
239 return &tempPath; | 239 return &tempPath; |
240 } | 240 } |
241 | 241 |
242 } // namespace blink | 242 } // namespace blink |
OLD | NEW |