Commit graph

882 commits

Author SHA1 Message Date
Julian Winkler
09a38f9a28 AudioTrack: set buffer size and period size correctly
Android buffer size is in bytes, but ALSA buffer size is in frames. Also
the period size was not set previously.

This fixes several audio issues on postmarketOS and probably other
distributions that still use PulseAudio instead of PipeWire.
2024-12-30 09:47:14 +01:00
Julian Winkler
d6f50e160c handle trailing colons when parsing gtk-decoration-layout
postmarketOS Phosh has the default gtk-decoration-layout set to "menu:".
We don't want window decorations there by default.
2024-12-30 09:47:14 +01:00
Julian Winkler
054fb9276a GLSurfaceView: call eglMakeCurrent() again after onSurfaceCreated()
This seems to be required by some newer mesa drivers. For example when
running Flappy Bird with latest freedreno drivers.
2024-12-30 09:47:14 +01:00
Julian Winkler
b4f7c64cef Context.updateConfig(): handle XDG-portal unvavailablility
The XDG-portal DBus instance is not available to applications launched
from SSH on postmarketOS.
2024-12-30 09:46:52 +01:00
Julian Winkler
bf923cfcfa Bitmap: create Texture as GdkMemoryTexture if nothing has to be rendered
This improves OsmAnd V1 renderer performance.
2024-12-22 23:40:11 +01:00
Julian Winkler
0dfcb9324f drop GTK < 4.14 ifdefs 2024-12-22 23:40:11 +01:00
Julian Winkler
260821d68c Bitmap: implement pixel buffer access
For GPU textures, the GdkTextureDownloader will take care of format
conversions, so the application never sees the actual format.

If the application calls AndroidBitmap_unlockPixels(), the texture is
converted into a GdkMemoryTexture and can be accessed zero copy.
2024-12-22 23:40:11 +01:00
Julian Winkler
7695aadf91 implement Paint as combination of GDK, GSK and Pango attributes 2024-12-22 23:40:11 +01:00
Julian Winkler
ba302d87ec add back graphics APIs for the previously working applications 2024-12-22 12:30:29 +01:00
Julian Winkler
f3bc468a1c drop Skia dependency
Everything is implementede using GTK Scene Graph now. Skia is no longer
needed.
2024-12-22 12:30:29 +01:00
Julian Winkler
cd2c69cf73 reimplement Bitmap and Path using GdkTexture and GskPath
This allows us to use GskCanvas for Bitmap rendering

This increases the required GTK version to >= 4.14.
2024-12-22 12:30:29 +01:00
Julian Winkler
c076c1e545 implement DateUtils.formatDateTime() 2024-12-22 12:30:29 +01:00
Julian Winkler
2f122cbad7 SurfaceView.unlockCanvasAndPost(): create GSK renderer without surface
This is needed to allow using the renderer on non UI threads.
2024-12-22 10:24:55 +01:00
Julian Winkler
ae58d29336 BitmapDrawable: support intrinsic sizes 2024-12-22 10:24:55 +01:00
Julian Winkler
e8a08f3d28 implement HtcAlertDialog for Teeter 2024-12-22 10:24:55 +01:00
Julian Winkler
bf610d3504 implement Activity.isInMultiWindowMode() 2024-12-22 10:24:54 +01:00
Julian Winkler
f9db8faebd ImageButton: set the defStyleAttr 2024-12-22 10:24:54 +01:00
Julian Winkler
2e11934bcf Animator: add delay before calling onAnimationEnd()
This fixes a crash in NewPipe's Download Activity
2024-12-20 08:12:48 +01:00
Mis012
078006f7fb LayoutInflater: prettyprint debug messages 2024-12-20 00:14:30 +01:00
Mis012
060ea72f94 AssetManager: use AndroidManifest.xml to identify apks
resources.arsc may be missing in rare cases
2024-12-20 00:12:01 +01:00
Mis012
58745f23ea api-impl: misc stubs, additions and fixes 2024-12-20 00:11:06 +01:00
Mis012
df5390db5e main-executable: don't crash on NULL app_icon_path 2024-12-20 00:02:18 +01:00
Mis012
4acd99f1e2 GridView: import from AOSP 2024-12-20 00:00:19 +01:00
Julian Winkler
42fad0cfa6 WindowManagerImpl: set view.parent 2024-12-17 22:41:51 +01:00
Julian Winkler
167d3856e9 HACK: prevent window height of 0
For some reason some apps like LibreSudoku try to create Dialog and
Popup windows with height = 0. Prevent this on the window side until the
measurement error is fixed.
2024-12-17 22:41:51 +01:00
Julian Winkler
47fc749018 implement WindowManager for composeUI popups
currently everything is created as GtkPopover which is not ideal for
toplevel windows, so print a warning in that case.
2024-12-17 22:38:09 +01:00
Julian Winkler
c8ed103516 implement Canvas.scale() for skia and GtkSnapshot 2024-12-16 17:54:15 +01:00
Julian Winkler
597c73f334 GskCanvas: implement RoundedRect filling 2024-12-16 17:54:15 +01:00
Julian Winkler
0e078894ce make K-9 Mail launch 2024-12-16 17:54:15 +01:00
Benedikt Wildenhain
17713781d0 doc/Build.md: fix a typo
If you distro ships this already -> If your …
2024-12-15 17:57:38 +00:00
Julian Winkler
967e6e9b94 AndroidLayout: prevent unnecessary measurements between two JavaWidgets
GTK sometimes calls widget_measure() from widget_allocate(). This is
unnecessary if the parent and child are both JavaWidgets and these
unexpected measurements can confuse Views.
2024-12-15 18:06:58 +01:00
Julian Winkler
af122a6891 VectorDrawable: generate Bitmap in the correct size 2024-12-15 07:39:41 +01:00
Julian Winkler
9023e2963b ImageView: implement tint attribute 2024-12-15 07:39:25 +01:00
Julian Winkler
b087b82616 implement WallpaperManager.setBitmap() using XDG Portal 2024-12-13 22:32:04 +01:00
Julian Winkler
5150564a5b implement Window.setLayout() 2024-12-13 22:32:04 +01:00
Julian Winkler
1fd2638c57 set Configuration.screenWidthDp and Configuration.screenHeightDp 2024-12-13 22:32:04 +01:00
Julian Winkler
1955522b28 android.text.Layout: actually measure text sizes 2024-12-13 22:32:04 +01:00
Julian Winkler
864750020e View: always call dispatchTouchEvent() if overwritten 2024-12-13 22:32:04 +01:00
Julian Winkler
1398125eb5 api-impl: stubs and fixes for Compose Stopwatch and LibreSudoku 2024-12-13 22:32:02 +01:00
Julian Winkler
b9272aa150 Window: fix some regressions caused by decorView
The window background is now set on the decorView and also
window.set_widget_as_root() must now be called manually.
2024-12-13 21:23:50 +00:00
Julian Winkler
db1e9458de meson.build run dx with --incremental
This enables incremental dexing which speeds up incremental builds
2024-12-13 21:43:50 +01:00
Julian Winkler
413d3ee69f compile java files with ant for incremental builds
Meson doesn't support incremental builds for java, so delegate the java
compilation to Ant if available.
2024-12-13 21:43:50 +01:00
Julian Winkler
a1c29c012e meson.build: don't build test_runner.jar by default 2024-12-13 09:29:54 +01:00
Julian Winkler
c4d20b828e Window: directly attach the decorView 2024-12-02 22:03:26 +01:00
Julian Winkler
036b5510d3 implement dispatchKeyEvent callback 2024-12-01 14:15:00 +00:00
Julian Winkler
fe7790c4ff View: implement requestFocus() and isFocused() 2024-12-01 14:15:00 +00:00
Julian Winkler
d0952101a6 implement some Canvas methods needed for composeUI 2024-12-01 14:15:00 +00:00
Julian Winkler
cb7805bb45 Window: implement getDecorView() properly
This is needed to fix the "ViewTreeLifecycleOwner not found" error in
composeUI.
2024-12-01 14:15:00 +00:00
Julian Winkler
e9cf5e7002 API stubs and fixes for composeUI 2024-12-01 14:15:00 +00:00
Julian Winkler
447784b6d6 GridView: fix errors missed due to this file mistakenly not getting built before 2024-12-01 14:31:06 +01:00