| Index: tools/VisualBench/VisualLightweightBenchModule.h
|
| diff --git a/tools/VisualBench/VisualLightweightBenchModule.h b/tools/VisualBench/VisualLightweightBenchModule.h
|
| index 3538a48a595ee989b09c5ad23ecaf67060a9b1c0..7618ff2a11cc288c1917e16db84597c53ed4b3f4 100644
|
| --- a/tools/VisualBench/VisualLightweightBenchModule.h
|
| +++ b/tools/VisualBench/VisualLightweightBenchModule.h
|
| @@ -3,57 +3,44 @@
|
| *
|
| * Use of this source code is governed by a BSD-style license that can be
|
| * found in the LICENSE file.
|
| - *
|
| */
|
|
|
| #ifndef VisualLightweightBenchModule_DEFINED
|
| #define VisualLightweightBenchModule_DEFINED
|
|
|
| -#include "VisualModule.h"
|
| +#include "VisualStreamTimingModule.h"
|
|
|
| #include "ResultsWriter.h"
|
| #include "SkPicture.h"
|
| -#include "TimingStateMachine.h"
|
| #include "VisualBench.h"
|
| -#include "VisualBenchmarkStream.h"
|
|
|
| class SkCanvas;
|
|
|
| /*
|
| * This module is designed to be a minimal overhead timing module for VisualBench
|
| */
|
| -class VisualLightweightBenchModule : public VisualModule {
|
| +class VisualLightweightBenchModule : public VisualStreamTimingModule {
|
| public:
|
| // TODO get rid of backpointer
|
| VisualLightweightBenchModule(VisualBench* owner);
|
|
|
| - void draw(SkCanvas* canvas) override;
|
| -
|
| bool onHandleChar(SkUnichar c) override;
|
|
|
| private:
|
| - void setTitle();
|
| - bool setupBackend();
|
| - void setupRenderTarget();
|
| - void printStats();
|
| - bool advanceRecordIfNecessary(SkCanvas*);
|
| - inline void renderFrame(SkCanvas*);
|
| + void renderFrame(SkCanvas*, Benchmark*, int loops) override;
|
| + bool timingFinished(Benchmark*, int loops, double measurement) override;
|
| + void printStats(Benchmark*, int loops);
|
|
|
| struct Record {
|
| SkTArray<double> fMeasurements;
|
| };
|
| int fCurrentSample;
|
| SkTArray<Record> fRecords;
|
| - SkAutoTDelete<VisualBenchmarkStream> fBenchmarkStream;
|
| - SkAutoTUnref<Benchmark> fBenchmark;
|
| - TimingStateMachine fTSM;
|
| - bool fHasBeenReset;
|
|
|
| // support framework
|
| - SkAutoTUnref<VisualBench> fOwner;
|
| SkAutoTDelete<ResultsWriter> fResults;
|
|
|
| - typedef VisualModule INHERITED;
|
| + typedef VisualStreamTimingModule INHERITED;
|
| };
|
|
|
| #endif
|
|
|