Commit Graph

286 Commits (master)

Author SHA1 Message Date
Aleix Pol f558115def scene: prefer calling mapToGlobal just once
It's the same top mapToGlobal()+operator& than the other way around and
we get to skip 1 call.
This path is the most common so we better save it.
2020-09-29 14:26:37 +00:00
Aleix Pol 309d6a0d5b Always include the window decoration's clipping
No need to only report opacity on the window decoration if the window
itself is opaque.
2020-09-28 15:00:36 +02:00
Aleix Pol 375691c6c2 Improve opacity detection
If the opaque area covers all the window's shape, it means that it's an
opaque window.
This is how GTK presents opacity right now, so we'll get to skip
rendering under GTK clients and other compatible ones.
Qt is still not emitting opacity.
2020-09-25 14:08:55 +00:00
Vlad Zahorodnii 0c266e760b Replace remaining usages of old connect syntax with new connect syntax
This change replaces the remaining usages of the old connect syntax with
the new connect syntax.

Unfortunately, there are still places where we have to use SIGNAL() and
SLOT() macros, for example the stuff that deals with d-bus business.

Clazy was used to create this change. There were a few cases that needed
manual intervention, the majority of those cases were about resolving
ambiguity caused by overloaded signals.
2020-09-24 09:33:45 +00:00
Aleix Pol 61e655f7f7 Centralize WindowPixmap buffer updating code
Uses a setter and clear method pattern rather than having the code
repeated.
Instead of keeping a QPointer, now we are a QObject and we get notified
about destruction intention directly, so we can clear the pointer when
necessary.
2020-09-22 13:04:35 +00:00
Gang Wu 3925ff5634 enable wayland opaque region 2020-09-16 20:19:32 +08:00
Aleix Pol 3aca5bfa68 Don't recreate the WindowQuadList when we are using it
Allocate once and pass it around.
2020-09-09 17:46:56 +00:00
Aleix Pol a6f803cde6 Prefer appending vector to a vector with += rather than a custom implementation
QVector has ad-hoc code to do so.
2020-09-09 17:46:56 +00:00
Vlad Zahorodnii 2b241d3081 Properly handle opaque regions for CSD X11 windows
Currently, we don't compute the clip region properly for some client-
side decorated applications, for example gedit, due to mixing several
separate coordinate spaces.

This change ensures that the window pixmap shape and the opaque region
are in the same coordinate space - the window pixmap coordinate.

In order to simplify mapping regions from the window pixmap coordinates
to the global screen coordinates, a new helper method was introduced in
the WindowPixmap class - mapToGlobal().
2020-09-09 15:58:58 +00:00
Adrien Faveraux 788c65d260 Fix Build Warning 2020-08-26 19:24:02 +02:00
Aleix Pol eeeac04974 Implement EGL_KHR_partial_update and EGL_EXT_swap_buffers_with_damage
Summary:
Notify the driver about the parts of the screen that will be repainted.
In some cases this can be benefitial. This is especially useful on lima
and panfrost devices (e.g. pinephone, pinebook, pinebook pro).

Test Plan:
Tested on a pinebook pro with a late mesa version.
Basically I implemented it, then it didn't work and I fixed it.
Maybe next step we want to look into our damage algorithm.
2020-08-19 14:51:42 +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
Aleix Pol 27ea1b9527 screencasting: Expose necessary information to implement efficient screencasting 2020-07-23 13:14:22 +02:00
Vlad Zahorodnii 617650d440 [scene] Discard pixmaps on buffer size change
The surface size is a logical size, which renders it unsuitable for
deciding whether the window pixmap needs to be discarded.

We need to discard window pixmaps when the buffer size changes. That
has a drawback though, discarding textures is kind of an overkill with
linux-dmabuf. However, fixing that would involve changes in kwayland
server that are far from being trivial.

BUG: 422459
2020-07-01 09:43:27 +00:00
Vlad Zahorodnii ad73e13478 [wayland] Switch to SurfaceInterface::bufferScale()
SurfaceInterface::scale() has been renamed to SurfaceInterface::bufferScale().
2020-06-24 06:59:15 +00:00
Vlad Zahorodnii 4a681e3d47 [scene] Discard quads when the surface-to-buffer matrix is changed
The surface-to-buffer matrix provides a generic mechanism for mapping
things from the surface-local coordinate space to the buffer coordinate
space. If it changes, we know for sure that the texture coordinates
have to be re-computed.
2020-06-19 06:45:33 +00:00
Vlad Zahorodnii c890996a33 [scene] Setup scene window connections with correct receiver object
We need a couple of connections to ensure that the window pixmap, the
window quad cache, and the window shape get discarded when the geometry
of the toplevel has been changed. Currently, those connections are
created with the receiver object being the scene. The problem is that
the associated wayland surface may outlive the toplevel and we don't
cleanup the connections after the scene window has been destroyed.

The fact that the connections don't get destroyed can lead to accessing
dangling pointers, which may result in a crash.

In order to ensure that the connections are broken automatically when
the scene window is destroyed, we need to ensure that the received
object is the scene window. That way, the connections will be destroyed
automatically.
2020-06-10 09:36:55 +03:00
Vlad Zahorodnii 430b63d13b [scene] Rename a scene window method
This change renames invalidateQuadsCache() to discardQuads() because the
latter name is shorter and it aligns with pre-existing method names.
2020-06-10 09:18:32 +03:00
Vlad Zahorodnii cb4dc0ff9d [scene] Make the scene window a qobject
Since the scene window is not a QObject, we cannot connect toplevel's
signals directly to the scene window's slots.
2020-06-10 09:13:35 +03:00
Vlad Zahorodnii de2c4cb4ac [wayland] Add support for cropped and scaled surfaces
The wp_viewporter compositor extension allows clients to crop and scale
their surfaces. It can be especially useful for applications wishing to
reduce their power consumption, e.g. video players, etc.

Given that there is no any direct relationship between the surface size
and the buffer size anymore, we have to use specialized helper methods
for converting coordinates from the surface-local space to buffer pixel
space and vice versa.
2020-06-03 10:00:48 +03:00
Vlad Zahorodnii 9e797cf943 [scene] Introduce helpers for mapping between different coordinate spaces
We currently deal with three distinct coordinate spaces - the window
pixmap coordinate space, the window coordinate space, and the buffer
pixel coordinate space.

This change introduces a couple of helper methods to make it easier
to map points from the window pixmap space to the other two spaces.

The main motivation behind the new helpers is to break the direct
relationship between the surface-local coordinates and buffer pixel
coordinates for wayland surfaces.
2020-06-03 10:00:48 +03:00
Vlad Zahorodnii 7569bdf6a3 [scene] Re-build window quads after creating a WindowPixmap
In order to generate window quads for a window, the scene needs a valid
WindowPixmap tree. If it's time to render the window, the scene will
build window quads for the contents, the server-side window decoration,
the drop-shadow and cache the resulting window quads. With this way of
generating window quads, we need the window pixmap tree to be valid,
or else no contents window quads will be generated.

While the window pixmap tree is guaranteed to be valid at the time of
generation of window quads for Wayland and X11 clients, this is not the
case for Xwayland clients.

When an Xwayland client is created, some time may pass between the
moment it's been created and the moment when a regular wayland surface
has been associated with the xwayland window. If the compositor decides
to render the Xwayland client in that short period of time, the window
quads cache won't have window quads cache.

In order to work around the weird asynchronous behavior of Xwayland
clients, this change makes the scene discard the window quad cache when
a new window pixmap has been created. This will ensure that the current
window quads are always in sync with the current window pixmap tree.
2020-05-19 14:06:06 +03:00
Vlad Zahorodnii 63014d2cb1 [scene] Re-order some connects in Scene::addToplevel()
Re-order some connects to keep them spatially close.

Differential Revision: https://phabricator.kde.org/D29131
2020-05-04 15:37:03 +03:00
Vlad Zahorodnii 9bfcfb7f74 [scene] Rebuild window quads when sub-surface tree changes
Sub-surface contribute to the window quads cache. So, we must re-build
it, if any sub-surface has been changed.

Differential Revision: https://phabricator.kde.org/D29131
2020-05-04 15:36:40 +03:00
Vlad Zahorodnii f2c8981f7e [scene] Generate window quads for sub-surfaces
No window quads are generated for sub-surfaces right now. This leads to
issues with effects that operate on window quads, e.g. magic lamp and
wobbly windows. Furthermore, the OpenGL scene needs window quads to
properly clip windows during the rendering process.

The best way to render sub-surfaces would be with a little help from a
scene graph. Contrary to GNOME, KDE hasn't developed any scene graph
implementation that we could use in kwin. As a short term solution, this
change adjusts the scene to generate window quads.

Window quads are generated as we traverse the current window pixmap tree
in the depth-first search manner. In order to match a list of quads with
a particular WindowPixmap, we assign an id to each quad.

BUG: 387313
FIXED-IN: 5.19.0

Differential Revision: https://phabricator.kde.org/D29131
2020-05-04 15:36:30 +03:00
Vlad Zahorodnii 2d88fd0ee3 [scene] Release previous pixmap when a raster buffer is attached
We need to release the previous window pixmap if the new pixmap is
valid. However, it's currently the case only when the client has
attached either an fbo buffer or a wl_buffer. If an internal client
has attached a raster buffer, the previous window pixmap won't be
released.

In order to ensure that we're going to release the previous window
pixmaps no matter what type of buffer has been attached, this change
refactors WindowPixmap to use isValid() to verify that the new
window pixmap is valid.

Differential Revision: https://phabricator.kde.org/D29131
2020-05-04 15:36:23 +03:00
Vlad Zahorodnii e4b598ca86 [scene] Build window pixmap trees before starting rendering
In order to generate window quads for sub-surfaces, we need a valid
window pixmap tree. The problem is that the window pixmap tree is
created too late in the rendering process. This change adjusts the
scene so it creates window pixmap trees before buildQuads().

Differential Revision: https://phabricator.kde.org/D29131
2020-05-04 15:36:03 +03:00
Aleix Pol 3a9d7a6e9d Port KWin to KWaylandServer
Summary: Away from KWayland::Server and KF5WaylandServer.

Test Plan: Builds, ran nested session

Reviewers: #kwin, #plasma, #frameworks, davidedmundson, zzag

Reviewed By: #kwin, #plasma, davidedmundson, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29278
2020-04-30 12:56:08 +02:00
Méven Car 66898e7f46 Wayland: Allow to take single screen screenshots using scale factor without loss
Summary:
The screenshot made on screens with scale factor were downscaled by their scale factor making them blurry.
It prevents taking screenshots of missing Hidpi related bugs showing the issues under Wayland.

This fix the case of a single screenshot, but not the rest:
Multiscreen screenshot downscales the screen using scale factor.
Spectacle rectangular selection screenshot is broken as soon as some scale factor different than 1 is used on any screen.

Test Plan:
Under Wayland with a scale factor on a screen, take a screenshot using spectacle.
The output image is not downscaled and has the same size as the screen resolution.

No other change to any other screenshot mode, or under X.

Reviewers: davidedmundson, #kwin

Reviewed By: davidedmundson, #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29010
2020-04-20 16:12:26 +02:00
Jacopo De Simoi a2fc6f8eda Fix fullRepaints loop
The method paintSimpleScreen is responsible for redrawing the parts of
the back-buffer that need updating using the buffer_age extension.
The method fails to set correctly the damaged_region if, for some
reason, one frame needs a repaint of the whole screen. In this case
the backbuffer will request a full-screen repaint at some future
frame, so the dirty region will be extended to full-screen. However,
in this case the repaintRegion is not subtracted from the
damaged_region (as it is done for the non fullRepaints case below
--see the comment below--) and the damaged_region is reported to be the full
screen again. This causes all the subsequent frames to be reported
with a full screen damage, which causes some penalty, until
paintGenericScreen is invoked for some reason and then the damage gets
reset correctly.

We now set the correct damage and prevent falling into the fullRepaint
loop.
2020-04-14 08:29:46 -04:00
Vlad Zahorodnii bb04ab390d Merge branch 'Plasma/5.18' 2020-03-19 22:41:19 +02:00
Vlad Zahorodnii 25276d3058 [wayland] Recursively destroy WindowPixmap objects
Summary:
We need to destroy the root WindowPixmap together with all of its
children; otherwise, buffers that are attached to subsurfaces will
not be released.

Test Plan:
weston-subsurfaces doesn't quit with an error message saying that
all buffers are held by the compositor.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28145
2020-03-19 22:41:03 +02:00
Aleix Pol e8efa83444 scene: Pass non-trivial classes by const&
Summary:
This will save the copy of some objects, especially PaintData classes that are
not copy-on-write.
It also follows the practice on other parts of the system.

Test Plan: Running it right now

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28031
2020-03-14 01:15:04 +01:00
Vlad Zahorodnii 56d5f3a4f6 [x11] Fix visual artifacts during interactive resize
Summary:
When a window is being interactively resized, its contents may jump. The
reason why that happens is because KWin renders partially resized client
window. Composite extension spec says that a window will get a new pixmap
each time it is resized or mapped. This applies to the frame window, but
not to the client window itself. If the client window is resized,
off-screen storage for the frame window won't be reallocated. Therefore,
KWin may render partially resized client window if the client doesn't
attempt to be in sync with our rendering loop. Currently, the only way
to do that is to use extended frame counters, which are not supported by
KWin.

So, in order to fix visual artifacts during interactive resize, we need
somehow forcefully re-allocate off-screen storage for the frame window.
Unfortunately, Composite extension doesn't provide any request to do
that, so the only option we have is to resize the frame window.

BUG: 415839
FIXED-IN: 5.18.0

Reviewers: #kwin

Subscribers: davidedmundson, ngraham, alexde, fredrik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26914
2020-02-03 13:56:35 +02:00
Vlad Zahorodnii 35fe3cb6c5 Drop Toplevel::decorationRect()
Summary: It's identical to Toplevel::rect().

Test Plan: Compiles.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26971
2020-01-29 12:58:54 +02:00
Roman Gilg bcf64af49b Revert "Remove vsync detection and configurability"
This reverts commit b3a19f9e5b.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:12 +01:00
Roman Gilg ac05dd01c8 Revert "[platforms/x11] Never block on retrace, always present after paint"
This reverts commit 8d13729031.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:08 +01:00
Roman Gilg b972159ddf Revert "Add hasSwapEvent getter"
This reverts commit a55dee3bd3.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:03 +01:00
Vlad Zahorodnii af71763be5 [scene] Fix decoration texture bleeding
Summary:
Quite long time ago, window decorations were painted on real X11 windows.
The nicest thing about that approach is that we get both contents of the
client and the frame window at the same time. However, somewhere around
KDE 4.2 - 4.3 times, decoration rendering architecture had been changed
to what we have now.

I've mentioned the previous decoration rendering design because it didn't
have a problem that the new design has, namely the texture bleeding issue.

In the name of better performance, opengl scene puts all decoration parts
to an atlas. This is totally reasonable, however we must be super cautious
about things such as the GL_LINEAR filter.

The GL_LINEAR filter may need to sample a couple of neighboring texels
in order to produce the final texel value. However, since all decoration
parts now live in a single texture, we have to make sure that we don't
sample texels that belong to another decoration part.

This patch fixes the texture bleeding problem by padding each individual
decoration part in the atlas. There is another solution for this problem
though. We could render a window into an offscreen texture and then map
that texture on the transformed window geometry. This would work well and
we definitely need an offscreen rendering path in the opengl scene,
however it's not feasible at the moment since we need to break the window
quads API. Also, it would be great to have as less as possible stuff going
on between invocation of Scene::Window::performPaint() and getting the
corresponding pixel data on the screen.

There is a good chance that the new padding stuff may make you vomit. If
it does so, I'm all ears for the suggestions how to make the code more
nicer.

BUG: 257566
BUG: 360549
CCBUG: 412573
FIXED-IN: 5.18.0

Reviewers: #kwin

Subscribers: fredrik, kwin, fvogt

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25611
2020-01-09 15:13:07 +02:00
Marco Martin d593f24d69 fix thumbnails positioning
to have the scene position of the thumbnail, you need
item->mapToScene(QPointF(0,0)); and not add to that its parent-relative position
2019-12-13 18:14:08 +01:00
Roman Gilg a55dee3bd3 Add hasSwapEvent getter
Summary:
Add a small getter to query information internally if the backend supports
swap events. Defaults to true as it is the default in the GBM Wayland backend.

Test Plan: i915

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T11071

Differential Revision: https://phabricator.kde.org/D25298
2019-12-12 01:25:36 +01:00
Vlad Zahorodnii 6e000314b3 Revert the fix for the texture bleeding issue
This reverts commit 9151bb7b9e.
This reverts commit ac4dce1c20.
This reverts commit 754b72d155.

In order to make the fix work, we need to redirect the client window
instead of the frame window. However, we cannot to do that because
Xwayland expects the toplevel window(in our case, the frame window)
to be redirected.

Another solution to the texture bleeding issue must be found.

CCBUG: 257566
CCBUG: 360549
2019-12-02 19:45:15 +02:00
Vlad Zahorodnii ac4dce1c20 [scene] Fix decoration texture bleeding
Summary:
Quite long time ago, window decorations were painted on real X11 windows.
The nicest thing about that approach is that we get both contents of the
client and the frame window at the same time. However, somewhere around
KDE 4.2 - 4.3 times, decoration rendering architecture had been changed
to what we have now.

I've mentioned the previous decoration rendering design because it didn't
have a problem that the new design has, namely the texture bleeding issue.

In the name of better performance, opengl scene puts all decoration parts
to an atlas. This is totally reasonable, however we must be super cautious
about things such as the GL_LINEAR filter.

The GL_LINEAR filter may need to sample a couple of neighboring texels
in order to produce the final texel value. However, since all decoration
parts now live in a single texture, we have to make sure that we don't
sample texels that belong to another decoration part.

This patch fixes the texture bleeding problem by padding each individual
decoration part in the atlas. There is another solution for this problem
though. We could render a window into an offscreen texture and then map
that texture on the transformed window geometry. This would work well and
we definitely need an offscreen rendering path in the opengl scene,
however it's not feasible at the moment since we need to break the window
quads API. Also, it would be great to have as less as possible stuff going
on between invocation of Scene::Window::performPaint() and getting the
corresponding pixel data on the screen.

There is a good chance that the new padding stuff may make you vomit. If
it does so, I'm all ears for the suggestions how to make the code more
nicer.

BUG: 257566
BUG: 360549
CCBUG: 412573
FIXED-IN: 5.18.0

Reviewers: #kwin

Subscribers: fredrik, kwin, fvogt

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25611
2019-12-02 15:08:44 +02:00
Vlad Zahorodnii 754b72d155 [x11] Name client pixmap instead of frame pixmap
Summary:
Since KDE 4.2 - 4.3 times, KWin doesn't paint window decorations on real
X11 windows, except when compositing is turned off. This leaves us with
a problem. The actual client contents is inside a larger texture with no
useful pixel data around it. This and decoration texture bleeding are
the main factors that contribute to 1px gap between the server-side
decoration and client contents with effects such as wobbly windows, and
zoom.

Another problem with naming frame pixmap instead of client pixmap is
that it doesn't quite go along with wayland. It only makes more difficult
to abstract window quad generation in the scene.

Since we don't actually need the frame window when compositing is on,
there is nothing that holds us from redirecting client windows instead
of frame windows. This will help us to fix the texture bleeding issue
and also help us with the ongoing redesign of the scene.

Test Plan: X11 clients are still composited.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25610
2019-12-02 15:08:38 +02:00
Vlad Zahorodnii 9d4a32596c Drop some custom list typedefs
Summary:
Qt has its own thing where a type might also have corresponding list
alias, e.g. QObject and QObjectList, QWidget and QWidgetList. I don't
know why Qt does that, maybe for some historical reasons, but what
matters is that we copy this pattern here in KWin. While this pattern
might be useful with some long list types, for example

    QList<QWeakPointer<TabBoxClient>> TabBoxClientList

in general, it causes more harm than good. For example, we've got two
new client types, do we need corresponding list typedefs for them? If
no, why do we have ClientList and so on?

Another problem with these typedefs is that you need to include utils.h
header in order to use them. A better way to handle such things is to
just forward declare a client class (if that's possible) and use it
directly with QList or QVector. This way translation units don't get
"bloated" with utils.h stuff for no apparent reason.

So, in order to make code more consistent and easier to follow, this
change drops some of our custom typedefs. Namely ConstClientList,
ClientList, DeletedList, UnmanagedList, ToplevelList, and GroupList.

Test Plan: Compiles.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24950
2019-11-27 15:54:08 +02:00
Vlad Zahorodnii fb2d4c113f Adjust scene for client-side decorated clients
Summary:
Currently our Scene is quite naive about geometry. It assumes that the
window frame wraps the attached buffer/client. While this is true for X11
clients, such geometry model is not suitable for client-side decorated
clients, in our case for xdg-shell clients that set window geometry
other than the bounding rectangle of the main surface.

In general, the proposed solution doesn't make any concrete assumptions
about the order between frame and buffer geometry, however we may still
need to reconsider the design of Scene once it starts to generate quads
for sub-surfaces.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, romangg, kwin

Tags: #kwin

Maniphest Tasks: T10867

Differential Revision: https://phabricator.kde.org/D24462
2019-11-27 14:12:30 +02:00
Vlad Zahorodnii 14dc76f624 Fix coding style issues in Scene::paintSimpleScreen
Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, fredrik, kwin

Tags: #kwin

Maniphest Tasks: T10867

Differential Revision: https://phabricator.kde.org/D24461
2019-11-27 14:12:30 +02:00
Roman Gilg 8d13729031 [platforms/x11] Never block on retrace, always present after paint
Summary:
Compositing in X11 was done time shifted, meaning that we paint first, then
wait one vblank interval length and present on prepareRenderingFrame the
previous paint result. This is supposed to make sure we don't miss the vblank
and in case of block till retrace be able to continue issuing commands and
only shortly before next vblank present.

This is counter-intuitiv, not how we do it on Wayland or even on MESA with X.
The reason seems to be that the GLX backend was in the beginning written
against Nvidia proprietary driver which needed this but nowadays even this
driver defaults to non-blocking behavior on buffer swap.

Therefore remove this legacy anomaly fully and directly present after paint.
We then wait one refresh cycle and in the future can optimize this by delaying
the paint and present till shortly before vsync.

Test Plan: kwin_x11 tested on i915 and Nvidia proprietary driver.

Reviewers: #kwin

Subscribers: zzag, alexeymin, kwin

Tags: #kwin

Maniphest Tasks: T11071

Differential Revision: https://phabricator.kde.org/D23514
2019-11-14 09:03:44 +01:00
Roman Gilg b3a19f9e5b Remove vsync detection and configurability
Summary:
Selecting not to vsync does not make sense for an X11 compositor. In the end
we want clients to be able to present async if they want to but the compositor
is supposed to send swaps with vsync to the XServer in order to not generate
tearing artifacts.

There was also a detection logic which did some questionable things in case
vsync was not available. I don't think this is necessary at all since we can
just always run a timer to present with or without vsync.

Test Plan: kwin_x11 tested on i915.

Reviewers: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Maniphest Tasks: T11071

Differential Revision: https://phabricator.kde.org/D23511
2019-11-14 08:55:08 +01:00