| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 virtual ~Window() {}; | 21 virtual ~Window() {}; |
| 22 | 22 |
| 23 virtual void setTitle(const char*) = 0; | 23 virtual void setTitle(const char*) = 0; |
| 24 virtual void show() = 0; | 24 virtual void show() = 0; |
| 25 virtual void inval() = 0; | 25 virtual void inval() = 0; |
| 26 | 26 |
| 27 virtual bool scaleContentToFit() const { return false; } | 27 virtual bool scaleContentToFit() const { return false; } |
| 28 virtual bool supportsContentRect() const { return false; } | 28 virtual bool supportsContentRect() const { return false; } |
| 29 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } | 29 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } |
| 30 | 30 |
| 31 struct AttachmentInfo { | |
| 32 int fSampleCount; | |
| 33 int fStencilBits; | |
| 34 }; | |
| 35 | |
| 36 enum BackEndType { | 31 enum BackEndType { |
| 37 kNativeGL_BackendType, | 32 kNativeGL_BackendType, |
| 38 kVulkan_BackendType | 33 kVulkan_BackendType |
| 39 }; | 34 }; |
| 40 | 35 |
| 41 virtual bool attach(BackEndType attachType, int msaaSampleCount, AttachmentI
nfo*) = 0; | 36 virtual bool attach(BackEndType attachType, int msaaSampleCount) = 0; |
| 42 void detach(); | 37 void detach(); |
| 43 | 38 |
| 44 // input handling | 39 // input handling |
| 45 enum Key { | 40 enum Key { |
| 46 kNONE_Key, //corresponds to android's UNKNOWN | 41 kNONE_Key, //corresponds to android's UNKNOWN |
| 47 | 42 |
| 48 kLeftSoftKey_Key, | 43 kLeftSoftKey_Key, |
| 49 kRightSoftKey_Key, | 44 kRightSoftKey_Key, |
| 50 | 45 |
| 51 kHome_Key, //!< the home key - added to match android | 46 kHome_Key, //!< the home key - added to match android |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 OnMouseFunc fMouseFunc; | 139 OnMouseFunc fMouseFunc; |
| 145 void* fMouseUserData; | 140 void* fMouseUserData; |
| 146 OnPaintFunc fPaintFunc; | 141 OnPaintFunc fPaintFunc; |
| 147 void* fPaintUserData; | 142 void* fPaintUserData; |
| 148 | 143 |
| 149 VulkanTestContext* fTestContext; | 144 VulkanTestContext* fTestContext; |
| 150 }; | 145 }; |
| 151 | 146 |
| 152 | 147 |
| 153 #endif | 148 #endif |
| OLD | NEW |