Save/Restore around bench runs.
BUG=skia: Review URL: https://codereview.chromium.org/619353002
This commit is contained in:
parent
0a528c187a
commit
38c05871c6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user