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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 GrPath(GrGpu* gpu, const SkPath& skPath, const GrStrokeInfo& stroke) | 23 GrPath(GrGpu* gpu, const SkPath& skPath, const GrStrokeInfo& stroke) |
24 : INHERITED(gpu, kCached_LifeCycle) | 24 : INHERITED(gpu, kCached_LifeCycle) |
25 , fBounds(skPath.getBounds()) | 25 , fBounds(skPath.getBounds()) |
26 #ifdef SK_DEBUG | 26 #ifdef SK_DEBUG |
27 , fSkPath(skPath) | 27 , fSkPath(skPath) |
28 , fStroke(stroke) | 28 , fStroke(stroke) |
29 #endif | 29 #endif |
30 { | 30 { |
31 } | 31 } |
32 | 32 |
33 static void ComputeKey(const SkPath& path, const GrStrokeInfo& stroke, GrUni
queKey* key); | 33 static void ComputeKey(const SkPath& path, const GrStrokeInfo& stroke, GrUni
queKey* key, |
| 34 bool* outIsVolatile); |
34 | 35 |
35 const SkRect& getBounds() const { return fBounds; } | 36 const SkRect& getBounds() const { return fBounds; } |
36 | 37 |
37 #ifdef SK_DEBUG | 38 #ifdef SK_DEBUG |
38 bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) { | 39 bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) { |
39 return fSkPath == path && fStroke.hasEqualEffect(stroke); | 40 return fSkPath == path && fStroke.hasEqualEffect(stroke); |
40 } | 41 } |
41 #endif | 42 #endif |
42 | 43 |
43 protected: | 44 protected: |
44 SkRect fBounds; | 45 SkRect fBounds; |
45 #ifdef SK_DEBUG | 46 #ifdef SK_DEBUG |
46 SkPath fSkPath; | 47 SkPath fSkPath; |
47 GrStrokeInfo fStroke; | 48 GrStrokeInfo fStroke; |
48 #endif | 49 #endif |
49 | 50 |
50 private: | 51 private: |
51 typedef GrGpuResource INHERITED; | 52 typedef GrGpuResource INHERITED; |
52 }; | 53 }; |
53 | 54 |
54 #endif | 55 #endif |
OLD | NEW |