Save/Restore around bench runs.

BUG=skia:

Review URL: https://codereview.chromium.org/619353002
This commit is contained in:
mtklein 2014-10-02 13:03:58 -07:00 committed by Commit bot
parent 0a528c187a
commit 38c05871c6

View File

@ -7,6 +7,7 @@
#include "Benchmark.h" #include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h" #include "SkPaint.h"
#include "SkParse.h" #include "SkParse.h"
@ -37,6 +38,7 @@ void Benchmark::preDraw() {
} }
void Benchmark::draw(const int loops, SkCanvas* canvas) { void Benchmark::draw(const int loops, SkCanvas* canvas) {
SkAutoCanvasRestore ar(canvas, true/*save now*/);
this->onDraw(loops, canvas); this->onDraw(loops, canvas);
} }