From 6dea83f244cfdea52901eef6b31cee60b07a8ea0 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Thu, 3 Dec 2015 12:58:06 -0800 Subject: Add option to draw wireframe batch bounds Committed: https://skia.googlesource.com/skia/+/26489ef21ff5df33b8cb5943fddfd4604e203960 Review URL: https://codereview.chromium.org/1494473005 --- dm/DMSrcSink.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dm/DMSrcSink.cpp') diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 2861ae8ea2..26ba13b547 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -807,6 +807,7 @@ 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."); +DEFINE_bool(batchBounds, false, "Draw a wireframe bounds of each GrBatch."); Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const { GrContextOptions options; @@ -816,6 +817,9 @@ Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co if (FLAGS_batchClip) { options.fClipBatchToBounds = true; } + if (FLAGS_batchBounds) { + options.fDrawBatchBounds = true; + } src.modifyGrContextOptions(&options); GrContextFactory factory(options); -- cgit v1.2.3