| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
| 10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 SkASSERT(fHWProgramID == fCurrentProgram->programID()); | 159 SkASSERT(fHWProgramID == fCurrentProgram->programID()); |
| 160 GL_CALL(UseProgram(0)); | 160 GL_CALL(UseProgram(0)); |
| 161 } | 161 } |
| 162 | 162 |
| 163 delete fProgramCache; | 163 delete fProgramCache; |
| 164 | 164 |
| 165 // This must be called by before the GrDrawTarget destructor | 165 // This must be called by before the GrDrawTarget destructor |
| 166 this->releaseGeometry(); | 166 this->releaseGeometry(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void GrGpuGL::contextAbandonded() { | 169 void GrGpuGL::contextAbandoned() { |
| 170 INHERITED::contextAbandonded(); | 170 INHERITED::contextAbandoned(); |
| 171 fProgramCache->abandon(); | 171 fProgramCache->abandon(); |
| 172 fHWProgramID = 0; | 172 fHWProgramID = 0; |
| 173 if (this->glCaps().pathRenderingSupport()) { | 173 if (this->glCaps().pathRenderingSupport()) { |
| 174 this->glPathRendering()->abandonGpuResources(); | 174 this->glPathRendering()->abandonGpuResources(); |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| 178 /////////////////////////////////////////////////////////////////////////////// | 178 /////////////////////////////////////////////////////////////////////////////// |
| 179 | 179 |
| 180 | 180 |
| (...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2596 this->setVertexArrayID(gpu, 0); | 2596 this->setVertexArrayID(gpu, 0); |
| 2597 } | 2597 } |
| 2598 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2598 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2599 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2599 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2600 fDefaultVertexArrayAttribState.resize(attrCount); | 2600 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2601 } | 2601 } |
| 2602 attribState = &fDefaultVertexArrayAttribState; | 2602 attribState = &fDefaultVertexArrayAttribState; |
| 2603 } | 2603 } |
| 2604 return attribState; | 2604 return attribState; |
| 2605 } | 2605 } |
| OLD | NEW |