https://bugs.kde.org/show_bug.cgi?id=522005

Vlad Zahorodnii <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/kwin/-/commit/5fe17928a8
                   |                            |d6ea21b0dada01862ca3cf65bac
                   |                            |fa3
             Status|ASSIGNED                    |RESOLVED

--- Comment #18 from Vlad Zahorodnii <[email protected]> ---
Git commit 5fe17928a8d6ea21b0dada01862ca3cf65bacfa3 by Vlad Zahorodnii.
Committed on 29/06/2026 at 16:51.
Pushed by vladz into branch 'master'.

Optimize querying X window shape

The += operator effectively constructs a new region. If the number of
rectangles in the X shape is huge, it can take a while to construct a
RegionF. For example, the launcher in Guild Wars 2 video game, sets a
region with more than 3000 rectangles.

We can skip that heavy step by taking into account that the shape
rectangles will be sorted in the y-x lexicographical order so we can
pass the shape rects to Region/RegionF as is and later clip any rects
that stick outside the buffer rect. In most cases, the intersected()
step will be a noop.

While on this, the moveResizeInternal() function doesn't need to fetch
the shape region every time the window moves. The size check used to not
exist because things were easier that way when kwin had still been a
reparenting window manager.

M  +20   -13   src/x11window.cpp

https://invent.kde.org/plasma/kwin/-/commit/5fe17928a8d6ea21b0dada01862ca3cf65bacfa3

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to