summaryrefslogtreecommitdiff
path: root/gpu/gl/GrGLIndexBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/gl/GrGLIndexBuffer.cpp')
-rw-r--r--gpu/gl/GrGLIndexBuffer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gpu/gl/GrGLIndexBuffer.cpp b/gpu/gl/GrGLIndexBuffer.cpp
index b6290b18..4e7f989c 100644
--- a/gpu/gl/GrGLIndexBuffer.cpp
+++ b/gpu/gl/GrGLIndexBuffer.cpp
@@ -14,7 +14,7 @@ GrGLIndexBuffer::GrGLIndexBuffer(GrGpuGL* gpu, const Desc& desc)
}
void GrGLIndexBuffer::onRelease() {
- if (this->isValid()) {
+ if (!this->wasDestroyed()) {
fImpl.release(this->getGpuGL());
}
@@ -27,7 +27,7 @@ void GrGLIndexBuffer::onAbandon() {
}
void* GrGLIndexBuffer::lock() {
- if (this->isValid()) {
+ if (!this->wasDestroyed()) {
return fImpl.lock(this->getGpuGL());
} else {
return NULL;
@@ -39,7 +39,7 @@ void* GrGLIndexBuffer::lockPtr() const {
}
void GrGLIndexBuffer::unlock() {
- if (this->isValid()) {
+ if (!this->wasDestroyed()) {
fImpl.unlock(this->getGpuGL());
}
}
@@ -49,7 +49,7 @@ bool GrGLIndexBuffer::isLocked() const {
}
bool GrGLIndexBuffer::updateData(const void* src, size_t srcSizeInBytes) {
- if (this->isValid()) {
+ if (!this->wasDestroyed()) {
return fImpl.updateData(this->getGpuGL(), src, srcSizeInBytes);
} else {
return false;