This is done by
- fixing isFuzzyScalingOnly to not check the [3, 3] component, which is always 1
- making the comparison between transfer functions fuzzy, so small floating point
errors don't prevent two practically identical functions to be optimized out
- switching manual optimizations to use addMatrix instead, which removes the
matrix or replaces it with a multiplier
and the autotest is expanded to test transformations between color descriptions with
transfer functions and reference luminances that are just scaled versions of each
other
The systemd watchdog has three big problems:
- it wrongly restarts KWin in some cases after suspend
- it wrongly restarts KWin in some OOM situations
- it wrongly restarts KWin when doing a live upgrade from the watchdog being disabled to it being enabled
Each of those cases can cause users to lose data and in the upgrade case even require repairing
the system manually, which is not acceptable.
This commit keeps the watchdog code in place for now; the decision to remove it or what to
replace it with isn't as urgent.
This ensures a couple of things:
- avoid pointlessly binding and unbinding the texture
- if the image format needs to be changed, it will be done only once
Use the unpack code path by default, it lets us to simplify the code and
also fix texture uploading when the image stride is not
"width * bytes per pixel".
It's widely supported, and other wayland compositors already require it,
so the chances of breaking things should be minimal, although some embedded
GPUs might be affected, in which case kwin will fallback to software
rendering. With the unpack being always available, we can simplify and
also fix bugs in texture uploading.
This means that we prefer direct scanout over a specific presentation mode (tearing),
which usually just means we first engage direct scanout and program the relevant
properties, and then switch to tearing afterwards.
It also removes a hack for direct scanout with legacy, and is one step less for
implementing overlay plane support.
I'm confident in the implementation and (significant) upstream changes before the protocol
is released as wp-colormanagement-v1 are unlikely, so I think allowing apps to make use of
it in practice is okay at this point.
Once the upstream protocol is released, we'll still drop the xx variant though and apps will
have to use the wp protocol in order to make use of color management features.
The NVidia driver maps them to hardware planes, which means they do not
apply to the cursor because the cursor plane doesn't have these color
operations.
BUG: 491634
The stack layer of a transient doesn't depend on its transient parent.
It is not clear why this code exists, it dates back to a commit 20 years
ago, which is massive and difficult to analyze. But, with that being said,
Window::belongsToLayer() doesn't place transients in parent's stack
layer, stack constraints are used instead.
Black point compensation introduced a tiny bit increased error in the floating point
calculations, but the errors are still way too small to actually matter.
To avoid those unnecessary calculations causing performance issues and more rounding
errors, this commit changes the allowed error to 10^-5.
A driver might optimize out a uniform, in which case setting it will fail. That does not however mean
that the rest can be ignored too or that the shader won't work because of that
The scene renderer doesn't use external_only formats as a single EGLImage, but only does
YUV conversion for some specific formats, so the test import should match that.
Adding the invalid modifier to nonExternalOnlyModifiers even for formats that otherwise only
have external_only modifiers means that KWin will advertise support for this modifier to clients,
but using the format without external_only samplers fails.
Applications that use QtWidgets can have a lot of rectangles in the
damage region. For example, when you navigate between directories in
Dolphin, each individual file or folder item will be added to the
damage region rather than the container view where they are.
On the other hand, issuing multiple glTexSubImage2D() function calls
is not great because it means stalling the cpu until the texture upload
completes.
This change attempts to improve that by simplifying the input damage.
If the input damage isn't complex, use it as is; otherwise use its
bounding rect.
The gains are not impressive. On my machine, I see fewer 5ms texture
upload time spikes when navigating in Dolphin, now I can observe 4ms
spikes instead. Still, I believe the change is reasonable enough.
The alpha modifier protocol allows clients to set a multiplier for the opacity
of a surface, which allows them to offload some operations to KWin, which
in turn may offload them to KMS in the future
...by removing the keyboard flag, moving keyboard shortcut handling into a separate
method and making the position to tile the window at explicit
This also means KWin doesn't do as many intermediary changes to window geometry on output
hotplugs, which may work around some clients not always reacting to no-op changes.
CCBUG: 479694