Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index af62dafdd435787d610ecedc64d081214535b4f9..2861ae8ea230b44734fa54d238dbe9738b9580fb 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -806,12 +806,16 @@ int GPUSink::enclave() const { |
void PreAbandonGpuContextErrorHandler(SkError, void*) {} |
DEFINE_bool(imm, false, "Run gpu configs in immediate mode."); |
+DEFINE_bool(batchClip, false, "Clip each GrBatch to its device bounds for testing."); |
Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const { |
GrContextOptions options; |
if (FLAGS_imm) { |
options.fImmediateMode = true; |
} |
+ if (FLAGS_batchClip) { |
+ options.fClipBatchToBounds = true; |
+ } |
src.modifyGrContextOptions(&options); |
GrContextFactory factory(options); |