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

Side by Side Diff: tools/vulkan/Window.h

Issue 1873453002: Some more improvements/fixes to the VulkanViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 8 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 | « tools/vulkan/VulkanTestContext.cpp ('k') | tools/vulkan/Window.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 2016 Google Inc. 2 * Copyright 2016 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 #ifndef Window_DEFINED 8 #ifndef Window_DEFINED
9 #define Window_DEFINED 9 #define Window_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 class SkCanvas; 13 class SkCanvas;
14 class VulkanTestContext; 14 class VulkanTestContext;
15 15
16 class Window { 16 class Window {
17 public: 17 public:
18 static Window* CreateNativeWindow(void* platformData); 18 static Window* CreateNativeWindow(void* platformData);
19 19
20 virtual ~Window() {}; 20 virtual ~Window() {};
21 21
22 virtual void setTitle(const char*) = 0; 22 virtual void setTitle(const char*) = 0;
23 virtual void show() = 0; 23 virtual void show() = 0;
24 24
25 struct AttachmentInfo { 25 struct AttachmentInfo {
26 int fSampleCount; 26 int fSampleCount;
27 int fStencilBits; 27 int fStencilBits;
28 }; 28 };
29 29
30 enum BackEndTypes { 30 enum BackEndType {
31 kNativeGL_BackendType, 31 kNativeGL_BackendType,
32 kVulkan_BackendType 32 kVulkan_BackendType
33 }; 33 };
34 34
35 virtual bool attach(BackEndTypes attachType, int msaaSampleCount, Attachment Info*) = 0; 35 virtual bool attach(BackEndType attachType, int msaaSampleCount, AttachmentI nfo*) = 0;
36 void detach(); 36 void detach();
37 37
38 // input handling 38 // input handling
39 enum Key { 39 enum Key {
40 kNONE_Key, //corresponds to android's UNKNOWN 40 kNONE_Key, //corresponds to android's UNKNOWN
41 41
42 kLeftSoftKey_Key, 42 kLeftSoftKey_Key,
43 kRightSoftKey_Key, 43 kRightSoftKey_Key,
44 44
45 kHome_Key, //!< the home key - added to match android 45 kHome_Key, //!< the home key - added to match android
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 OnMouseFunc fMouseFunc; 132 OnMouseFunc fMouseFunc;
133 void* fMouseUserData; 133 void* fMouseUserData;
134 OnPaintFunc fPaintFunc; 134 OnPaintFunc fPaintFunc;
135 void* fPaintUserData; 135 void* fPaintUserData;
136 136
137 VulkanTestContext* fTestContext; 137 VulkanTestContext* fTestContext;
138 }; 138 };
139 139
140 140
141 #endif 141 #endif
OLDNEW
« no previous file with comments | « tools/vulkan/VulkanTestContext.cpp ('k') | tools/vulkan/Window.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698