bool GrGLVertexBuffer::isLocked() const { GrAssert(!this->isValid() || fBufferID); #if GR_DEBUG if (this->isValid() && GPUGL->supportsBufferLocking()) { GrGLint mapped; this->bind(); GR_GL(GetBufferParameteriv(GR_GL_ARRAY_BUFFER, GR_GL_BUFFER_MAPPED, &mapped)); GrAssert(!!mapped == !!fLockPtr); } #endif return NULL != fLockPtr; }
bool GrGLIndexBuffer::isLocked() const { #if GR_DEBUG if (this->isValid() && this->getGpu()->getCaps().fBufferLockSupport) { this->bind(); GrGLint mapped; GL_CALL(GetBufferParameteriv(GR_GL_ELEMENT_ARRAY_BUFFER, GR_GL_BUFFER_MAPPED, &mapped)); GrAssert(!!mapped == !!fLockPtr); } #endif return NULL != fLockPtr; }
bool GrGLVertexBuffer::isLocked() const { GrAssert(!this->isValid() || fBufferID); // this check causes a lot of noise in the gl log #if 0 if (this->isValid() && this->getGpu()->getCaps().fBufferLockSupport) { GrGLint mapped; this->bind(); GL_CALL(GetBufferParameteriv(GR_GL_ARRAY_BUFFER, GR_GL_BUFFER_MAPPED, &mapped)); GrAssert(!!mapped == !!fLockPtr); } #endif return NULL != fLockPtr; }