From 7035a8e797eba8ccccff057525d01cf02c1f2a02 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Fri, 15 Dec 2017 14:25:11 -0500 Subject: 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 Commit-Queue: Brian Osman --- bench/GMBench.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'bench/GMBench.cpp') diff --git a/bench/GMBench.cpp b/bench/GMBench.cpp index 6037a8221c..297ff42b74 100644 --- a/bench/GMBench.cpp +++ b/bench/GMBench.cpp @@ -27,6 +27,7 @@ void GMBench::onDraw(int loops, SkCanvas* canvas) { // 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); } } -- cgit v1.2.3