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

Side by Side Diff: tools/VisualBench.h

Issue 1151333004: CL to add setFullscreen and setVsync to SkWindow (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 6 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 *
7 */
8
robertphillips 2015/05/26 21:07:27 VisualBench_DEFINED ?
joshualitt 2015/05/27 14:09:34 Acknowledged.
9 #ifndef HelloWorld_DEFINED
10 #define HelloWorld_DEFINED
11
12 #include "SkWindow.h"
13
14 #include "SkPicture.h"
15 #include "SkSurface.h"
16 #include "gl/SkGLContext.h"
17
18 class GrContext;
19 struct GrGLInterface;
20 class GrRenderTarget;
21 class SkCanvas;
22
23 /*
24 * A Visual benchmarking tool for gpu benchmarking
25 */
26 class VisualBench : public SkOSWindow {
27 public:
28 VisualBench(void* hwnd, int argc, char** argv);
robertphillips 2015/05/26 21:07:27 rm virtual
joshualitt 2015/05/27 14:09:34 Acknowledged.
29 virtual ~VisualBench() override;
30
31 protected:
32 SkSurface* createSurface() override;
33
34 void draw(SkCanvas* canvas) override;
35
36 void onSizeChange() override;
37
38 private:
39 void setTitle();
40 bool setUpBackend();
41 void setUpRenderTarget();
42 bool onHandleChar(SkUnichar unichar) override;
43
44 int fCurrentLoops;
45 int fCurrentPicture;
46 int fCurrentFrame;
47 SkTArray<SkPicture*> fPictures;
48
49 // support framework
50 SkAutoTUnref<SkSurface> fSurface;
51 SkAutoTUnref<GrContext> fContext;
52 SkAutoTUnref<GrRenderTarget> fRenderTarget;
53 AttachmentInfo fAttachmentInfo;
54 SkAutoTUnref<const GrGLInterface> fInterface;
55
56 typedef SkOSWindow INHERITED;
57 };
58
59 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698