Hi Bo,Thanks for you reply, actually back port current WebView to 4.x is not that difficult ^_^. I know EGLImage is used to share Texture among different EGLContexts, and I understand the necessarity to let chromium have its own gpu thread in current design against previous design only Android gpu thread is used (m40). But to be honest, the compatibility and performance issue about EGLImage worry me most in the first place, and the situation happen on Galaxy Nexus actually prove this...What I trying to figure out is:1, The EGLImage for the Texture is only need to create once during the whole lifetime of Texture?2, or, the EGLImage for the Texture need to create each time when Texture is update?3, or, the EGLImage for the Texture need to create each time when Resource attached with this Texture is pass from child cc to parent cc?
Hi Roger,
I think it need to do more test on other platforms.
Because eglCreateImageKHR is platform dependent. Mainly caused by GPU driver.
It may fix slow issue on Tegra4, but may not on other platforms.
Thanks
--
You received this message because you are subscribed to the Google Groups "Graphics-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
graphics-dev...@chromium.org.
************* Email Confidentiality Notice ******************** The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
Got your point
Got your point
Thanks
From: graphi...@chromium.org [mailto:graphi...@chromium.org] On Behalf Of Roger Yi
Sent: Wednesday, April 06, 2016 3:10 PM
To: Graphics-dev
Cc: roge...@gmail.com; bo...@chromium.org
Subject: Re: [Android WebView] The slow eglCreateImageKHR may hurt the overall graphics performance of WebView
As I said, this change only change the timing to create the mailbox of texture, so it cause not harm on other device in theory no matter it will gain or not.
在 2016年4月6日星期三 UTC+8下午2:55:35,Willy Yu写道:Hi Roger,
I think it need to do more test on other platforms.
Because eglCreateImageKHR is platform dependent. Mainly caused by GPU driver.
It may fix slow issue on Tegra4, but may not on other platforms.
Thanks
From: graphi...@chromium.org [mailto:graphi...@chromium.org] On Behalf Of Roger Yi
Sent: Wednesday, April 06, 2016 1:56 PM
To: Graphics-dev
Cc: roge...@gmail.com; bo...@chromium.org
Subject: Re: [Android WebView] The slow eglCreateImageKHR may hurt the overall graphics performance of WebView
Hi Bo,
I have try some experiments to reduce the performance impact by the cost of eglCreateImageKHR, and get some interesting results.
I force to create a mailbox before the texture's first writing (first rasterize for gpu rasterization of first upload for cpu rasterization), in a phone use Tegra4, the cost of eglCreateImageKHR reduce significantly, from 10ms+ to 0.x ms, and the overall performance increase is perceivable.
You are describing the "pay the cost of eglCreateImageKHR as part of upload rather than draw" idea.
Another issue about sync point.
The sync point may block main or render thread by GPU rasterization or HTML5 canvas raster on the gpu thread.
If the rasterization is low on gpu thread, the sync point must wait until GPU completed.
It is a little similar to eglCreateImageKHR slow case. And seems that there is no better solution for this currently.
My thought is to query the texture resource whether completed when AppendToQuad
Once completed, the resource can be sent to parent, otherwise compositor would not append to AppendToQuad
But :
1. it need a interface to query resource was ready
2. it may not efficient to query across GPU thread
or any other better solution ?
Another issue about sync point.
The sync point may block main or render thread by GPU rasterization or HTML5 canvas raster on the gpu thread.
If the rasterization is low on gpu thread, the sync point must wait until GPU completed.
It is a little similar to eglCreateImageKHR slow case. And seems that there is no better solution for this currently.
My thought is to query the texture resource whether completed when AppendToQuad
Once completed, the resource can be sent to parent, otherwise compositor would not append to AppendToQuad
But :
1. it need a interface to query resource was ready
2. it may not efficient to query across GPU thread
or any other better solution ?
From: Bo Liu [mailto:bo...@chromium.org]
Sent: Friday, April 08, 2016 6:14 AM
To: Willy Yu (游佳偉)
Cc: Roger Yi; Graphics-dev
Subject: Re: [Android WebView] The slow eglCreateImageKHR may hurt the overall graphics performance of WebView
On Thu, Apr 7, 2016 at 6:09 AM, Willy Yu (游佳偉) <Will...@mediatek.com> wrote:
Another issue about sync point.
The sync point may block main or render thread by GPU rasterization or HTML5 canvas raster on the gpu thread.
If the rasterization is low on gpu thread, the sync point must wait until GPU completed.
Are you saying that's frame N sync point is waiting on work from frame N+1? That sounds like a scheduling problem to me. There are graphics folks working on better command buffer scheduling right now. See the "GPU Service Scheduler" thread.
If it's waiting for work for the current frame, then that just means that frame is taking a long time. Then there really is nothing we can do.
àYes, this is what I said.
I have checked M51 WebView. It seems has lot improvement.
I didn’t found render thread was block by sync point, will check further.
It is a little similar to eglCreateImageKHR slow case. And seems that there is no better solution for this currently.
My thought is to query the texture resource whether completed when AppendToQuad
Once completed, the resource can be sent to parent, otherwise compositor would not append to AppendToQuad
But :
1. it need a interface to query resource was ready
2. it may not efficient to query across GPU thread
or any other better solution ?
imo that's the wrong problem to solve. cc should not put resources that are not ready to draw in a frame. Slow ProduceTextureMailbox/eglCreateImageKHR is a bug itself that should be fixed. Should not introduce yet another complex system just to hide it.
We can't really introduce asynchronous or polling behavior everywhere just to avoid blocking, because then latency of the whole system will go through the roof.
Not really polling all the resource, may a notification that the texture resource is ready..