Index: tools/viewer/sk_app/android/Window_android.h |
diff --git a/tools/viewer/sk_app/android/Window_android.h b/tools/viewer/sk_app/android/Window_android.h |
index f1c079835bb32b5eecfb1344e941d7e5efce2f69..2a7ff4730ad7135ff4c99c8838e962cf8ba48fcc 100644 |
--- a/tools/viewer/sk_app/android/Window_android.h |
+++ b/tools/viewer/sk_app/android/Window_android.h |
@@ -8,11 +8,17 @@ |
#ifndef Window_android_DEFINED |
#define Window_android_DEFINED |
+#include <android/native_window_jni.h> |
+ |
#include "../Window.h" |
#include "surface_glue_android.h" |
namespace sk_app { |
+struct ContextPlatformData_android { |
+ ANativeWindow* fNativeWindow; |
+}; |
+ |
class Window_android : public Window { |
public: |
Window_android() : Window() {} |
@@ -38,9 +44,13 @@ public: |
void setContentRect(int l, int t, int r, int b) { fContentRect.set(l,t,r,b); } |
private: |
+ // We need fNativeWindow for attaching with another backend. |
+ // (in that case, attach is called without initDisplay being called later) |
+ ANativeWindow* fNativeWindow = nullptr; |
SkiaAndroidApp* fSkiaAndroidApp = nullptr; |
SkRect fContentRect; |
DisplayParams fDisplayParams; |
+ BackendType fBackendType; |
}; |
} // namespace sk_app |