-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPUI overdraws too much #8043
Comments
I'm not sure GPUI has anything fully opaque? Since practically all elements are antialiased rounded rectangles which require alpha blending. |
@jansol not all elements have rounded corners. For example, #7231 makes the fast path for such quads that are just quads, and it makes a good difference. |
Right, makes sense. And I assume it just skips elements with a non-opaque background color. |
Hi there! 👋 |
AFAIK there has been no change to this. |
Wouldn't you only need three fully opaque? |
Yes, you can make just 3 opaque. |
Check for existing issues
Describe the bug / provide steps to reproduce it
It looks like most "ordinary" pixels are being overdraw 5-6 times on screen. See screenshot from RenderDoc's "pass overdrawn" mode. I looked at the green area (5 draws per pixel) and at the yellow one on the left (6 draws per pixel). This is burning GPU power too much unnecessarily and draining the battery.
Ideally, these areas would have 0 to 1 draw. 0 is possible because the render pass is starting with a clear color. For elements overlapping each other, there needs to be some technique for pixel rejection employed. Generally it's depth or stencil testing. For example, WebRender draws opaque elements from front to back and writes to depth, preventing deeper layers from overwriting the pixels of the front layers.
Environment
Linux (but it unlikely matters)
The text was updated successfully, but these errors were encountered: