Add measurement command line args to SampleApp
This way, we may be able to use SampleApp as a performance benchmark
tool that's closer to real-world use cases than nanobench.
For example, we can now run
./out/Release/SampleApp --slide Chart --backendTiles 8 --measureMS 2000
to test the threaded backend.
Bug: skia:
Change-Id: I92b177624bc8d16c5b4d3ad122319882e8783101
Reviewed-on: https://skia-review.googlesource.com/50801
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h
index 52f041a..9f7b5db 100644
--- a/samplecode/SampleApp.h
+++ b/samplecode/SampleApp.h
@@ -254,6 +254,8 @@
int fThreads = 0;
std::unique_ptr<SkExecutor> fExecutor;
+ int fMeasureMS; // the number of milliseconds to measure the FPS before we close the SampleApp
+
void loadView(SkView*);
void updateTitle();
bool getRawTitle(SkString*);