Index: src/gpu/gl/GrGLVertexBuffer.cpp |
diff --git a/src/gpu/gl/GrGLVertexBuffer.cpp b/src/gpu/gl/GrGLVertexBuffer.cpp |
index 685166c90b66326fa14cc7b63bff5f141e443007..8bfe1f0c96341dfd9628db6619eefc1f07c19482 100644 |
--- a/src/gpu/gl/GrGLVertexBuffer.cpp |
+++ b/src/gpu/gl/GrGLVertexBuffer.cpp |
@@ -14,7 +14,7 @@ GrGLVertexBuffer::GrGLVertexBuffer(GrGpuGL* gpu, const Desc& desc) |
} |
void GrGLVertexBuffer::onRelease() { |
- if (this->isValid()) { |
+ if (!this->wasDestroyed()) { |
fImpl.release(this->getGpuGL()); |
} |
@@ -28,7 +28,7 @@ void GrGLVertexBuffer::onAbandon() { |
} |
void* GrGLVertexBuffer::lock() { |
- if (this->isValid()) { |
+ if (!this->wasDestroyed()) { |
return fImpl.lock(this->getGpuGL()); |
} else { |
return NULL; |
@@ -40,7 +40,7 @@ void* GrGLVertexBuffer::lockPtr() const { |
} |
void GrGLVertexBuffer::unlock() { |
- if (this->isValid()) { |
+ if (!this->wasDestroyed()) { |
fImpl.unlock(this->getGpuGL()); |
} |
} |
@@ -50,7 +50,7 @@ bool GrGLVertexBuffer::isLocked() const { |
} |
bool GrGLVertexBuffer::updateData(const void* src, size_t srcSizeInBytes) { |
- if (this->isValid()) { |
+ if (!this->wasDestroyed()) { |
return fImpl.updateData(this->getGpuGL(), src, srcSizeInBytes); |
} else { |
return false; |