Skip to content
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

opaque region support #3317

Closed
totaam opened this issue Oct 19, 2021 · 3 comments
Closed

opaque region support #3317

totaam opened this issue Oct 19, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@totaam
Copy link
Collaborator

totaam commented Oct 19, 2021

Browsers tend to claim to use transparency but they actually don't and set _NET_WM_OPAQUE_REGION.

Forwarding this attribute should help the clients and perhaps we can also use it to discard the alpha component of some regions before compression.

@totaam totaam added the enhancement New feature or request label Oct 19, 2021
totaam added a commit that referenced this issue Oct 19, 2021
totaam added a commit that referenced this issue Oct 20, 2021
refactor the 'process_damage_region' methods to use the same code via a new get_damage_image() method
@totaam
Copy link
Collaborator Author

totaam commented Oct 20, 2021

The latest commits improve performance quite a bit when dealing with browsers like Firefox.
They use an RGBA visual, but end up setting the whole window as opaque. Probably because they do their own compositing using RGBA surfaces.
We now detect that and switch to RGBX (actually BGRX on little endian) and don't bother trying to encode the unused alpha channel.

@totaam totaam closed this as completed Oct 20, 2021
@totaam
Copy link
Collaborator Author

totaam commented Nov 20, 2021

This may have caused #3354.

@totaam
Copy link
Collaborator Author

totaam commented Nov 25, 2021

Bug reported in #3363 :

too many items in <class 'tuple'> opaque-region: maximum 4 allowed, but got 8

Then there's also #3354 and apparently chrome ends up sending RGBA - do we miss the opaque region or is it out of sync with the window dimensions?

@totaam totaam reopened this Nov 25, 2021
totaam added a commit that referenced this issue Nov 26, 2021
handle this wherever we can - not in the client yet because GTK only supports a single rectangle..
totaam added a commit that referenced this issue Dec 6, 2021
also handle multiple rectanles on the client - 'Region' is actually a list of rectangles, so GTK does support opaque-region
@totaam totaam closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant