Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: dm/DMSrcSink.cpp

Issue 1498653002: Add option to control maximum GrBatch lookback (Closed) Base URL: https://skia.googlesource.com/skia.git@drect
Patch Set: fix rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/GrContextOptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 2503dc35cec207602df6e50d9f66a518d108f2d1..e27628ad043aeedc9676dfd1a00187c843ad2fa8 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);
« no previous file with comments | « no previous file | include/gpu/GrContextOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698