| 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 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 #include "SkRect.h" |
| 12 | 13 |
| 13 class SkCanvas; | 14 class SkCanvas; |
| 14 class VulkanTestContext; | 15 class VulkanTestContext; |
| 15 | 16 |
| 16 class Window { | 17 class Window { |
| 17 public: | 18 public: |
| 18 static Window* CreateNativeWindow(void* platformData); | 19 static Window* CreateNativeWindow(void* platformData); |
| 19 | 20 |
| 20 virtual ~Window() {}; | 21 virtual ~Window() {}; |
| 21 | 22 |
| 22 virtual void setTitle(const char*) = 0; | 23 virtual void setTitle(const char*) = 0; |
| 23 virtual void show() = 0; | 24 virtual void show() = 0; |
| 24 virtual void inval() = 0; | 25 virtual void inval() = 0; |
| 25 | 26 |
| 27 virtual bool scaleContentToFit() const { return false; } |
| 28 virtual bool supportsContentRect() const { return false; } |
| 29 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } |
| 30 |
| 26 struct AttachmentInfo { | 31 struct AttachmentInfo { |
| 27 int fSampleCount; | 32 int fSampleCount; |
| 28 int fStencilBits; | 33 int fStencilBits; |
| 29 }; | 34 }; |
| 30 | 35 |
| 31 enum BackEndType { | 36 enum BackEndType { |
| 32 kNativeGL_BackendType, | 37 kNativeGL_BackendType, |
| 33 kVulkan_BackendType | 38 kVulkan_BackendType |
| 34 }; | 39 }; |
| 35 | 40 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 OnMouseFunc fMouseFunc; | 144 OnMouseFunc fMouseFunc; |
| 140 void* fMouseUserData; | 145 void* fMouseUserData; |
| 141 OnPaintFunc fPaintFunc; | 146 OnPaintFunc fPaintFunc; |
| 142 void* fPaintUserData; | 147 void* fPaintUserData; |
| 143 | 148 |
| 144 VulkanTestContext* fTestContext; | 149 VulkanTestContext* fTestContext; |
| 145 }; | 150 }; |
| 146 | 151 |
| 147 | 152 |
| 148 #endif | 153 #endif |
| OLD | NEW |