| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 // Vertex | 354 // Vertex |
| 355 if (resetBits & kVertex_GrGLBackendState) { | 355 if (resetBits & kVertex_GrGLBackendState) { |
| 356 fHWGeometryState.invalidate(); | 356 fHWGeometryState.invalidate(); |
| 357 } | 357 } |
| 358 | 358 |
| 359 if (resetBits & kRenderTarget_GrGLBackendState) { | 359 if (resetBits & kRenderTarget_GrGLBackendState) { |
| 360 fHWBoundRenderTarget = NULL; | 360 fHWBoundRenderTarget = NULL; |
| 361 } | 361 } |
| 362 | 362 |
| 363 if (resetBits & kFixedFunction_GrGLBackendState && | 363 if (resetBits & kFixedFunction_GrGLBackendState && this->glCaps().fixedFunct
ionSupport()) { |
| 364 kDesktop_GrGLBinding == this->glBinding() && | |
| 365 !this->glCaps().isCoreProfile()) { | |
| 366 | 364 |
| 367 fHWProjectionMatrixState.invalidate(); | 365 fHWProjectionMatrixState.invalidate(); |
| 368 // we don't use the model view matrix. | 366 // we don't use the model view matrix. |
| 369 GL_CALL(MatrixMode(GR_GL_MODELVIEW)); | 367 GL_CALL(MatrixMode(GR_GL_MODELVIEW)); |
| 370 GL_CALL(LoadIdentity()); | 368 GL_CALL(LoadIdentity()); |
| 371 | 369 |
| 372 // When we use fixed function vertex processing we always use the vertex
array | 370 // When we use fixed function vertex processing we always use the vertex
array |
| 373 // and none of the other arrays. | 371 // and none of the other arrays. |
| 374 GL_CALL(EnableClientState(GR_GL_VERTEX_ARRAY)); | 372 GL_CALL(EnableClientState(GR_GL_VERTEX_ARRAY)); |
| 375 GL_CALL(DisableClientState(GR_GL_NORMAL_ARRAY)); | 373 GL_CALL(DisableClientState(GR_GL_NORMAL_ARRAY)); |
| (...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2571 this->setVertexArrayID(gpu, 0); | 2569 this->setVertexArrayID(gpu, 0); |
| 2572 } | 2570 } |
| 2573 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2571 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2574 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2572 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2575 fDefaultVertexArrayAttribState.resize(attrCount); | 2573 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2576 } | 2574 } |
| 2577 attribState = &fDefaultVertexArrayAttribState; | 2575 attribState = &fDefaultVertexArrayAttribState; |
| 2578 } | 2576 } |
| 2579 return attribState; | 2577 return attribState; |
| 2580 } | 2578 } |
| OLD | NEW |