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

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

Issue 1978573003: Add OpenGL context to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Android stuff 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
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
38 }; 43 };
39 44
40 virtual bool attach(BackEndType attachType, const DisplayParams& params) = 0; 45 virtual bool attach(BackendType attachType, const DisplayParams& params) = 0;
41 void detach(); 46 void detach();
42 47
43 // input handling 48 // input handling
44 enum class Key { 49 enum class Key {
45 kNONE, //corresponds to android's UNKNOWN 50 kNONE, //corresponds to android's UNKNOWN
46 51
47 kLeftSoftKey, 52 kLeftSoftKey,
48 kRightSoftKey, 53 kRightSoftKey,
49 54
50 kHome, //!< the home key - added to match android 55 kHome, //!< the home key - added to match android
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 OnMouseFunc fMouseFunc; 151 OnMouseFunc fMouseFunc;
147 void* fMouseUserData; 152 void* fMouseUserData;
148 OnPaintFunc fPaintFunc; 153 OnPaintFunc fPaintFunc;
149 void* fPaintUserData; 154 void* fPaintUserData;
150 155
151 WindowContext* fWindowContext; 156 WindowContext* fWindowContext;
152 }; 157 };
153 158
154 } // namespace sk_app 159 } // namespace sk_app
155 #endif 160 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698