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 18 matching lines...) Expand all Loading... |
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 bool* outIsVolatile); |
35 | 35 |
36 const SkRect& getBounds() const { return fBounds; } | 36 const SkRect& getBounds() const { return fBounds; } |
37 | 37 |
38 #ifdef SK_DEBUG | 38 #ifdef SK_DEBUG |
39 bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) { | 39 bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) const; |
40 return fSkPath == path && fStroke.hasEqualEffect(stroke); | |
41 } | |
42 #endif | 40 #endif |
43 | 41 |
44 protected: | 42 protected: |
45 SkRect fBounds; | 43 SkRect fBounds; |
46 #ifdef SK_DEBUG | 44 #ifdef SK_DEBUG |
47 SkPath fSkPath; | 45 SkPath fSkPath; |
48 GrStrokeInfo fStroke; | 46 GrStrokeInfo fStroke; |
49 #endif | 47 #endif |
50 | 48 |
51 private: | 49 private: |
52 typedef GrGpuResource INHERITED; | 50 typedef GrGpuResource INHERITED; |
53 }; | 51 }; |
54 | 52 |
55 #endif | 53 #endif |
OLD | NEW |