aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-21 20:14:29 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-21 20:14:29 +0000
commit469d0dd944833444a363591be1ee6a76bdecf96d (patch)
tree3c3bc1bbe1cffd865adca2d9657f39938924c6e2 /src/gpu/gl/GrGpuGL.cpp
parent1f1db4cc5b62fc74efc01a4c92cbc1f7bddce241 (diff)
When GL context is reset set some desktop-only GL state to values that we assume later.
Review URL: http://codereview.appspot.com/6222052/ git-svn-id: http://skia.googlecode.com/svn/trunk@4018 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 341675bc18..02ff78e5ec 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -464,9 +464,22 @@ void GrGpuGL::onResetContext() {
fHWDitherEnabled = kUnknown_TriState;
if (kDesktop_GrGLBinding == this->glBinding()) {
- // we never use point or polygon smoothing
- // should we also disable polygon smoothing?
+ // Desktop-only state that we never change
GL_CALL(Disable(GR_GL_POINT_SMOOTH));
+ GL_CALL(Disable(GR_GL_LINE_SMOOTH));
+ GL_CALL(Disable(GR_GL_POLYGON_SMOOTH));
+ GL_CALL(Disable(GR_GL_POLYGON_STIPPLE));
+ GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP));
+ GL_CALL(Disable(GR_GL_COLOR_TABLE));
+ GL_CALL(Disable(GR_GL_INDEX_LOGIC_OP));
+ GL_CALL(Disable(GR_GL_POLYGON_OFFSET_FILL));
+ // Since ES doesn't support glPointSize at all we always use the VS to
+ // set the point size
+ GL_CALL(Enable(GR_GL_VERTEX_PROGRAM_POINT_SIZE));
+
+ // We should set glPolygonMode(FRONT_AND_BACK,FILL) here, too. It isn't
+ // currently part of our gl interface. There are probably others as
+ // well.
}
fHWAAState.invalidate();
fHWWriteToColor = kUnknown_TriState;
@@ -507,8 +520,6 @@ void GrGpuGL::onResetContext() {
fHWGeometryState.fArrayPtrsDirty = true;
- GL_CALL(ColorMask(GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE));
-
fHWBoundRenderTarget = NULL;
// we assume these values