Closed
Bug 1323612
Opened 8 years ago
Closed 8 years ago
Build webrender on android
Categories
(Core :: Graphics: WebRender, defect)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(3 files, 17 obsolete files)
2.49 KB,
patch
|
Details | Diff | Splinter Review | |
1.08 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
14.88 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
We need to make graphic branch works on android
Assignee | ||
Comment 1•8 years ago
|
||
For now, we need to set Android NDK's API leven to 18. Since WebRender requests OpenGL ES 3.0 on android and it is supported since api level 18 on android.
Assignee | ||
Comment 2•8 years ago
|
||
android build requests rust librarys of armv7-linux-androideabi. Without them, "./mach build" emitted the following error.
----------------------------------------------------------------------
0:00.80 DEBUG: Executing: `/usr/local/bin/rustc --crate-type staticlib --target=armv7-linux-androideabi -o /tmp/conftestsC6uc0.rlib /tmp/conftestym0zSN.rs`
0:00.80 DEBUG: The command returned non-zero exit status 101.
0:00.80 DEBUG: Its error output was:
0:00.80 DEBUG: | error[E0463]: can't find crate for `std`
0:00.80 DEBUG: | |
0:00.80 DEBUG: | = note: the `armv7-linux-androideabi` target may not be installed
0:00.80 DEBUG: |
0:00.80 DEBUG: | error: aborting due to previous error
0:00.80 DEBUG: |
0:00.80 ERROR: Cannot compile for arm-unknown-linux-androideabi with /usr/local/bin/rustc
0:00.80 The target may be unsupported, or you may not have
Assignee | ||
Comment 3•8 years ago
|
||
I did not know the official place to download the librarys of armv7-linux-androideabi. Then I referred servo build. bootstrap_commands.py[1] did download of pre-built compiler and prebuilt libraries. I manually downloaded the library from [2].
[1] https://dxr.mozilla.org/servo/source/python/servo/bootstrap_commands.py
[2] https://static-rust-lang-org.s3.amazonaws.com/dist/2016-11-29/rust-std-nightly-armv7-linux-androideabi.tar.gz
Assignee | ||
Comment 4•8 years ago
|
||
I used the following mozconfig to build on android
--------------------------------------------------
# Build Firefox for Android:
ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
# With the following Android SDK and NDK:
ac_add_options --with-android-sdk="/absolute/path/to/android-sdk"
ac_add_options --with-android-ndk="/absolute/path/to/android-ndk-r11b"
ac_add_options --with-android-version="18"
ac_add_options --enable-rust
ac_add_options --enable-webrender
Assignee | ||
Comment 5•8 years ago
|
||
Assignee | ||
Comment 6•8 years ago
|
||
Fixed start up freeze. But gecko rendering result was not shown.
Attachment #8818756 -
Attachment is obsolete: true
Assignee | ||
Comment 7•8 years ago
|
||
Output webrender composition result. Some gl calls seems to work, but image rendering of webrender did not work well. The symptom seems same to Bug 1323316 Comment 1.
Attachment #8818820 -
Attachment is obsolete: true
Assignee | ||
Comment 8•8 years ago
|
||
Attachment #8818837 -
Attachment is obsolete: true
Assignee | ||
Comment 9•8 years ago
|
||
Attachment #8819774 -
Attachment is obsolete: true
Assignee | ||
Comment 10•8 years ago
|
||
Attachment #8820170 -
Attachment is obsolete: true
Assignee | ||
Comment 11•8 years ago
|
||
Addressed profiler's glyph rendering. Image rendering still did not work.
Attachment #8820568 -
Attachment is obsolete: true
Assignee | ||
Comment 12•8 years ago
|
||
During checking I noticed that gl::RED works on ANGLE on windows as GL_FORMAT_A, but gl::RED did not work on my nexus5X(arm). It might be a reason why GL_FORMAT_BGRA is used for ImageFormat::A8.
Assignee | ||
Comment 13•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
See Also: → https://github.com/servo/webrender/issues/661
Assignee | ||
Comment 14•8 years ago
|
||
Rebased. Rendering result and problems were same, but oom crash happened more easy.
Attachment #8821005 -
Attachment is obsolete: true
Assignee | ||
Comment 15•8 years ago
|
||
Attachment #8827340 -
Attachment is obsolete: true
Assignee | ||
Comment 16•8 years ago
|
||
FFI is broken on android, bug 1332737 is going to address it.
Assignee | ||
Comment 17•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #16)
> FFI is broken on android, bug 1332737 is going to address it.
It causes crash.
Assignee | ||
Comment 18•8 years ago
|
||
Attachment #8827341 -
Attachment is obsolete: true
Assignee | ||
Comment 19•8 years ago
|
||
Attachment #8830552 -
Attachment is obsolete: true
Assignee | ||
Comment 20•8 years ago
|
||
Attachment #8830928 -
Attachment is obsolete: true
Assignee | ||
Comment 21•8 years ago
|
||
With https://github.com/servo/webrender/pull/791, I confirmed rendering on android device.
Assignee | ||
Comment 22•8 years ago
|
||
Attachment #8830946 -
Attachment is obsolete: true
Assignee | ||
Comment 23•8 years ago
|
||
Attachment #8830988 -
Attachment is obsolete: true
Assignee | ||
Comment 24•8 years ago
|
||
With attachment 8831127 [details] [diff] [review], content is rendered, but scroll and touch did not work since APZ is not implemented yet.
Assignee | ||
Comment 25•8 years ago
|
||
:kats, is it possible to enable touch without apz? Touch did not work, but I could check the navigation by bluetooth keyboard.
Flags: needinfo?(bugmail)
Comment 26•8 years ago
|
||
Not really, we don't have any main-thread touch scrolling code. I can probably hack something up to add to the fennec browser.js if you really want.
Flags: needinfo?(bugmail)
Comment 27•8 years ago
|
||
This is what i had in mind. I'm doing a regular fennec build now to see if it works.
Comment 28•8 years ago
|
||
Comment on attachment 8831152 [details] [diff] [review]
very slightly tested scrolling patch
I tried this patch in a regular firefox for android build and it seemed to do what I expected. So I think it should give you some basic ability to scroll in a webrender android build as well. I don't know if you'll be able to tap on links though, probably not.
Attachment #8831152 -
Attachment description: totally untested scrolling patch → very slightly tested scrolling patch
Assignee | ||
Comment 29•8 years ago
|
||
Thanks!
Assignee | ||
Comment 30•8 years ago
|
||
attachment 8831152 [details] [diff] [review] and with some modifications to nsWindow, I also confirmed the scroll:-)
Assignee | ||
Comment 31•8 years ago
|
||
Add attachment 8831152 [details] [diff] [review] and change to nsWindow. Confirmed that main thread scroll works. Touch still do now work though.
Attachment #8831127 -
Attachment is obsolete: true
Comment 32•8 years ago
|
||
It's worth noting that for the time being you need the following in your mozconfig to build this:
ac_add_options --with-android-version=18
ac_add_options --enable-webrender
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 33•8 years ago
|
||
Attachment #8831193 -
Attachment is obsolete: true
Assignee | ||
Comment 34•8 years ago
|
||
(In reply to George Wright (:gw280) (needinfo me!) from comment #32)
> It's worth noting that for the time being you need the following in your
> mozconfig to build this:
>
> ac_add_options --with-android-version=18
> ac_add_options --enable-webrender
With attachment 8852425 [details] [diff] [review], we do not need "ac_add_options --with-android-version=18".
Assignee | ||
Comment 35•8 years ago
|
||
Attachment #8852425 -
Attachment is obsolete: true
Assignee | ||
Comment 36•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8854358 -
Flags: review?(bugmail)
Comment 37•8 years ago
|
||
Comment on attachment 8854358 [details] [diff] [review]
patch - Support webrender on Android
Review of attachment 8854358 [details] [diff] [review]:
-----------------------------------------------------------------
So I think we should split this into two. One patch just for the moz.configure change. That should get webrender building on Android. The rest of the changes are really runtime fixups for when webrender is enabled, and belong in another patch. And the moz.configure change should probably be reviewed by :froydnj or one of the other build peers.
::: gfx/layers/ipc/CompositorBridgeParent.cpp
@@ +711,5 @@
> + if (!gfxVars::UseWebRender()) {
> + if (mCompositor->Resume()) {
> + resumed = true;
> + }
> + } else {
bool resumed = gfxVars::UseWebRender() ? mWrBridge->Resume() : mCompositor->Resume();
::: gfx/layers/wr/WebRenderBridgeParent.cpp
@@ +141,5 @@
> MOZ_ASSERT(mApi);
>
> +#ifdef MOZ_WIDGET_ANDROID
> + // XXX temporal hack.
> + // XXX Remove it when APZ is supproted.
s/temporal/temporary/
s/supproted/supported/
::: gfx/webrender_bindings/RendererOGL.cpp
@@ +139,5 @@
> + }
> + // RenewSurface internally calls MakeCurrent.
> + return mGL->RenewSurface(mWidget);
> +#endif
> + return true;
Change the #endif to an #else, and put an #endif at the end of the function body
Attachment #8854358 -
Flags: review?(bugmail)
Assignee | ||
Comment 38•8 years ago
|
||
Attachment #8854358 -
Attachment is obsolete: true
Assignee | ||
Comment 39•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8854688 -
Flags: review?(nfroyd)
Assignee | ||
Updated•8 years ago
|
Attachment #8854689 -
Flags: review?(bugmail)
![]() |
||
Updated•8 years ago
|
Attachment #8854688 -
Flags: review?(nfroyd) → review+
Updated•8 years ago
|
Attachment #8854689 -
Flags: review?(bugmail) → review+
Comment 40•8 years ago
|
||
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/e6038d993d43
(Part 1) - Enable WebRender build on Android. r=froydnj
https://hg.mozilla.org/projects/graphics/rev/aa1f37911d77
(Part 2) - Add runtime fixups for WebRender on Android. r=kats
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 41•8 years ago
|
||
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/c5a346f39e07
Remove unused dependency in moz.configure rule. r=bustage
Comment 42•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e6038d993d43
https://hg.mozilla.org/mozilla-central/rev/aa1f37911d77
status-firefox55:
--- → fixed
Summary: Build on android → Build webrender on android
Target Milestone: --- → mozilla55
Comment 43•8 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•