Force flush in clear benchmarks
Bug: skia:
Change-Id: I9d373dbcf78c6fe52f74deb37d8e08595d3a7c28
Reviewed-on: https://skia-review.googlesource.com/c/184064
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/bench/ClearBench.cpp b/bench/ClearBench.cpp
index 4207a34..c16612e 100644
--- a/bench/ClearBench.cpp
+++ b/bench/ClearBench.cpp
@@ -62,6 +62,10 @@
canvas->clear(color);
canvas->restore();
+
+ // Loop to prevent batching between ops (which matters for fullscreen clears that just
+ // overwrite each other and only one thing is executed regardless of the loop count)
+ canvas->flush();
}
}