You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
GLSurfaceView: remove old implementation, import the one from AOSP
Now that we have a reasonably well working SurfaceView implementation, it is actually cleaner to just implement GLSurfaceView the way AOSP does. In fact, their code doesn't have any weird dependencies, and can mostly be used as-is. The AOSP code is pure Java, which means we had to implement some EGL wrappers. This change fixes issues with Wayland (it only ever worked because the pbuffers were allocated using an XWayland EGLDisplay), and with resizing (which we simply didn't support), all while getting rid of quite some (arguably not very readable) LoC.
This commit is contained in:
@@ -41,18 +41,6 @@ struct handle_cache {
|
||||
jclass class;
|
||||
jmethodID constructor;
|
||||
} canvas;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onSurfaceCreated;
|
||||
jmethodID onSurfaceChanged;
|
||||
jmethodID onDrawFrame;
|
||||
} renderer;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onTouchEvent;
|
||||
jmethodID wrap_EGLContextFactory_createContext;
|
||||
jmethodID wrap_EGLConfigChooser_chooseConfig;
|
||||
} gl_surface_view;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onPeriodicNotification;
|
||||
@@ -64,7 +52,8 @@ struct handle_cache {
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID surfaceCreated;
|
||||
} surface_holder_callback;
|
||||
jmethodID surfaceChanged;
|
||||
} surface_view;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID setLayoutParams;
|
||||
|
||||
Reference in New Issue
Block a user