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

Unified Diff: bench/nanobench.cpp

Issue 1379853003: Fix for nexus 5 crashing in GL benches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 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 | « bench/TextBlobBench.cpp ('k') | tools/VisualBench/VisualInteractiveModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 900ba4dfa27724c6d312280f47c6356e9f4c523a..6328aa15ab4a9f5d74860c69721ae0eb07f8c376 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -207,6 +207,7 @@ static double time(int loops, Benchmark* bench, Target* target) {
if (canvas) {
canvas->clear(SK_ColorWHITE);
}
+ bench->preDraw(canvas);
WallTimer timer;
timer.start();
canvas = target->beginTiming(canvas);
@@ -216,6 +217,7 @@ static double time(int loops, Benchmark* bench, Target* target) {
}
target->endTiming();
timer.end();
+ bench->postDraw(canvas);
return timer.fWall;
}
@@ -1164,7 +1166,7 @@ int nanobench_main() {
if (!configs.isEmpty()) {
log->bench(bench->getUniqueName(), bench->getSize().fX, bench->getSize().fY);
- bench->preDraw();
+ bench->delayedSetup();
}
for (int i = 0; i < configs.count(); ++i) {
Target* target = is_enabled(b, configs[i]);
« no previous file with comments | « bench/TextBlobBench.cpp ('k') | tools/VisualBench/VisualInteractiveModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698