Add flag bits for partial GrContext reset

BUG=248728
R=bsalomon@google.com

Committed: https://code.google.com/p/skia/source/detail?r=9802

Review URL: https://codereview.chromium.org/17027003

git-svn-id: http://skia.googlecode.com/svn/trunk@9814 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 970e0c7..18aedc5 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -600,6 +600,31 @@
     GrBackendObject                 fRenderTargetHandle;
 };
 
+/**
+ * The GrContext's cache of backend context state can be partially invalidated.
+ * These enums are specific to the GL backend and we'd add a new set for an alternative backend.
+ */
+enum GrGLBackendState {
+    kRenderTarget_GrGLBackendState     = 1 << 0,
+    kTextureBinding_GrGLBackendState   = 1 << 1,
+    // View state stands for scissor and viewport
+    kView_GrGLBackendState             = 1 << 2,
+    kBlend_GrGLBackendState            = 1 << 3,
+    kAA_GrGLBackendState               = 1 << 4,
+    kVertex_GrGLBackendState           = 1 << 5,
+    kStencil_GrGLBackendState          = 1 << 6,
+    kPixelStore_GrGLBackendState       = 1 << 7,
+    kProgram_GrGLBackendState          = 1 << 8,
+    kPathStencil_GrGLBackendState      = 1 << 9,
+    kMisc_GrGLBackendState             = 1 << 10,
+    kALL_GrGLBackendState              = 0xffff
+};
+
+/**
+ * This value translates to reseting all the context state for any backend.
+ */
+static const uint32_t kAll_GrBackendState = 0xffffffff;
+
 ///////////////////////////////////////////////////////////////////////////////
 
 #endif