Add debug option to clip each GrBatch to its device bounds
Review URL: https://codereview.chromium.org/1471083002
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index f34e6fc..e41a1b7 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -32,7 +32,8 @@
////////////////////////////////////////////////////////////////////////////////
-GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* resourceProvider)
+GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* resourceProvider,
+ const Options& options)
: fGpu(SkRef(gpu))
, fResourceProvider(resourceProvider)
, fFlushing(false)
@@ -40,7 +41,7 @@
, fRenderTarget(rt) {
// TODO: Stop extracting the context (currently needed by GrClipMaskManager)
fContext = fGpu->getContext();
- fClipMaskManager.reset(new GrClipMaskManager(this));
+ fClipMaskManager.reset(new GrClipMaskManager(this, options.fClipBatchToBounds));
rt->setLastDrawTarget(this);