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 upToo much time spent drawing the chrome #1990
Comments
|
I will look into this as part of the batching investigation I'm looking at this week. |
|
One thing I've noticed that is causing a lot of batch breaks: The favicon images are added with The texture cache currently just allocates We can make the texture cache a bit smarter about this. Is it intentional / required that the favicon images use That doesn't explain all the issues - but it's the first thing I noticed. |
|
Forcing those images to be nearest drops the draw call count from 44 to 38 - still not great. I'll investigate the rest as part of #1984. |
|
Yes, favicons using |
|
OK, I've opened #1992 to make that case efficient. It's a small amount of work - I'll try to do it this week in between work on other tasks. |
|
I should probably mention that the browser CSS only asks for |
|
Note that strictly speaking we don't have to separate |
|
Around half of the GPU time is spent applying opacity filters which are not necessary. There's two cases that we need to handle here:
The planned work #1774 (comment) and below will cover these cases. I'm working towards those now. There are a few other items of interest that I need to look into:
|
|
Oh, another issue we have is that all the image masks for the tab text get blitted from the texture cache into a clip mask before being applied. In the simple case (where the only clip is the image mask), we should just sample directly from the image mask in the texture cache. That will save quite a lot of GPU time in this test case. |
|
Note to self: there are also several very large standalone textures in the texture cache. They look mostly redundant - they are a single color. Perhaps redundant image masks? Any ideas @jrmuizel ? I'll look into them in detail anyway. |
|
@glennw how did you identify those textures? |
|
@jrmuizel If you run wrench with the texture cache debugger (and my pending patch to support favicons in the texture cache), you'll see several images shown that don't go in the texture cache. The only reason they shouldn't go in the cache is if they are > 512 pixels. I haven't looked any further than that yet. This is a picture of the texture cache debugger when viewing this scene. Generally, you just see the four pages of the texture cache shown here. All of the images shown here on the left appear to be large, standalone textures (unless I'm mis-interpreting the debugger output). |
|
Ok, three of those are likely: Which are solid color blob images coming from the Chrome. I can investigate why. |
|
Yep, that seems like them. I think they are being rendered as normal |
|
Yep, they are attached to Image primitives in the yaml file - would be interesting to see where they come from. |
|
Most border primitives are falling off the fast path, but they shouldn't be. The code doesn't correctly handle the case where some edges are solid, and other edges are none/hidden as a fast path border. |
|
There's also a significant amount of time drawing clip mask(s) and solid rects. The clip mask(s) should be resolved by drawing them in segments and/or a fast path for uniform radii. Need to investigate the solid rectangle time - it might just be that there is a full screen rect being drawn (in which case, the z-buffer will reject that on a normal page where there is content). |
|
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1415001 about the large images. It shouldn't be too hard to do better. |
|
This is no longer an issue - drawing the chrome is a very small part of the CPU/GPU profile now. |

I see 44 draw calls on this yaml file:
https://jrmuizel.github.io/webrender/chrome.zip
It would be good to get a diagnosis of what's going on.
https://bugzilla.mozilla.org/show_bug.cgi?id=1414679