Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: bench/Benchmark.cpp

Issue 619353002: Save/Restore around bench runs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/Benchmark.cpp
diff --git a/bench/Benchmark.cpp b/bench/Benchmark.cpp
index 9205ba97c958dae3a26c8a6cc6223dcea09427c7..88e385d2d1840a841c9b0e6dc84c73107c4c7af7 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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698