Store clip mask location in GrClipMaskManager as a enum rather than two bools

Review URL: http://codereview.appspot.com/6306092/



git-svn-id: http://skia.googlecode.com/svn/trunk@4274 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 9302393..edbad34 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -429,7 +429,7 @@
     void finalizeReservedIndices();
 
     // called when the 3D context state is unknown. Subclass should emit any
-    // assumed 3D context state and dirty any state cache
+    // assumed 3D context state and dirty any state cache.
     virtual void onResetContext() = 0;
 
     
@@ -558,6 +558,10 @@
     void prepareIndexPool();
 
     void resetContext() {
+        // We call this because the client may have messed with the
+        // stencil buffer. Perhaps we should detect whether it is a
+        // internally created stencil buffer and if so skip the invalidate.
+        fClipMaskManager.invalidateStencilMask();
         this->onResetContext();
         ++fResetTimestamp;
     }