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

Unified Diff: tools/VisualBench/VisualInteractiveModule.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/nanobench.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualInteractiveModule.cpp
diff --git a/tools/VisualBench/VisualInteractiveModule.cpp b/tools/VisualBench/VisualInteractiveModule.cpp
index 538dda7a44b794310caacfeb9cd84bea7fd3a97d..af922a92bf10352cc422da9abbea92e15904847e 100755
--- a/tools/VisualBench/VisualInteractiveModule.cpp
+++ b/tools/VisualBench/VisualInteractiveModule.cpp
@@ -98,7 +98,7 @@ bool VisualInteractiveModule::advanceRecordIfNecessary(SkCanvas* canvas) {
// clear both buffers
fOwner->clear(canvas, SK_ColorWHITE, 2);
- fBenchmark->preDraw();
+ fBenchmark->delayedSetup();
return true;
}
@@ -125,6 +125,7 @@ void VisualInteractiveModule::draw(SkCanvas* canvas) {
}
case kPreTiming_State: {
fBenchmark->perCanvasPreDraw(canvas);
+ fBenchmark->preDraw(canvas);
fCurrentFrame = 0;
fTimer.start();
fState = kTiming_State;
@@ -148,6 +149,7 @@ inline void VisualInteractiveModule::nextState(State nextState) {
void VisualInteractiveModule::perCanvasPreDraw(SkCanvas* canvas, State nextState) {
fBenchmark->perCanvasPreDraw(canvas);
+ fBenchmark->preDraw(canvas);
fCurrentFrame = 0;
this->nextState(nextState);
}
@@ -206,6 +208,7 @@ void VisualInteractiveModule::recordMeasurement() {
}
void VisualInteractiveModule::postDraw(SkCanvas* canvas) {
+ fBenchmark->postDraw(canvas);
fBenchmark->perCanvasPostDraw(canvas);
fBenchmark.reset(nullptr);
fLoops = 1;
« no previous file with comments | « bench/nanobench.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698