OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrPath_DEFINED | 8 #ifndef GrPath_DEFINED |
9 #define GrPath_DEFINED | 9 #define GrPath_DEFINED |
10 | 10 |
11 #include "GrGpuObject.h" | 11 #include "GrGpuResource.h" |
12 #include "GrResourceCache.h" | 12 #include "GrResourceCache.h" |
13 #include "SkPath.h" | 13 #include "SkPath.h" |
14 #include "SkRect.h" | 14 #include "SkRect.h" |
15 #include "SkStrokeRec.h" | 15 #include "SkStrokeRec.h" |
16 | 16 |
17 class GrPath : public GrGpuObject { | 17 class GrPath : public GrGpuResource { |
18 public: | 18 public: |
19 SK_DECLARE_INST_COUNT(GrPath); | 19 SK_DECLARE_INST_COUNT(GrPath); |
20 | 20 |
21 /** | 21 /** |
22 * Initialize to a path with a fixed stroke. Stroke must not be hairline. | 22 * Initialize to a path with a fixed stroke. Stroke must not be hairline. |
23 */ | 23 */ |
24 GrPath(GrGpu* gpu, bool isWrapped, const SkPath& skPath, const SkStrokeRec&
stroke) | 24 GrPath(GrGpu* gpu, bool isWrapped, const SkPath& skPath, const SkStrokeRec&
stroke) |
25 : INHERITED(gpu, isWrapped), | 25 : INHERITED(gpu, isWrapped), |
26 fSkPath(skPath), | 26 fSkPath(skPath), |
27 fStroke(stroke), | 27 fStroke(stroke), |
(...skipping 10 matching lines...) Expand all Loading... |
38 const SkRect& getBounds() const { return fBounds; } | 38 const SkRect& getBounds() const { return fBounds; } |
39 | 39 |
40 const SkStrokeRec& getStroke() const { return fStroke; } | 40 const SkStrokeRec& getStroke() const { return fStroke; } |
41 | 41 |
42 protected: | 42 protected: |
43 SkPath fSkPath; | 43 SkPath fSkPath; |
44 SkStrokeRec fStroke; | 44 SkStrokeRec fStroke; |
45 SkRect fBounds; | 45 SkRect fBounds; |
46 | 46 |
47 private: | 47 private: |
48 typedef GrGpuObject INHERITED; | 48 typedef GrGpuResource INHERITED; |
49 }; | 49 }; |
50 | 50 |
51 #endif | 51 #endif |
OLD | NEW |