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
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 341675b..02ff78e 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -464,9 +464,22 @@
     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 @@
     
     fHWGeometryState.fArrayPtrsDirty = true;
 
-    GL_CALL(ColorMask(GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE, GR_GL_TRUE));
-
     fHWBoundRenderTarget = NULL;
 
     // we assume these values