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

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 23513006: Add glTexGen funcs to interface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: glClientActiveTexture is not in OGL 1.1, use wglGetProcAddress Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index c95edb740b2d17ef9ded9b6cd368d3c984d13cee..7e659dba8383029a40cea4564ec6f8aa01840db0 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -360,12 +360,30 @@ void GrGpuGL::onResetContext(uint32_t resetBits) {
fHWBoundRenderTarget = NULL;
}
- if (resetBits & kPathStencil_GrGLBackendState) {
- fHWPathStencilMatrixState.invalidate();
- if (this->caps()->pathStencilingSupport()) {
- // we don't use the model view matrix.
- GL_CALL(MatrixMode(GR_GL_MODELVIEW));
- GL_CALL(LoadIdentity());
+ if (resetBits & kFixedFunction_GrGLBackendState &&
+ kDesktop_GrGLBinding == this->glBinding() &&
+ !this->glCaps().isCoreProfile()) {
+
+ fHWfixedFunctionMatrixState.invalidate();
+ // we don't use the model view matrix.
+ GL_CALL(MatrixMode(GR_GL_MODELVIEW));
+ GL_CALL(LoadIdentity());
+
+ // When we use fixed function vertex processing we always use the vertex array
+ // and none of the other arrays.
+ GL_CALL(EnableClientState(GR_GL_VERTEX_ARRAY));
+ GL_CALL(DisableClientState(GR_GL_NORMAL_ARRAY));
+ GL_CALL(DisableClientState(GR_GL_COLOR_ARRAY));
+ GL_CALL(DisableClientState(GR_GL_INDEX_ARRAY));
+ GL_CALL(DisableClientState(GR_GL_EDGE_FLAG_ARRAY));
+ for (int i = 0; i < this->glCaps().maxFixedFunctionTextureCoords(); ++i) {
+ GL_CALL(ClientActiveTexture(GR_GL_TEXTURE0 + i));
+ GL_CALL(DisableClientState(GR_GL_TEXTURE_COORD_ARRAY));
+
+ GL_CALL(Disable(GR_GL_TEXTURE_GEN_S));
+ GL_CALL(Disable(GR_GL_TEXTURE_GEN_T));
+ GL_CALL(Disable(GR_GL_TEXTURE_GEN_Q));
+ GL_CALL(Disable(GR_GL_TEXTURE_GEN_R));
}
}
« src/gpu/gl/GrGpuGL.h ('K') | « src/gpu/gl/GrGpuGL.h ('k') | src/gpu/gl/GrGpuGL_program.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698