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

Unified Diff: tools/VisualBench/TimingStateMachine.h

Issue 2018603003: Remove VisualBench and its Android implementation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « platform_tools/android/gyp/skia_android.gypi ('k') | tools/VisualBench/TimingStateMachine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/TimingStateMachine.h
diff --git a/tools/VisualBench/TimingStateMachine.h b/tools/VisualBench/TimingStateMachine.h
deleted file mode 100644
index 9ada22391026ef77d5eb4082559aa2dcb89997fd..0000000000000000000000000000000000000000
--- a/tools/VisualBench/TimingStateMachine.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef TimingStateMachine_DEFINED
-#define TimingStateMachine_DEFINED
-
-#include "Benchmark.h"
-#include "SkTArray.h"
-#include "Timer.h"
-
-class SkCanvas;
-
-/*
- * Manages a timer via a state machine. Can be used by modules to time benchmarks
- *
- * Clients call nextFrame, and must handle any requests from the timing state machine, specifically
- * to reset. When kTimingFinished_ParentEvents is returned, then lastMeasurement() will return the
- * timing and loops() will return the number of loops used to time.
- *
- * A client may continue timing the same benchmark indefinitely. To advance to the next
- * benchmark, the client should call nextBenchmark.
- */
-class TimingStateMachine {
-public:
- TimingStateMachine();
-
- enum ParentEvents {
- kReset_ParentEvents,
- kTiming_ParentEvents,
- kTimingFinished_ParentEvents,// This implies parent can read lastMeasurement() and must
- // reset
- };
-
- ParentEvents nextFrame(bool preWarmBetweenSamples);
-
- /*
- * The caller should call this when they are ready to move to the next benchmark.
- */
- void nextBenchmark();
-
- /*
- * When TimingStateMachine returns kTimingFinished_ParentEvents, then the owner can call
- * lastMeasurement() to get the time
- */
- double lastMeasurement() const { return fLastMeasurement; }
-
- int loops() const { return fLoops; }
-
-private:
- enum State {
- kPreWarm_State,
- kTiming_State,
- };
- enum InnerState {
- kTuning_InnerState,
- kTiming_InnerState,
- };
-
- int fCurrentFrame;
- int fLoops;
- double fLastMeasurement;
- double fStartTime;
- State fState;
- InnerState fInnerState;
-};
-
-#endif
« no previous file with comments | « platform_tools/android/gyp/skia_android.gypi ('k') | tools/VisualBench/TimingStateMachine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698