Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: tools/viewer/sk_app/android/Window_android.h

Issue 2032623002: Implement OpenGL backend in Android viewer app (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698