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

Unified Diff: tools/VisualBench/VisualInteractiveModule.h

Issue 1385073002: Create VisualStreamTimingModule (Closed) Base URL: https://skia.googlesource.com/skia.git@vb3a
Patch Set: feedback inc Created 5 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 | « tools/VisualBench/TimingStateMachine.h ('k') | tools/VisualBench/VisualInteractiveModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/VisualBench/VisualInteractiveModule.h
diff --git a/tools/VisualBench/VisualInteractiveModule.h b/tools/VisualBench/VisualInteractiveModule.h
index 5b9ff0a340e75b2a28222f3d4b0e56f1a8c75304..d4f8f69b1e8784623779d0c28409f2dea151247b 100755
--- a/tools/VisualBench/VisualInteractiveModule.h
+++ b/tools/VisualBench/VisualInteractiveModule.h
@@ -3,56 +3,36 @@
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
- *
*/
#ifndef VisualInteractiveModule_DEFINED
#define VisualInteractiveModule_DEFINED
-#include "VisualModule.h"
-
-#include "ResultsWriter.h"
-#include "SkPicture.h"
-#include "Timer.h"
-#include "TimingStateMachine.h"
-#include "VisualBench.h"
-#include "VisualBenchmarkStream.h"
+#include "VisualStreamTimingModule.h"
class SkCanvas;
/*
* This module for VisualBench is designed to display stats data dynamically
*/
-class VisualInteractiveModule : public VisualModule {
+class VisualInteractiveModule : public VisualStreamTimingModule {
public:
// TODO get rid of backpointer
VisualInteractiveModule(VisualBench* owner);
- void draw(SkCanvas* canvas) override;
- bool onHandleChar(SkUnichar unichar) override;
+ bool onHandleChar(SkUnichar c) override;
private:
- void setTitle();
- bool setupBackend();
- void setupRenderTarget();
void drawStats(SkCanvas*);
- bool advanceRecordIfNecessary(SkCanvas*);
- inline void renderFrame(SkCanvas*);
+ void renderFrame(SkCanvas*, Benchmark*, int loops) override;
+ bool timingFinished(Benchmark*, int loops, double measurement) override;
static const int kMeasurementCount = 64; // should be power of 2 for fast mod
double fMeasurements[kMeasurementCount];
int fCurrentMeasurement;
-
- SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream;
- SkAutoTUnref<Benchmark> fBenchmark;
- TimingStateMachine fTSM;
bool fAdvance;
- bool fHasBeenReset;
-
- // support framework
- SkAutoTUnref<VisualBench> fOwner;
- typedef VisualModule INHERITED;
+ typedef VisualStreamTimingModule INHERITED;
};
#endif
« no previous file with comments | « tools/VisualBench/TimingStateMachine.h ('k') | tools/VisualBench/VisualInteractiveModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698