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

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: mesa 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
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | src/gpu/gl/GrGpuGL_program.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index c95edb740b2d17ef9ded9b6cd368d3c984d13cee..bd3a0cc18bddabffd4f7000721e409ec3a0c5ba9 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -329,9 +329,9 @@ void GrGpuGL::onResetContext(uint32_t resetBits) {
fHWAAState.invalidate();
}
- // invalid
+ fHWActiveTextureUnitIdx = -1; // invalid
+
if (resetBits & kTextureBinding_GrGLBackendState) {
- fHWActiveTextureUnitIdx = -1;
for (int s = 0; s < fHWBoundTextures.count(); ++s) {
fHWBoundTextures[s] = NULL;
}
@@ -360,12 +360,31 @@ 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()) {
+
+ fHWProjectionMatrixState.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(ActiveTexture(GR_GL_TEXTURE0 + i));
+ 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));
}
}
« no previous file with comments | « 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