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 |
11 #include "GrGpuObject.h" | 11 #include "GrGpuResource.h" |
12 #include "GrResourceCache.h" | 12 #include "GrResourceCache.h" |
13 #include "SkStrokeRec.h" | 13 #include "SkStrokeRec.h" |
14 | 14 |
15 class SkPath; | 15 class SkPath; |
16 | 16 |
17 /** | 17 /** |
18 * Represents a contiguous range of GPU path objects with a common stroke. The | 18 * Represents a contiguous range of GPU path objects with a common stroke. The |
19 * path range is immutable with the exception that individual paths can be | 19 * path range is immutable with the exception that individual paths can be |
20 * initialized lazily. Unititialized paths are silently ignored by drawing | 20 * initialized lazily. Unititialized paths are silently ignored by drawing |
21 * functions. | 21 * functions. |
22 */ | 22 */ |
23 class GrPathRange : public GrGpuObject { | 23 class GrPathRange : public GrGpuResource { |
24 public: | 24 public: |
25 SK_DECLARE_INST_COUNT(GrPathRange); | 25 SK_DECLARE_INST_COUNT(GrPathRange); |
26 | 26 |
27 static const bool kIsWrapped = false; | 27 static const bool kIsWrapped = false; |
28 | 28 |
29 static GrResourceKey::ResourceType resourceType() { | 29 static GrResourceKey::ResourceType resourceType() { |
30 static const GrResourceKey::ResourceType type = GrResourceKey::GenerateR
esourceType(); | 30 static const GrResourceKey::ResourceType type = GrResourceKey::GenerateR
esourceType(); |
31 return type; | 31 return type; |
32 } | 32 } |
33 | 33 |
(...skipping 13 matching lines...) Expand all Loading... |
47 * Initialize a path in the range. It is invalid to call this method for a | 47 * Initialize a path in the range. It is invalid to call this method for a |
48 * path that has already been initialized. | 48 * path that has already been initialized. |
49 */ | 49 */ |
50 virtual void initAt(size_t index, const SkPath&) = 0; | 50 virtual void initAt(size_t index, const SkPath&) = 0; |
51 | 51 |
52 protected: | 52 protected: |
53 size_t fSize; | 53 size_t fSize; |
54 SkStrokeRec fStroke; | 54 SkStrokeRec fStroke; |
55 | 55 |
56 private: | 56 private: |
57 typedef GrGpuObject INHERITED; | 57 typedef GrGpuResource INHERITED; |
58 }; | 58 }; |
59 | 59 |
60 #endif | 60 #endif |
OLD | NEW |