OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrGLBufferImpl_DEFINED | 8 #ifndef GrGLBufferImpl_DEFINED |
9 #define GrGLBufferImpl_DEFINED | 9 #define GrGLBufferImpl_DEFINED |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool isLocked() const; | 46 bool isLocked() const; |
47 bool updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes); | 47 bool updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes); |
48 | 48 |
49 private: | 49 private: |
50 void validate() const; | 50 void validate() const; |
51 | 51 |
52 Desc fDesc; | 52 Desc fDesc; |
53 GrGLenum fBufferType; // GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER | 53 GrGLenum fBufferType; // GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER |
54 void* fCPUData; | 54 void* fCPUData; |
55 void* fLockPtr; | 55 void* fLockPtr; |
| 56 size_t fGLSizeInBytes; // In certain cases we make the size of the
GL buffer object |
| 57 // smaller or larger than the size in fDesc
. |
56 | 58 |
57 typedef SkNoncopyable INHERITED; | 59 typedef SkNoncopyable INHERITED; |
58 }; | 60 }; |
59 | 61 |
60 #endif | 62 #endif |
OLD | NEW |