Commit Graph

135 Commits

Author SHA1 Message Date
Mis012
4374ac01ad AssetManager: use libandroidfw to read assets straight from the apk file
they can still be put on the filesystem and will be read from there
preferentially, though overriding assets in this way can confuse
some creatively written apps and cause them to crash.
2024-05-26 00:10:16 +02:00
Julian Winkler
34c03c59c3 add some methods needed for NewPipe release 0.27.0 2024-05-23 22:14:30 +02:00
Julian Winkler
fdec418102 add some stubs needed because of previous commits
Since we now call draw() on View subclasses, we reach some new
codepaths which need new stubs
2024-05-20 08:12:15 +02:00
Julian Winkler
53d6714a0d DrawableContainer: forward method calls to current selected drawable 2024-05-20 08:12:15 +02:00
Julian Winkler
765f01e715 Drawable: implement GradientDrawable.inflate() and Drawable.createFromXmlInner() 2024-05-20 08:12:15 +02:00
Mis012
341e39463a api-impl: copy GradientDrawable from AOSP, some stubs 2024-04-23 19:14:41 +02:00
Mis012
e1abceee85 api-impl: more stubs to make OsmAnd launch
with latest bionic_translation, OsmAnd doesn't crash in native code
2024-04-14 15:15:42 +02:00
Mis012
2802aaa28d api-impl: add stubs / simple stuff for OsmAnd
without native libs present, launches and renders white square
in map view; with native libs present, segfaults in bundled skia
2024-04-13 15:22:38 +02:00
Mis012
25325ca4e5 Paint: implement setAntiAlias, handle ANTI_ALIAS_FLAG 2024-04-09 18:58:05 +02:00
Julian Winkler
3d9eb9611f GskCanvas: implement drawPath, rotate, translate, save, restore
This is enough to make DrawerArrowDrawable functional.

drawPath() only draws line segments for now.
2024-04-09 18:19:18 +02:00
Julian Winkler
74bedcc93c implement Drawable.invalidateSelf() 2024-04-09 18:19:18 +02:00
Julian Winkler
2f4cd3917f implement some APIs needed for OctoDroid 2024-04-09 18:19:13 +02:00
Mis012
b229d83ad8 GskCanvas: implement drawRect 2024-04-07 23:23:30 +02:00
Mis012
677ff43a20 ColorDrawable: add a draw method
we don't use this directly, but it can be called by an app
2024-04-07 23:23:30 +02:00
Mis012
1e64babfd4 borrow AnimationDrawable from AOSP 2024-04-03 01:55:03 +02:00
Julian Winkler
8eb0c0a3c1 implement ColorFilter in GskCanvas
This is needed to make icons follow night mode setting
2024-03-24 22:13:28 +01:00
Julian Winkler
ad266c7821 add support for custom Java Drawables
This is made possible, by adding a second Canvas implementation which
can be used to render directly to GdkSnapshot objects

For now the only implemented method is drawBitmap(), this is already
enough to make VectorDrawableCompat functional
2024-03-24 22:13:28 +01:00
Julian Winkler
0b78cbcc55 some graphics API stubs 2024-03-24 22:13:28 +01:00
Julian Winkler
3d9468aa9f implement android.graphics.Path using skia 2024-03-24 22:13:28 +01:00
Julian Winkler
f4a0191b1c implement VectorDrawable, by loading tmp SVG with gdkpixbuf
This won't work for Apps using VectorDrawableCompat
2024-03-24 21:26:38 +01:00
Julian Winkler
276b5ca7ef add more APIs needed for NewPipe 2024-03-17 20:02:50 +01:00
Mis012
ab7c6cf834 api-impl: add stubs to make AnimationDrawable and Animation not cause lockups
apps may (ab)use AnimationDrawable.run and Animation.setAnimationListener
to time transitions between states; even though we don't currently implement
the animations, state transitions are still desirable (otherwise the app may
lock up)
2024-03-16 23:37:16 +01:00
Mis012
2e864adc0f implement drawing into Bitmaps with Canvas, make BitmapDrawable use use paintable, misc Bitmap improvements 2024-03-16 15:00:22 +01:00
Mis012
fa1aa36f6b api-impl: add stubs, put Vibrator.java in meson.build (oops), sort sources with LC_ALL=C sort -h 2024-03-16 10:13:55 +01:00
Julian Winkler
796742c0fc implement android.graphics.Matrix and View.getMatrix()
This is needed for androidx CoordinatorLayout and will also be required
for VectorDrawables
2024-03-15 18:57:49 +01:00