OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrGLPathRange_DEFINED | 9 #ifndef GrGLPathRange_DEFINED |
10 #define GrGLPathRange_DEFINED | 10 #define GrGLPathRange_DEFINED |
(...skipping 21 matching lines...) Expand all Loading... |
32 * Initialize a GL path range from an existing range of pre-initialized GPU | 32 * Initialize a GL path range from an existing range of pre-initialized GPU |
33 * path objects. This class assumes ownership of the GPU path objects and | 33 * path objects. This class assumes ownership of the GPU path objects and |
34 * will delete them when done. | 34 * will delete them when done. |
35 */ | 35 */ |
36 GrGLPathRange(GrGpuGL*, | 36 GrGLPathRange(GrGpuGL*, |
37 GrGLuint basePathID, | 37 GrGLuint basePathID, |
38 int numPaths, | 38 int numPaths, |
39 size_t gpuMemorySize, | 39 size_t gpuMemorySize, |
40 const SkStrokeRec&); | 40 const SkStrokeRec&); |
41 | 41 |
42 virtual ~GrGLPathRange(); | |
43 | |
44 GrGLuint basePathID() const { return fBasePathID; } | 42 GrGLuint basePathID() const { return fBasePathID; } |
45 | 43 |
46 protected: | 44 protected: |
47 virtual void onInitPath(int index, const SkPath&) const; | 45 virtual void onInitPath(int index, const SkPath&) const; |
48 | 46 |
49 virtual void onRelease() SK_OVERRIDE; | 47 virtual void onRelease() SK_OVERRIDE; |
50 virtual void onAbandon() SK_OVERRIDE; | 48 virtual void onAbandon() SK_OVERRIDE; |
51 | 49 |
52 private: | 50 private: |
53 virtual size_t onGpuMemorySize() const SK_OVERRIDE { return fGpuMemorySize;
} | 51 virtual size_t onGpuMemorySize() const SK_OVERRIDE { return fGpuMemorySize;
} |
54 | 52 |
55 GrGLuint fBasePathID; | 53 GrGLuint fBasePathID; |
56 mutable size_t fGpuMemorySize; | 54 mutable size_t fGpuMemorySize; |
57 | 55 |
58 typedef GrPathRange INHERITED; | 56 typedef GrPathRange INHERITED; |
59 }; | 57 }; |
60 | 58 |
61 #endif | 59 #endif |
OLD | NEW |