Commit graph

7 commits

Author SHA1 Message Date
Aleix Pol
d0b87a900f screencasting: Add an autotest
Adds an autotest that makes sure a screencasting stream works as
expected.
Adds an optional dependency to KPipeWire only effective to run the test.
2023-03-31 00:19:59 +02: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
Martin Flöser
68589fe937 compositor: Merge the OpenGL 2 and 3 backends
This change merges the two OpenGL backends into one making the current
default of GLCore the overall default. It becomes the first context to
try to create. If it fails, it will automatically fall back to the
(previous) OpenGL 2 backend.

Reasoning: the differentiation of OpenGL 2 and 3 is a very technical one
and hard to understand for users. It is not obvious which one is better
or should be used. This results in many user discussions like "Which
backend to use?"

Back when the OpenGL 3 backend was introduced the dedicated feature made
sense. It was a new code base using new driver features. Nowadays the
code base in KWin is robust and mature and so are the drivers. A driver
advertising support for OpenGL 3 will support OpenGL 3. We don't have to
plan for driver breakage in this area any more.

Also our code evolved through the context attribute builder which gives
us the possibility to more easily fall back in case we cannot create the
context. Thus the need to select the backend is not so important as it
used to be when the feature got introduced.

If a user still wants to force OpenGL2, it is still possible by setting
the appropriate environment variables like MESA_GL_VERSION_OVERRIDE.

This change brings the improvement that the backend selection is now
completely removed from the compositing KCM.
2021-10-08 15:26:25 +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
Martin Flöser
004c0f3892 [autotests] Test creating core context profile
Extends OpenGL testRestart to once with GLCore and once with legacy.
2017-06-25 09:48:46 +02:00
Martin Flöser
66f0839925 [autotests] Introduce a SceneOpenGL ES test
The SceneOpenGLTest is transformed into a GenericSceneOpenGLTest which
can create either an OpenGL or an OpenGL ES scene based on env variable
which it sets in initTestCase. The env variable to set is passed as a
ctor argument from the SceneOpenGLTest and the new SceneOpenGLESTest.

This allows to easily run the same test code for both our OpenGL and
OpenGL ES compositor.
2017-06-24 21:05:49 +02:00