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