Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / gpu / gl / GrGLVertexArray.cpp
index 66feb82..4acf292 100644 (file)
@@ -73,6 +73,7 @@ GrGLVertexArray::GrGLVertexArray(GrGpuGL* gpu, GrGLint id, int attribCount)
     , fID(id)
     , fAttribArrays(attribCount)
     , fIndexBufferIDIsValid(false) {
+    this->registerWithCache();
 }
 
 void GrGLVertexArray::onAbandon() {
@@ -99,7 +100,7 @@ GrGLAttribArrayState* GrGLVertexArray::bind() {
 
 GrGLAttribArrayState* GrGLVertexArray::bindWithIndexBuffer(const GrGLIndexBuffer* buffer) {
     GrGLAttribArrayState* state = this->bind();
-    if (NULL != state && NULL != buffer) {
+    if (state && buffer) {
         GrGLuint bufferID = buffer->bufferID();
         if (!fIndexBufferIDIsValid || bufferID != fIndexBufferID) {
             GL_CALL(BindBuffer(GR_GL_ELEMENT_ARRAY_BUFFER, bufferID));