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

Unified Diff: tools/VisualBench/VisualLightweightBenchModule.h

Issue 1304083007: Create module system for VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc 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 | « tools/VisualBench/VisualFlags.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/VisualLightweightBenchModule.h
diff --git a/tools/VisualBench/VisualBench.h b/tools/VisualBench/VisualLightweightBenchModule.h
similarity index 79%
copy from tools/VisualBench/VisualBench.h
copy to tools/VisualBench/VisualLightweightBenchModule.h
index 61002fc9e9355d412fc9a0e9b61036a8947583aa..64b4a11c0e0c1f5fa0b944940f60d1246b21d750 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;
/*
- * A Visual benchmarking tool for gpu benchmarking
+ * This module is designed to be a minimal overhead timing module for VisualBench
*/
-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
« no previous file with comments | « tools/VisualBench/VisualFlags.cpp ('k') | tools/VisualBench/VisualLightweightBenchModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698