Fix benches that aren't really timing what we want
Remove full clears from benches
Fix unbounded canvas modification in GM benches
Bug: skia:
Change-Id: Ie3d67282714a7b4e980aec399056c0e9df330993
Reviewed-on: https://skia-review.googlesource.com/86040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/bench/GMBench.cpp b/bench/GMBench.cpp
index 6037a82..297ff42 100644
--- a/bench/GMBench.cpp
+++ b/bench/GMBench.cpp
@@ -27,6 +27,7 @@
// Does the GM ever rely on drawBackground to lazily compute something?
fGM->drawBackground(canvas);
for (int i = 0; i < loops; ++i) {
+ SkAutoCanvasRestore acr(canvas, true);
fGM->drawContent(canvas);
}
}