OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 | 9 |
10 #ifndef GrGeometryBuffer_DEFINED | 10 #ifndef GrGeometryBuffer_DEFINED |
11 #define GrGeometryBuffer_DEFINED | 11 #define GrGeometryBuffer_DEFINED |
12 | 12 |
13 #include "GrGpuResource.h" | 13 #include "GrGpuResource.h" |
14 | 14 |
15 class GrGpu; | 15 class GrGpu; |
16 | 16 |
17 /** | 17 /** |
18 * Parent class for vertex and index buffers | 18 * Parent class for vertex and index buffers |
19 */ | 19 */ |
20 class GrGeometryBuffer : public GrGpuResource { | 20 class GrGeometryBuffer : public GrGpuResource { |
21 public: | 21 public: |
22 SK_DECLARE_INST_COUNT(GrGeometryBuffer); | 22 |
23 | 23 |
24 /** | 24 /** |
25 *Retrieves whether the buffer was created with the dynamic flag | 25 *Retrieves whether the buffer was created with the dynamic flag |
26 * | 26 * |
27 * @return true if the buffer was created with the dynamic flag | 27 * @return true if the buffer was created with the dynamic flag |
28 */ | 28 */ |
29 bool dynamic() const { return fDynamic; } | 29 bool dynamic() const { return fDynamic; } |
30 | 30 |
31 /** | 31 /** |
32 * Returns true if the buffer is a wrapper around a CPU array. If true it | 32 * Returns true if the buffer is a wrapper around a CPU array. If true it |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 void* fMapPtr; | 116 void* fMapPtr; |
117 size_t fGpuMemorySize; | 117 size_t fGpuMemorySize; |
118 bool fDynamic; | 118 bool fDynamic; |
119 bool fCPUBacked; | 119 bool fCPUBacked; |
120 | 120 |
121 typedef GrGpuResource INHERITED; | 121 typedef GrGpuResource INHERITED; |
122 }; | 122 }; |
123 | 123 |
124 #endif | 124 #endif |
OLD | NEW |