diff options
author | Tom <tomut@yahoo.com> | 2021-07-17 21:15:17 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-18 18:39:20 +0200 |
commit | 220886db4c0e3f15b4a66f0771a00b73b09e91fc (patch) | |
tree | f7275403307f888749dc6c839ebe851da950af3e /Userland/Services/WindowServer/Window.cpp | |
parent | 6bb1825366df9c18ca379825b39b27c24f6533ad (diff) | |
download | serenity-220886db4c0e3f15b4a66f0771a00b73b09e91fc.zip |
WindowServer: Fix compositor overdraw issues related to transparency
We were re-rendering areas that were considered transparency areas even
though they weren't transparency areas or were occluded by opaque
areas.
In order to fix this, we need to be a bit smarter about what is above
and below any given window. Even though a window may have transparent
areas, if those are occluded by opaque window areas on top they are
not actually any areas that should be rendered at all. And the opposite
also applies, opaque window areas for windows below that are occluded
by transparent areas, do need to be rendered as transparency. This
solves the problem of unnecessary transparency areas.
The other problem is that we need to know what areas of a window's
dirty rectangles affect other windows, and where. Basically any
opaque area that is somehow below a transparent area that isn't
otherwise occluded, and any transparent area above any other window
area (transparent or opaque) needs to be marked dirty prior to
composing. This makes sure that all affected windows render these
areas in the correct order. To track these, we now have a map of
affected windows and the rectangles that are affected (because not all
of that window's transparency areas may be affected).
Diffstat (limited to 'Userland/Services/WindowServer/Window.cpp')
-rw-r--r-- | Userland/Services/WindowServer/Window.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp index 03edacbcdb..cf4596a70b 100644 --- a/Userland/Services/WindowServer/Window.cpp +++ b/Userland/Services/WindowServer/Window.cpp @@ -486,6 +486,7 @@ void Window::set_pinned(bool pinned) update_window_menu_items(); window_stack().move_pinned_windows_to_front(); + Compositor::the().invalidate_occlusions(); } void Window::set_vertically_maximized() { |