Added a flag that forces SampleApp to continuously redraw, even in non-animated tests. Helpful when profiling or debugging.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1731853003
Review URL: https://codereview.chromium.org/1731853003
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 61cd751..7ebac5f 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -744,6 +744,7 @@
DEFINE_bool(sort, false, "Sort samples by title.");
DEFINE_bool(list, false, "List samples?");
DEFINE_bool(gpu, false, "Start up with gpu?");
+DEFINE_bool(redraw, false, "Force continuous redrawing, for profiling or debugging tools.");
DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-specific names
#ifdef SAMPLE_PDF_FILE_VIEWER
DEFINE_string(pdfPath, "", "Path to direcotry of pdf files.");
@@ -1101,7 +1102,7 @@
this->postInvalDelay();
}
- if (this->sendAnimatePulse()) {
+ if (this->sendAnimatePulse() || FLAGS_redraw) {
this->inval(nullptr);
}