There are many Widgets extending FrameLayout and adding custom behaviour
on top. For example NavigationView. This didn't realy work with our
custom implementation
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.
The current implementation requires a VA-API driver and a Wayland
compositor with YUV-buffer support. GNOME supports YUV-buffers
since the recent version 45 release
implements android.graphics.Typeface (always uses default
typeface for now), one version of Canvas.drawText, one version
of Paint.measureText, and Paint.ascend
Using the C API provided by SkiaSharp's skia fork instead of using cairo
significantly improves performance. The API is also closer to the android
Canvas API, which makes the implementation more straightforward.
This is based on the implementation from https://www.sqlite.org/android,
which is equal to the AOSP implementation besides not depending private
Android APIs.
The code has been rewritten from C++ to C.