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

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, 7 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 | « src/views/unix/SkOSWindow_Unix.cpp ('k') | tools/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
(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
9 #ifndef VisualBench_DEFINED
10 #define VisualBench_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);
29 ~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
« no previous file with comments | « src/views/unix/SkOSWindow_Unix.cpp ('k') | tools/VisualBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698