Commit graph

9 commits

Author SHA1 Message Date
Vlad Zahorodnii
e293972eaa Run clang-tidy with -checks=readability-braces-around-statements fixit
This fixes style issues in old code.
2022-03-28 10:54:11 +00:00
Vlad Zahorodnii
7096e3ead8 Run clang-format
The .clang-format file is based on the one in ECM except the following
style options:

 - AlwaysBreakBeforeMultilineStrings
 - BinPackArguments
 - BinPackParameters
 - ColumnLimit
 - BreakBeforeBraces
 - KeepEmptyLinesAtTheStartOfBlocks
2022-03-25 13:25:15 +02:00
Vlad Zahorodnii
4af9d6c234 kwineffects: Remove unused WindowVertex and WindowQuad props
Since window quads are no longer passed in prePaintWindow(), we don't
need to track original vertex coords. This results in smaller memory
footprint.
2021-06-14 07:56:02 +00:00
Vlad Zahorodnii
29cc319455 kwineffects: Remove WindowQuadType
The window quad type has become irrelevant.
2021-06-14 07:56:02 +00:00
Vlad Zahorodnii
7301564e4f Use bilinear interpolation to compute texture coords of subquads
On Wayland, a surface must be displayed the same way no matter how the
attached buffer is transformed. In order to guarantee that, we build the
surface-to-buffer matrix, which is used to compute the texture coords.

The surface-to-buffer matrix represents an affine transformation. Thus,
performing linear interpolation between texture coordinates won't end up
in corrupted rendered results. This is the main assumption that we make
during generation of contents window quads. After creating a sub-quad,
the new quad's texture coordinates are computed by interpolating between
the source quad's texture coords.

However, WindowQuad::makeSubQuad() makes a concrete assumption about the
order of texture coords, which might be false if the attached wayland
buffer is rotated 90 or 270 degrees.

This issue went unnoticed after merging the viewporter patches because
the developer who was working on it had been using primarily nested
kwin_wayland for testing purposes. And it appears like kwin schedules
full screen repaints even though it supports buffer age. It still needs
some investigation why that happens.

BUG: 428003
2020-10-20 15:41:00 +00:00
Vlad Zahorodnii
4ce853e8e4 Prettify license headers 2020-08-07 19:57:56 +00:00
Vlad Zahorodnii
1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00
David Edmundson
a3cff85e7a Remove Qt module declarations in includes
Summary:
Test Plan: Compiles

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13359
2018-06-05 18:07:23 +01:00
Martin Gräßlin
fb8434671f [autotests] Move libkwineffects/autotests to autotests/libkwineffects
All autotests shall be in autotests subdirectory.
2016-07-18 08:47:45 +02:00
Renamed from libkwineffects/autotests/windowquadlisttest.cpp (Browse further)