Put caps in a struct, move up to GrDrawTarget
Review URL: http://codereview.appspot.com/5088049
git-svn-id: http://skia.googlecode.com/svn/trunk@2314 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLIndexBuffer.cpp b/gpu/src/GrGLIndexBuffer.cpp
index 2791527..084a4c6 100644
--- a/gpu/src/GrGLIndexBuffer.cpp
+++ b/gpu/src/GrGLIndexBuffer.cpp
@@ -51,7 +51,7 @@
void* GrGLIndexBuffer::lock() {
GrAssert(fBufferID);
GrAssert(!isLocked());
- if (GPUGL->supportsBufferLocking()) {
+ if (this->getGpu()->getCaps().fBufferLockSupport) {
this->bind();
// Let driver know it can discard the old data
GL_CALL(BufferData(GR_GL_ELEMENT_ARRAY_BUFFER,
@@ -76,7 +76,7 @@
void GrGLIndexBuffer::unlock() {
GrAssert(fBufferID);
GrAssert(isLocked());
- GrAssert(GPUGL->supportsBufferLocking());
+ GrAssert(this->getGpu()->getCaps().fBufferLockSupport);
this->bind();
GL_CALL(UnmapBuffer(GR_GL_ELEMENT_ARRAY_BUFFER));
@@ -85,7 +85,7 @@
bool GrGLIndexBuffer::isLocked() const {
#if GR_DEBUG
- if (this->isValid() && GPUGL->supportsBufferLocking()) {
+ if (this->isValid() && this->getGpu()->getCaps().fBufferLockSupport) {
this->bind();
GrGLint mapped;
GL_CALL(GetBufferParameteriv(GR_GL_ELEMENT_ARRAY_BUFFER,