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

wl: Set opaque region if possible also when windowed #545

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

aperezdc
Copy link
Member

@aperezdc aperezdc commented Mar 7, 2023

Configure an opaque region for the Wayland surface also when not fullscreened, as long as the web view background color is set to be opaque. This should slightly improve performance in compositors which take the opaque region hint into account also for non fullscreen surfaces.

@aperezdc aperezdc added the enhancement New feature or request label Mar 7, 2023
@aperezdc aperezdc self-assigned this Mar 7, 2023
@aperezdc
Copy link
Member Author

aperezdc commented Mar 7, 2023

Note that there is a small issue: this assumes that the background color won't change after being set, which is true for the Cog launcher, but might not be for others. Unfortunately, we do not have a way of knowing when the background color has been changed: it's not a GObject property, so we cannot connect to the GObject::notify signal.

@aperezdc
Copy link
Member Author

Note that there is a small issue: this assumes that the background color won't change after being set, which is true for the Cog launcher, but might not be for others. Unfortunately, we do not have a way of knowing when the background color has been changed: it's not a GObject property, so we cannot connect to the GObject::notify signal.

Reported: https://bugs.webkit.org/show_bug.cgi?id=253818

@aperezdc aperezdc force-pushed the aperezdc/opaque-region branch 2 times, most recently from 7f26167 to e862878 Compare May 18, 2023 21:18
Configure an opaque region for the Wayland surface also when not
fullscreened, as long as the web view background color is set to be
opaque. This should slightly improve performance in compositors which
take the opaque region hint into account also for non fullscreen
surfaces.
Copy link
Member

@psaavedra psaavedra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been used this patch on downstream for a long while. The change looks good and this new logic is more likely to what the user could expect: if transparency works in a windowed view then it should work also if the window is maximized.

@aperezdc aperezdc merged commit 8023a90 into master Oct 19, 2023
5 checks passed
@aperezdc aperezdc deleted the aperezdc/opaque-region branch October 19, 2023 13:45
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

Successfully merging this pull request may close these issues.

2 participants