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

Side by Side Diff: tools/VisualBench/VisualBench.h

Issue 1336043003: Add viewer mode to VisualBench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix init order 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 * 6 *
7 */ 7 */
8 8
9 #ifndef VisualBench_DEFINED 9 #ifndef VisualBench_DEFINED
10 #define VisualBench_DEFINED 10 #define VisualBench_DEFINED
(...skipping 15 matching lines...) Expand all
26 /* 26 /*
27 * A Visual benchmarking tool for gpu benchmarking 27 * A Visual benchmarking tool for gpu benchmarking
28 */ 28 */
29 class VisualBench : public SkOSWindow { 29 class VisualBench : public SkOSWindow {
30 public: 30 public:
31 VisualBench(void* hwnd, int argc, char** argv); 31 VisualBench(void* hwnd, int argc, char** argv);
32 ~VisualBench() override; 32 ~VisualBench() override;
33 33
34 void reset() { this->resetContext(); } 34 void reset() { this->resetContext(); }
35 35
36 void clear(SkCanvas* canvas, SkColor color, int frames);
37
36 protected: 38 protected:
37 SkSurface* createSurface() override; 39 SkSurface* createSurface() override;
38 40
39 void draw(SkCanvas* canvas) override; 41 void draw(SkCanvas* canvas) override;
40 42
41 void onSizeChange() override; 43 void onSizeChange() override;
42 44
43 private: 45 private:
44 void setTitle(); 46 void setTitle();
45 bool setupBackend(); 47 bool setupBackend();
46 void resetContext(); 48 void resetContext();
47 void setupRenderTarget(); 49 void setupRenderTarget();
48 bool onHandleChar(SkUnichar unichar) override; 50 bool onHandleChar(SkUnichar unichar) override;
49 51
50 // support framework 52 // support framework
51 SkAutoTDelete<VisualModule> fModule; 53 SkAutoTDelete<VisualModule> fModule;
52 SkAutoTUnref<SkSurface> fSurface; 54 SkAutoTUnref<SkSurface> fSurface;
53 SkAutoTUnref<GrContext> fContext; 55 SkAutoTUnref<GrContext> fContext;
54 SkAutoTUnref<GrRenderTarget> fRenderTarget; 56 SkAutoTUnref<GrRenderTarget> fRenderTarget;
55 AttachmentInfo fAttachmentInfo; 57 AttachmentInfo fAttachmentInfo;
56 SkAutoTUnref<const GrGLInterface> fInterface; 58 SkAutoTUnref<const GrGLInterface> fInterface;
57 59
58 typedef SkOSWindow INHERITED; 60 typedef SkOSWindow INHERITED;
59 }; 61 };
60 62
61 #endif 63 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/VisualBench/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698