Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: src/gpu/gl/GrGpuGL.cpp

Issue 23587014: Add bit to GrGLCaps for fixed function support (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add printout for new bool and other fields Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 // Vertex 358 // Vertex
359 if (resetBits & kVertex_GrGLBackendState) { 359 if (resetBits & kVertex_GrGLBackendState) {
360 fHWGeometryState.invalidate(); 360 fHWGeometryState.invalidate();
361 } 361 }
362 362
363 if (resetBits & kRenderTarget_GrGLBackendState) { 363 if (resetBits & kRenderTarget_GrGLBackendState) {
364 fHWBoundRenderTarget = NULL; 364 fHWBoundRenderTarget = NULL;
365 } 365 }
366 366
367 if (resetBits & kFixedFunction_GrGLBackendState && 367 if (resetBits & kFixedFunction_GrGLBackendState && this->glCaps().fixedFunct ionSupport()) {
368 kDesktop_GrGLBinding == this->glBinding() &&
369 !this->glCaps().isCoreProfile()) {
370 368
371 fHWProjectionMatrixState.invalidate(); 369 fHWProjectionMatrixState.invalidate();
372 // we don't use the model view matrix. 370 // we don't use the model view matrix.
373 GL_CALL(MatrixMode(GR_GL_MODELVIEW)); 371 GL_CALL(MatrixMode(GR_GL_MODELVIEW));
374 GL_CALL(LoadIdentity()); 372 GL_CALL(LoadIdentity());
375 373
376 // When we use fixed function vertex processing we always use the vertex array 374 // When we use fixed function vertex processing we always use the vertex array
377 // and none of the other arrays. 375 // and none of the other arrays.
378 GL_CALL(EnableClientState(GR_GL_VERTEX_ARRAY)); 376 GL_CALL(EnableClientState(GR_GL_VERTEX_ARRAY));
379 GL_CALL(DisableClientState(GR_GL_NORMAL_ARRAY)); 377 GL_CALL(DisableClientState(GR_GL_NORMAL_ARRAY));
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 this->setVertexArrayID(gpu, 0); 2578 this->setVertexArrayID(gpu, 0);
2581 } 2579 }
2582 int attrCount = gpu->glCaps().maxVertexAttributes(); 2580 int attrCount = gpu->glCaps().maxVertexAttributes();
2583 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2581 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2584 fDefaultVertexArrayAttribState.resize(attrCount); 2582 fDefaultVertexArrayAttribState.resize(attrCount);
2585 } 2583 }
2586 attribState = &fDefaultVertexArrayAttribState; 2584 attribState = &fDefaultVertexArrayAttribState;
2587 } 2585 }
2588 return attribState; 2586 return attribState;
2589 } 2587 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698