Added a flag that forces SampleApp to continuously redraw, even in non-animated tests...
authorbrianosman <brianosman@google.com>
Wed, 24 Feb 2016 19:47:47 +0000 (11:47 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 24 Feb 2016 19:47:47 +0000 (11:47 -0800)
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

samplecode/SampleApp.cpp

index 61cd75149f2065e9f390a73a36dee9de71705d07..7ebac5f2151867e6d9604e9725cd08c80fe87785 100644 (file)
@@ -744,6 +744,7 @@ DEFINE_string(sequence, "", "Path to file containing the desired samples/gms to
 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 @@ void SampleWindow::draw(SkCanvas* canvas) {
         this->postInvalDelay();
     }
 
-    if (this->sendAnimatePulse()) {
+    if (this->sendAnimatePulse() || FLAGS_redraw) {
         this->inval(nullptr);
     }