From 38c05871c66292b1db7a98a67df7ee7cfd12bca3 Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 2 Oct 2014 13:03:58 -0700 Subject: [PATCH] Save/Restore around bench runs. BUG=skia: Review URL: https://codereview.chromium.org/619353002 --- bench/Benchmark.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bench/Benchmark.cpp b/bench/Benchmark.cpp index 9205ba97c9..88e385d2d1 100644 --- a/bench/Benchmark.cpp +++ b/bench/Benchmark.cpp @@ -7,6 +7,7 @@ #include "Benchmark.h" +#include "SkCanvas.h" #include "SkPaint.h" #include "SkParse.h" @@ -37,6 +38,7 @@ void Benchmark::preDraw() { } void Benchmark::draw(const int loops, SkCanvas* canvas) { + SkAutoCanvasRestore ar(canvas, true/*save now*/); this->onDraw(loops, canvas); }