mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
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).
This commit is contained in:
parent
6bb1825366
commit
220886db4c
3 changed files with 129 additions and 82 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue