Add debug option to clip each GrBatch to its device bounds

Review URL: https://codereview.chromium.org/1471083002
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 1e5897b..52173eb 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -20,6 +20,7 @@
         , fGeometryBufferMapThreshold(-1)
         , fUseDrawInsteadOfPartialRenderTargetWrite(false)
         , fImmediateMode(false)
+        , fClipBatchToBounds(false)
         , fUseShaderSwizzling(false) {}
 
     // EXPERIMENTAL
@@ -48,10 +49,14 @@
     /** some gpus have problems with partial writes of the rendertarget */
     bool fUseDrawInsteadOfPartialRenderTargetWrite;
 
-    /** The GrContext operates in immedidate mode. It will issue all draws to the backend API
+    /** The GrContext operates in immediate mode. It will issue all draws to the backend API
         immediately. Intended to ease debugging. */
     bool fImmediateMode;
 
+    /** For debugging purposes turn each GrBatch's bounds into a clip rect. This is used to
+        verify that the clip bounds are conservative. */
+    bool fClipBatchToBounds;
+
     /** Force us to do all swizzling manually in the shader and don't rely on extensions to do
         swizzling. */
     bool fUseShaderSwizzling;