| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 GrBufferObj_DEFINED | 9 #ifndef GrBufferObj_DEFINED |
| 10 #define GrBufferObj_DEFINED | 10 #define GrBufferObj_DEFINED |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 void resetBound() { fBound = false; } | 48 void resetBound() { fBound = false; } |
| 49 bool getBound() const { return fBound; } | 49 bool getBound() const { return fBound; } |
| 50 | 50 |
| 51 void allocate(GrGLsizeiptr size, const GrGLchar *dataPtr); | 51 void allocate(GrGLsizeiptr size, const GrGLchar *dataPtr); |
| 52 GrGLsizeiptr getSize() const { return fSize; } | 52 GrGLsizeiptr getSize() const { return fSize; } |
| 53 GrGLchar *getDataPtr() { return fDataPtr; } | 53 GrGLchar *getDataPtr() { return fDataPtr; } |
| 54 | 54 |
| 55 void setUsage(GrGLint usage) { fUsage = usage; } | 55 void setUsage(GrGLint usage) { fUsage = usage; } |
| 56 GrGLint getUsage() const { return fUsage; } | 56 GrGLint getUsage() const { return fUsage; } |
| 57 | 57 |
| 58 void deleteAction() SK_OVERRIDE; | 58 void deleteAction() override; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 private: | 61 private: |
| 62 | 62 |
| 63 GrGLchar* fDataPtr; | 63 GrGLchar* fDataPtr; |
| 64 bool fMapped; // is the buffer object mapped via "glMapBuffer[
Range]"? | 64 bool fMapped; // is the buffer object mapped via "glMapBuffer[
Range]"? |
| 65 GrGLintptr fMappedOffset; // the offset of the buffer range that is mapped | 65 GrGLintptr fMappedOffset; // the offset of the buffer range that is mapped |
| 66 GrGLsizeiptr fMappedLength; // the size of the buffer range that is mapped | 66 GrGLsizeiptr fMappedLength; // the size of the buffer range that is mapped |
| 67 bool fBound; // is the buffer object bound via "glBindBuffer"
? | 67 bool fBound; // is the buffer object bound via "glBindBuffer"
? |
| 68 GrGLsizeiptr fSize; // size in bytes | 68 GrGLsizeiptr fSize; // size in bytes |
| 69 GrGLint fUsage; // one of: GL_STREAM_DRAW, | 69 GrGLint fUsage; // one of: GL_STREAM_DRAW, |
| 70 // GL_STATIC_DRAW, | 70 // GL_STATIC_DRAW, |
| 71 // GL_DYNAMIC_DRAW | 71 // GL_DYNAMIC_DRAW |
| 72 | 72 |
| 73 typedef GrFakeRefObj INHERITED; | 73 typedef GrFakeRefObj INHERITED; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // GrBufferObj_DEFINED | 76 #endif // GrBufferObj_DEFINED |
| OLD | NEW |