aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-12-14 12:13:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-14 12:13:09 -0800
commit489147c78b2091b87a80dac50a3e8f0f8eb42124 (patch)
tree9351e967262b57c46b1f19bc79c832b2e25ba6d4 /dm
parent1cbb5ea0a07255bcc0b8351ddf1fc84f50887aef (diff)
Add option to control maximum GrBatch lookback
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 2503dc35ce..e27628ad04 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -810,19 +810,15 @@ 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.");
+DEFINE_int32(batchLookback, -1, "Maximum GrBatch lookback for combining, negative means default.");
Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const {
GrContextOptions grOptions;
- if (FLAGS_imm) {
- grOptions.fImmediateMode = true;
- }
- if (FLAGS_batchClip) {
- grOptions.fClipBatchToBounds = true;
- }
+ grOptions.fImmediateMode = FLAGS_imm;
+ grOptions.fClipBatchToBounds = FLAGS_batchClip;
+ grOptions.fDrawBatchBounds = FLAGS_batchBounds;
+ grOptions.fMaxBatchLookback = FLAGS_batchLookback;
- if (FLAGS_batchBounds) {
- grOptions.fDrawBatchBounds = true;
- }
src.modifyGrContextOptions(&grOptions);
GrContextFactory factory(grOptions);