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

Side by Side Diff: tools/viewer/sk_app/Window.h

Issue 1990893002: Revert of Add OpenGL context to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « tools/viewer/sk_app/VulkanWindowContext.cpp ('k') | tools/viewer/sk_app/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
(...skipping 14 matching lines...) Expand all
25 virtual ~Window() {}; 25 virtual ~Window() {};
26 26
27 virtual void setTitle(const char*) = 0; 27 virtual void setTitle(const char*) = 0;
28 virtual void show() = 0; 28 virtual void show() = 0;
29 virtual void inval() = 0; 29 virtual void inval() = 0;
30 30
31 virtual bool scaleContentToFit() const { return false; } 31 virtual bool scaleContentToFit() const { return false; }
32 virtual bool supportsContentRect() const { return false; } 32 virtual bool supportsContentRect() const { return false; }
33 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } 33 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); }
34 34
35 enum BackendType { 35 enum BackEndType {
36 kNativeGL_BackendType, 36 kNativeGL_BackendType,
37 kVulkan_BackendType, 37 kVulkan_BackendType
38
39 kLast_BackendType = kVulkan_BackendType
40 };
41 enum {
42 kBackendTypeCount = kLast_BackendType + 1
43 }; 38 };
44 39
45 virtual bool attach(BackendType attachType, const DisplayParams& params) = 0; 40 virtual bool attach(BackEndType attachType, const DisplayParams& params) = 0;
46 void detach(); 41 void detach();
47 42
48 // input handling 43 // input handling
49 enum class Key { 44 enum class Key {
50 kNONE, //corresponds to android's UNKNOWN 45 kNONE, //corresponds to android's UNKNOWN
51 46
52 kLeftSoftKey, 47 kLeftSoftKey,
53 kRightSoftKey, 48 kRightSoftKey,
54 49
55 kHome, //!< the home key - added to match android 50 kHome, //!< the home key - added to match android
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 OnMouseFunc fMouseFunc; 146 OnMouseFunc fMouseFunc;
152 void* fMouseUserData; 147 void* fMouseUserData;
153 OnPaintFunc fPaintFunc; 148 OnPaintFunc fPaintFunc;
154 void* fPaintUserData; 149 void* fPaintUserData;
155 150
156 WindowContext* fWindowContext; 151 WindowContext* fWindowContext;
157 }; 152 };
158 153
159 } // namespace sk_app 154 } // namespace sk_app
160 #endif 155 #endif
OLDNEW
« no previous file with comments | « tools/viewer/sk_app/VulkanWindowContext.cpp ('k') | tools/viewer/sk_app/Window.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698