| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrPathRange_DEFINED | 8 #ifndef GrPathRange_DEFINED |
| 9 #define GrPathRange_DEFINED | 9 #define GrPathRange_DEFINED |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * This object is immutable with the exception that individual paths may be | 21 * This object is immutable with the exception that individual paths may be |
| 22 * initialized lazily. | 22 * initialized lazily. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 class GrPathRange : public GrGpuResource { | 25 class GrPathRange : public GrGpuResource { |
| 26 public: | 26 public: |
| 27 SK_DECLARE_INST_COUNT(GrPathRange); | 27 SK_DECLARE_INST_COUNT(GrPathRange); |
| 28 | 28 |
| 29 static const bool kIsWrapped = false; | 29 static const bool kIsWrapped = false; |
| 30 | 30 |
| 31 /** | |
| 32 * Return the resourceType intended for cache lookups involving GrPathRange. | |
| 33 */ | |
| 34 static GrResourceKey::ResourceType resourceType() { | |
| 35 static const GrResourceKey::ResourceType type = GrResourceKey::GenerateR
esourceType(); | |
| 36 return type; | |
| 37 } | |
| 38 | |
| 39 enum PathIndexType { | 31 enum PathIndexType { |
| 40 kU8_PathIndexType, //!< uint8_t | 32 kU8_PathIndexType, //!< uint8_t |
| 41 kU16_PathIndexType, //!< uint16_t | 33 kU16_PathIndexType, //!< uint16_t |
| 42 kU32_PathIndexType, //!< uint32_t | 34 kU32_PathIndexType, //!< uint32_t |
| 43 | 35 |
| 44 kLast_PathIndexType = kU32_PathIndexType | 36 kLast_PathIndexType = kU32_PathIndexType |
| 45 }; | 37 }; |
| 46 | 38 |
| 47 static inline int PathIndexSizeInBytes(PathIndexType type) { | 39 static inline int PathIndexSizeInBytes(PathIndexType type) { |
| 48 GR_STATIC_ASSERT(0 == kU8_PathIndexType); | 40 GR_STATIC_ASSERT(0 == kU8_PathIndexType); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 90 |
| 99 mutable SkAutoTUnref<PathGenerator> fPathGenerator; | 91 mutable SkAutoTUnref<PathGenerator> fPathGenerator; |
| 100 mutable SkTArray<uint8_t, true /*MEM_COPY*/> fGeneratedPaths; | 92 mutable SkTArray<uint8_t, true /*MEM_COPY*/> fGeneratedPaths; |
| 101 const int fNumPaths; | 93 const int fNumPaths; |
| 102 const SkStrokeRec fStroke; | 94 const SkStrokeRec fStroke; |
| 103 | 95 |
| 104 typedef GrGpuResource INHERITED; | 96 typedef GrGpuResource INHERITED; |
| 105 }; | 97 }; |
| 106 | 98 |
| 107 #endif | 99 #endif |
| OLD | NEW |