Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRevisit how the Android port works. #20912
Conversation
| @@ -0,0 +1,3 @@ | |||
| This is a basic wrapper around Servo. While libservo itself (/components/servo/) offers a lot of flexibility, | |||
| libsimpleservo (/ports/libsimpleservo/) tries to make it easier to embed Servo, without much configuration needed. | |||
| It is limited to only one view (no tabs, no multiple renering area). | |||
This comment has been minimized.
This comment has been minimized.
|
This looks like a really useful improvement :D |
| use std::path::Path; | ||
|
|
||
| fn main() { | ||
| println!("cargo:rerun-if-changed=build.rs"); |
This comment has been minimized.
This comment has been minimized.
jdm
Jun 4, 2018
Member
Note that if the build script itself (or one of its dependencies) changes, then it's rebuilt and rerun unconditionally, so cargo:rerun-if-changed=build.rs is almost always redundant (unless you want to ignore changes in all other files except for build.rs).
From https://doc.rust-lang.org/cargo/reference/build-scripts.html
|
|
||
| struct ResourceReader(Box<ReadFileTrait>); | ||
| unsafe impl Send for ResourceReader {} | ||
| unsafe impl Sync for ResourceReader {} |
This comment has been minimized.
This comment has been minimized.
|
Note to self:
|
|
WebVR build segfaults:
|
|
@MortimerGoro I might need your help here. I get a crash in This PR changes how Servo runs on Android. Instead of using an empty Android app and load Servo via Glutin, we have a proper Android app that use a GLSurfaceView and load servo as a library and make some calls via JNI. I don't know what In the meantime, I will compile with my own version of rust-webvr see if I can find precisely where it crashes. @jdm / @MortimerGoro also, in general, do you know how to get a rust stack trace on Android when it crashes? |
|
@paulrouget I suspect that the crash is related to JNI calls which get the activity this way: android::get_app().activity Could you check that android::get_app() is not null && the activity has a correct value?. If not we'll need to implement a different way to get it or expose a method in rust-webvr to set it from servo. |
|
@paulrouget have you checked if WebGL works ok? IIRC GLSurfaceView was not a very friendly API to create shared contexts |
|
@MortimerGoro WebGL works. |
|
You were right. I'll try to figure out how to fix this. |
|
@MortimerGoro I don't use android rs glue. Should I? Does it even make sense for a library? If I don't, what's the alternative? We could add some embedder methods to access the activity. Would that be enough? |
|
I think that the best way would be to get rid of android-rs-glue, and pass the JNI JavaVM and Activity pointers to rust-webvr (e.g. in the constructor or initialization methods). |
|
To answer the question about stack traces, I do the following:
|
|
|
Entirely? Looks like it's used extensively. |
|
@MortimerGoro what if I initialize the android glue manually |
|
@bors-servo r=jdm,mortimergoro,simonsapin |
1 similar comment
|
@bors-servo r=jdm,mortimergoro,simonsapin |
|
|
|
@bors-servo r=jdm,mortimergoro,simonsapin |
|
|
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
|
|
Publish a AAR with servoview Depends on #20912 Fix #21127 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21199) <!-- Reviewable:end -->
|
This PR deleted occurrences of |
Likely. Can you file a dedicated issue for that? |

paulrouget commentedJun 4, 2018
•
edited
Fix #20855
Fix #18625
Fix #21147
Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach.
I recommend reviewing commit by commit.
To test, just follow the regular steps:
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is