Closed Bug 1673342 Opened 4 years ago Closed 4 years ago

Support software WebRender with CompositorOGL on Android and Linux

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file, 2 obsolete files)

It is nice if ASurfaceControl could be used for software WebRender.

Assignee: nobody → sotaro.ikeda.g
Blocks: 1562818
Summary: Investigate if ASurfaceControl could be used for software WebRender → Use ASurfaceControl for software WebRender

I confirmed that RenderCompositorSWGL could directly render to Android hardware buffer. But we need to convert from BGRA to RGBA by using gfxUtils::ConvertBGRAtoRGBA(), since android hardware buffer does not support BGRA format and RenderCompositorSWGL supports only BGRA.

Summary: Use ASurfaceControl for software WebRender → Use ASurfaceControl for software WebRender on Android

:lsalzman, :jrmuizel, is it possible to add RGBA support to RenderCompositorSWGL? Android hardware buffer does not support BGRA format.

Flags: needinfo?(lsalzman)
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(lsalzman)
Flags: needinfo?(jmuizelaar)

:mattwoodrow, :jrmuizel, is it OK to use CompositorOGL on android for Software WebRender like RenderCompositorD3D11SWGL? It uses CompositorD3D11. Software WebRender only supports BGRA. When all rendering is done only by Software, we need to convert from BGRA to RGBA.

When CompositorOGL is used, we could handle SurfaceTexture rendering simply.

Flags: needinfo?(matt.woodrow)
Flags: needinfo?(jmuizelaar)

I think there was a hope that we could avoid needing software webrender on Android at all, and ship hardware to 100% of our userbase.

If we have reason to believe that won't be possible, then I think using CompositorOGL should be fine (and is closer to what we current ship than RenderCompositorSWGL would be).

I think we could just rename RenderCompositorD3D11SWGL mostly to make a more generic type that targets the layers::Compositor API. There might be a few special cases for external compositor surfaces etc, but hopefully not a lot.

Flags: needinfo?(matt.woodrow)

Thank you for the advice!

If necessary we might be able to make the SW compositor do the swizzle, but it's essentially turning every memcpy into a swizzle with the associated cost. If we #ifdef it at compile time for Android then it probably wouldn't be so horrible in terms of code-complexity, whereas it would be much harder to make compositing RGBA vs BGRA a runtime toggle. If we could rely on accelerated compositing on Android that may be a better scenario since Android hardware is already severely limited as it is.

Yep, what Matt said.

Flags: needinfo?(jmuizelaar)
Summary: Use ASurfaceControl for software WebRender on Android → Use software WebRender on Android
Summary: Use software WebRender on Android → Support software WebRender on Android
Attachment #9183946 - Attachment is obsolete: true
Attachment #9183946 - Attachment is obsolete: false
Attachment #9183946 - Attachment description: Bug 1673342 - Use ASurfaceControl for software WebRender → Bug 1673342 - Support software WebRender on Android
Attachment #9183946 - Attachment description: Bug 1673342 - Support software WebRender on Android → Bug 1673342 - Use ASurfaceControl for software WebRender
Attachment #9183946 - Attachment is obsolete: true
Attachment #9187086 - Attachment description: Bug 1673342 - Support software WebRender on Android → Bug 1673342 - Support software WebRender on Android and Linux
Summary: Support software WebRender on Android → Support software WebRender on Android and Linux
Depends on: 1677459
Depends on: 1691895
Blocks: wr-android
No longer blocks: 1562818
Summary: Support software WebRender on Android and Linux → Support software WebRender with CompositorOGL on Android and Linux
Attachment #9187086 - Attachment is obsolete: true
Blocks: 1640712
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2a11810933e Add Support of software WebRender with CompositorOGL on Android and Linux r=mattwoodrow
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Blocks: 1700947
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: