Chromium Code Reviews| Index: tools/VisualBench/VisualLightweightBenchModule.h |
| diff --git a/tools/VisualBench/VisualBench.h b/tools/VisualBench/VisualLightweightBenchModule.h |
| similarity index 80% |
| copy from tools/VisualBench/VisualBench.h |
| copy to tools/VisualBench/VisualLightweightBenchModule.h |
| index 61002fc9e9355d412fc9a0e9b61036a8947583aa..17505089dc76725f04a27a1b8980974089a4c8cb 100644 |
| --- a/tools/VisualBench/VisualBench.h |
| +++ b/tools/VisualBench/VisualLightweightBenchModule.h |
| @@ -6,39 +6,29 @@ |
| * |
| */ |
| -#ifndef VisualBench_DEFINED |
| -#define VisualBench_DEFINED |
| +#ifndef VisualLightweightBenchModule_DEFINED |
| +#define VisualLightweightBenchModule_DEFINED |
| -#include "SkWindow.h" |
| +#include "VisualModule.h" |
| #include "ResultsWriter.h" |
| #include "SkPicture.h" |
| -#include "SkString.h" |
| -#include "SkSurface.h" |
| #include "Timer.h" |
| +#include "VisualBench.h" |
| #include "VisualBenchmarkStream.h" |
| -#include "gl/SkGLContext.h" |
| -class GrContext; |
| -struct GrGLInterface; |
| -class GrRenderTarget; |
| class SkCanvas; |
| /* |
|
robertphillips
2015/09/08 12:38:05
New comment ?
|
| * A Visual benchmarking tool for gpu benchmarking |
| */ |
| -class VisualBench : public SkOSWindow { |
| +class VisualLightweightBenchModule : public VisualModule { |
| public: |
| - VisualBench(void* hwnd, int argc, char** argv); |
| - ~VisualBench() override; |
| - |
| -protected: |
| - SkSurface* createSurface() override; |
| + // TODO get rid of backpointer |
| + VisualLightweightBenchModule(VisualBench* owner); |
| void draw(SkCanvas* canvas) override; |
| - void onSizeChange() override; |
| - |
| private: |
| /* |
| * The heart of visual bench is an event driven timing loop. |
| @@ -70,9 +60,7 @@ private: |
| }; |
| void setTitle(); |
| bool setupBackend(); |
| - void resetContext(); |
| void setupRenderTarget(); |
| - bool onHandleChar(SkUnichar unichar) override; |
| void printStats(); |
| bool advanceRecordIfNecessary(SkCanvas*); |
| inline void renderFrame(SkCanvas*); |
| @@ -101,14 +89,10 @@ private: |
| SkAutoTUnref<Benchmark> fBenchmark; |
| // support framework |
| - SkAutoTUnref<SkSurface> fSurface; |
| - SkAutoTUnref<GrContext> fContext; |
| - SkAutoTUnref<GrRenderTarget> fRenderTarget; |
| - AttachmentInfo fAttachmentInfo; |
| - SkAutoTUnref<const GrGLInterface> fInterface; |
| + SkAutoTUnref<VisualBench> fOwner; |
| SkAutoTDelete<ResultsWriter> fResults; |
| - typedef SkOSWindow INHERITED; |
| + typedef VisualModule INHERITED; |
| }; |
| #endif |