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 24 matching lines...) Expand all Loading... |
35 // Make sure that either onPaint or markInvalReceived is called when the cli
ent window consumes | 35 // Make sure that either onPaint or markInvalReceived is called when the cli
ent window consumes |
36 // the the inval event. They unset fIsContentInvalided which allow future on
Inval. | 36 // the the inval event. They unset fIsContentInvalided which allow future on
Inval. |
37 void inval(); | 37 void inval(); |
38 | 38 |
39 virtual bool scaleContentToFit() const { return false; } | 39 virtual bool scaleContentToFit() const { return false; } |
40 virtual bool supportsContentRect() const { return false; } | 40 virtual bool supportsContentRect() const { return false; } |
41 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } | 41 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } |
42 | 42 |
43 enum BackendType { | 43 enum BackendType { |
44 kNativeGL_BackendType, | 44 kNativeGL_BackendType, |
| 45 #ifdef SK_VULKAN |
45 kVulkan_BackendType, | 46 kVulkan_BackendType, |
| 47 #endif |
46 kRaster_BackendType, | 48 kRaster_BackendType, |
47 | 49 |
48 kLast_BackendType = kRaster_BackendType | 50 kLast_BackendType = kRaster_BackendType |
49 }; | 51 }; |
50 enum { | 52 enum { |
51 kBackendTypeCount = kLast_BackendType + 1 | 53 kBackendTypeCount = kLast_BackendType + 1 |
52 }; | 54 }; |
53 | 55 |
54 virtual bool attach(BackendType attachType, const DisplayParams& params) =
0; | 56 virtual bool attach(BackendType attachType, const DisplayParams& params) =
0; |
55 void detach(); | 57 void detach(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 virtual void onInval() = 0; | 192 virtual void onInval() = 0; |
191 | 193 |
192 // Uncheck fIsContentInvalided to allow future inval/onInval. | 194 // Uncheck fIsContentInvalided to allow future inval/onInval. |
193 void markInvalProcessed(); | 195 void markInvalProcessed(); |
194 | 196 |
195 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida
te events | 197 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida
te events |
196 }; | 198 }; |
197 | 199 |
198 } // namespace sk_app | 200 } // namespace sk_app |
199 #endif | 201 #endif |
OLD | NEW |