Even though winit works fine in android, I cannot ever grab a valid surface. Try latest master with wgpu triangle example in android and it will crash on surface creation. If you downgrade to v0.24 it works fine.
Following this thread from wgpu, I have tried to fix the surface not found on startup by adapting my logic to use Resume/Suspended events. However, only with winit v0.24 that works. If I move to v0.25 or latest master the behaviour is changed, not triggering the Resume event nor the ability to grab the surface on app startup (hence never grabbing it).
This is what happens with winit from my forked repo and ios fix, forked from tag v0.23 with just a small ios fix already in PR in winit repo:
winit = { git="https://github.com/nmpribeiro/winit.git", branch="working_android_winit"}
output:
I/rust-app: rust_jsx_ui: --- EVENT LOOP ---
D/ActivityThread: add activity client record, r= ActivityRecord{36f0754 token=android.os.BinderProxy@66c03de {io.github.nmpribeiro.rust_jsx_ui/android.app.NativeActivity}} token= android.os.BinderProxy@66c03de
D/HiTouch_PressGestureDetector: onAttached, package=io.github.nmpribeiro.rust_jsx_ui, windowType=1, mHiTouchRestricted=false
I/rust-app: rust_jsx_ui: App resumed
rust_jsx_ui: ----------------------------------------- Activating!
rust_jsx_ui: Activating now!
rust_jsx_ui: Size: 1080 x 2312
rust_jsx_ui: Instance
This is with winit v0.24:
I/rust-app: rust_jsx_ui: --- EVENT LOOP ---
D/ActivityThread: add activity client record, r= ActivityRecord{36f0754 token=android.os.BinderProxy@66c03de {io.github.nmpribeiro.rust_jsx_ui/android.app.NativeActivity}} token= android.os.BinderProxy@66c03de
D/HiTouch_PressGestureDetector: onAttached, package=io.github.nmpribeiro.rust_jsx_ui, windowType=1, mHiTouchRestricted=false
I/HwViewRootImpl: removeInvalidNode jank list is null
D/AwareBitmapCacher: handleInit switch not opened pid=22664
While in my android simulator it doesn't work, it is expected that support for OpenGL for android is still lagging behind.
Even though
winitworks fine in android, I cannot ever grab a valid surface. Try latest master with wgpu triangle example in android and it will crash on surface creation. If you downgrade tov0.24it works fine.Following this thread from wgpu, I have tried to fix the surface not found on startup by adapting my logic to use
Resume/Suspendedevents. However, only withwinitv0.24that works. If I move tov0.25or latest master the behaviour is changed, not triggering theResumeevent nor the ability to grab the surface on app startup (hence never grabbing it).This is what happens with
winitfrom my forked repo and ios fix, forked from tag v0.23 with just a small ios fix already in PR inwinitrepo:output:
This is with
winitv0.24:While in my android simulator it doesn't work, it is expected that support for OpenGL for android is still lagging behind.