summaryrefslogtreecommitdiff
path: root/gpu/gl/debug/GrBufferObj.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/gl/debug/GrBufferObj.h')
-rw-r--r--gpu/gl/debug/GrBufferObj.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/gpu/gl/debug/GrBufferObj.h b/gpu/gl/debug/GrBufferObj.h
index fecfeb5e..05d3cfdd 100644
--- a/gpu/gl/debug/GrBufferObj.h
+++ b/gpu/gl/debug/GrBufferObj.h
@@ -34,9 +34,15 @@ public:
GrAlwaysAssert(!fMapped);
}
- void setMapped() { fMapped = true; }
+ void setMapped(GrGLintptr offset, GrGLsizeiptr length) {
+ fMapped = true;
+ fMappedOffset = offset;
+ fMappedLength = length;
+ }
void resetMapped() { fMapped = false; }
bool getMapped() const { return fMapped; }
+ GrGLsizei getMappedOffset() const { return fMappedOffset; }
+ GrGLsizei getMappedLength() const { return fMappedLength; }
void setBound() { fBound = true; }
void resetBound() { fBound = false; }
@@ -55,7 +61,9 @@ protected:
private:
GrGLchar* fDataPtr;
- bool fMapped; // is the buffer object mapped via "glMapBuffer"?
+ bool fMapped; // is the buffer object mapped via "glMapBuffer[Range]"?
+ GrGLintptr fMappedOffset; // the offset of the buffer range that is mapped
+ GrGLsizeiptr fMappedLength; // the size of the buffer range that is mapped
bool fBound; // is the buffer object bound via "glBindBuffer"?
GrGLsizeiptr fSize; // size in bytes
GrGLint fUsage; // one of: GL_STREAM_DRAW,