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_android_DEFINED | 8 #ifndef Window_android_DEFINED |
9 #define Window_android_DEFINED | 9 #define Window_android_DEFINED |
10 | 10 |
11 #include <android/native_window_jni.h> | |
12 | |
13 #include "../Window.h" | 11 #include "../Window.h" |
| 12 #include "WindowContext_android.h" |
14 #include "surface_glue_android.h" | 13 #include "surface_glue_android.h" |
15 | 14 |
16 namespace sk_app { | 15 namespace sk_app { |
17 | 16 |
18 struct ContextPlatformData_android { | |
19 ANativeWindow* fNativeWindow; | |
20 }; | |
21 | |
22 class Window_android : public Window { | 17 class Window_android : public Window { |
23 public: | 18 public: |
24 Window_android() : Window() {} | 19 Window_android() : Window() {} |
25 ~Window_android() override {} | 20 ~Window_android() override {} |
26 | 21 |
27 bool init(SkiaAndroidApp* skiaAndroidApp); | 22 bool init(SkiaAndroidApp* skiaAndroidApp); |
28 void initDisplay(ANativeWindow* window); | 23 void initDisplay(ANativeWindow* window); |
29 void onDisplayDestroyed(); | 24 void onDisplayDestroyed(); |
30 | 25 |
31 const DisplayParams& getDisplayParams() override; | 26 const DisplayParams& getDisplayParams() override; |
(...skipping 14 matching lines...) Expand all Loading... |
46 private: | 41 private: |
47 SkiaAndroidApp* fSkiaAndroidApp = nullptr; | 42 SkiaAndroidApp* fSkiaAndroidApp = nullptr; |
48 SkRect fContentRect; | 43 SkRect fContentRect; |
49 DisplayParams fDisplayParams; | 44 DisplayParams fDisplayParams; |
50 BackendType fBackendType; | 45 BackendType fBackendType; |
51 }; | 46 }; |
52 | 47 |
53 } // namespace sk_app | 48 } // namespace sk_app |
54 | 49 |
55 #endif | 50 #endif |
OLD | NEW |