Use ASurfaceControl with WebRender on Android
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
People
(Reporter: sotaro, Assigned: sotaro)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
•
|
||
For now, ASurfaceControl with AndroidHardwareBuffer seems to work well with wr os compositor api. But it could cause performance problems on android.
- AndroidHardwareBuffer is a scarce resource. wr os compositor uses more hardware buffers than just default frame buffer.
- AndroidHardwareBuffer allocation is slow.
- When a lot of tiles are used by WebRender, it could make android SurfaceFlinger heavy weight.
Then it seems better if WebRender supports default frame buffer + Video/WebGL overlay like chromium. When Video/WebGL texture provides AndroidHardwareBuffer, the buffer could be directly posted to android SurfaceFlinger via ASurfaceControl.
:gw, is it possible to add "default frame buffer + Video/WebGL overlay" support to WebRender on Android?
Comment 3•4 years ago
|
||
It could be possible, yes.
One option, for example, would be to have a single picture cache slice (possibly with larger tiles than default) and support a single compositor video / webgl surface.
Do you have any performance numbers for the cost per allocation / slowdown when using different number of tiles?
Assignee | ||
Comment 4•4 years ago
|
||
Great! I do not have an actual performance number. I am going to check it.
Assignee | ||
Comment 5•4 years ago
•
|
||
I tested with the current D95258. During scrolling, tiles were allocated and de-allocated regularly.
- AndroidHardwareBuffer creation : 0.4ms - 1.3ms
- EGLImage creation : 0.1ms - 0.3ms
- SurfaceControl creation : 0.5ms - 1.5ms
And ASurfaceControl transaction duration from commit to callback took 20ms - 40ms. It seems to mean android SurfaceFlinger became busy.
Since, when ASurfaceControl was used only for WebGL, ASurfaceControl transaction duration from commit to callback took around 10ms. And it does not have tile allocation/de-allocation.
D96523 was used to check "ASurfaceControl was used only for WebGL".
Assignee | ||
Comment 6•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment hidden (off-topic) |
Comment hidden (obsolete) |
Assignee | ||
Updated•2 years ago
|
Description
•