Cloudef / orbment

Modular Wayland compositor
Other
246 stars 16 forks source link

Don’t render surfaces that aren’t displayed #76

Closed linkmauve closed 9 years ago

linkmauve commented 9 years ago

When a surface is fullscreen and fully covers another, there is no need to waste GPU cycles to render the second one, or even to scanout it.

Cloudef commented 9 years ago

Right, culling is only done for background right now. What makes this problem particularly difficult however are transparent views.

linkmauve commented 9 years ago

The compositor receive notifications of opaque surfaces, for now you could consider anything not fully-opaque as transparent and continue to render what’s behind.

Cloudef commented 9 years ago

Right, I already have heuristics for that. But it isn't really accurate. I'll ask the best way to do this in #wayland

Cloudef commented 9 years ago

I probably won't implement culling of every surface for a while. But I cover the most common cases now.

That is background is not drawn when not visible, only topmost view is drawn when it covers everything (fullscreen view for example).

More advanced culling may need some data to see if it's even worthwhile, since usually everything or almost everything is shown. (Expect for the most common cases above).