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

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

Issue 1319893002: Make classes and structures in core/paint fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 #ifndef SVGShapePainter_h 5 #ifndef SVGShapePainter_h
6 #define SVGShapePainter_h 6 #define SVGShapePainter_h
7 7
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "wtf/Allocator.h"
9 10
10 class SkPaint; 11 class SkPaint;
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class FloatRect; 15 class FloatRect;
15 struct MarkerPosition; 16 struct MarkerPosition;
16 struct PaintInfo; 17 struct PaintInfo;
17 class FloatPoint; 18 class FloatPoint;
18 class GraphicsContext; 19 class GraphicsContext;
19 class LayoutSVGResourceMarker; 20 class LayoutSVGResourceMarker;
20 class LayoutSVGShape; 21 class LayoutSVGShape;
21 22
22 class SVGShapePainter { 23 class SVGShapePainter {
24 STACK_ALLOCATED();
23 public: 25 public:
24 SVGShapePainter(LayoutSVGShape& layoutSVGShape) : m_layoutSVGShape(layoutSVG Shape) { } 26 SVGShapePainter(LayoutSVGShape& layoutSVGShape) : m_layoutSVGShape(layoutSVG Shape) { }
25 27
26 void paint(const PaintInfo&); 28 void paint(const PaintInfo&);
27 29
28 private: 30 private:
29 void fillShape(GraphicsContext*, const SkPaint&, SkPath::FillType); 31 void fillShape(GraphicsContext*, const SkPaint&, SkPath::FillType);
30 void strokeShape(GraphicsContext*, const SkPaint&); 32 void strokeShape(GraphicsContext*, const SkPaint&);
31 33
32 void paintMarkers(const PaintInfo&, const FloatRect& boundingBox); 34 void paintMarkers(const PaintInfo&, const FloatRect& boundingBox);
33 void paintMarker(const PaintInfo&, LayoutSVGResourceMarker&, const MarkerPos ition&, float); 35 void paintMarker(const PaintInfo&, LayoutSVGResourceMarker&, const MarkerPos ition&, float);
34 void strokeZeroLengthLineCaps(GraphicsContext*, const SkPaint&); 36 void strokeZeroLengthLineCaps(GraphicsContext*, const SkPaint&);
35 37
36 LayoutSVGShape& m_layoutSVGShape; 38 LayoutSVGShape& m_layoutSVGShape;
37 }; 39 };
38 40
39 } // namespace blink 41 } // namespace blink
40 42
41 #endif // SVGShapePainter_h 43 #endif // SVGShapePainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698