<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/mutter.git/src/compositor, branch document-button-values</title>
<subtitle>gitlab.gnome.org: GNOME/mutter.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/'/>
<entry>
<title>later: Handle gracefully calls with unset display</title>
<updated>2021-03-13T15:12:36+00:00</updated>
<author>
<name>Marco Trevisan (Treviño)</name>
<email>mail@3v1n0.net</email>
</author>
<published>2021-03-13T05:20:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=2744722b8cb06540c26b82c5e49c6546b4437554'/>
<id>2744722b8cb06540c26b82c5e49c6546b4437554</id>
<content type='text'>
This can happen when the display has been already closed, in such case
we should not crash but warn about the error and return early.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1780&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can happen when the display has been already closed, in such case
we should not crash but warn about the error and return early.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1780&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>plugins/default: Initialize background color in a predictable manner</title>
<updated>2021-03-12T15:09:45+00:00</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2021-02-13T23:17:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=ba3805706795c90db436f6a1572ecf9f5ca5cf2b'/>
<id>ba3805706795c90db436f6a1572ecf9f5ca5cf2b</id>
<content type='text'>
The order of which function argument expressions are executed is
undefined, so don't rely on this for setting the background colors, as
it results in different colors on different architectures.

For example, it has been observed that the order of execution is
reversed comparing x86_64 and aarch64, making these two architectures
having different background color.

Fix this confusion, and also reproduceability in future reference tests,
by making the order of execution predictable.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The order of which function argument expressions are executed is
undefined, so don't rely on this for setting the background colors, as
it results in different colors on different architectures.

For example, it has been observed that the order of execution is
reversed comparing x86_64 and aarch64, making these two architectures
having different background color.

Fix this confusion, and also reproduceability in future reference tests,
by making the order of execution predictable.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>background-content: Optimize rounded clipping shader a bit</title>
<updated>2021-03-11T21:59:07+00:00</updated>
<author>
<name>Jonas Dreßler</name>
<email>verdre@v0yd.nl</email>
</author>
<published>2021-03-11T21:57:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=b770ea606aeaea66504649f665e01ac31bfdef44'/>
<id>b770ea606aeaea66504649f665e01ac31bfdef44</id>
<content type='text'>
We're using the gtk4 shader for rounded rect clipping here, and gtk just
introduced a small optimization to make this shader a bit faster, so
let's do the same.

See https://gitlab.gnome.org/GNOME/gtk/-/commit/57e354c297e1703079c2bc6fb51211b24d884ac3

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1774&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're using the gtk4 shader for rounded rect clipping here, and gtk just
introduced a small optimization to make this shader a bit faster, so
let's do the same.

See https://gitlab.gnome.org/GNOME/gtk/-/commit/57e354c297e1703079c2bc6fb51211b24d884ac3

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1774&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>window-actor/x11: Queue full actor redraw when redraw queued</title>
<updated>2021-03-09T17:42:58+00:00</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2021-03-05T08:55:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=9b90b5a1b0856144d21e1a70e306d3f769a2e2f0'/>
<id>9b90b5a1b0856144d21e1a70e306d3f769a2e2f0</id>
<content type='text'>
With frame timings, we might end up in a situation where a frame drawn
is expected, but no damage was posted. Up until now, mutter handled
this, if the window wasn't completely hidden, by posting a 1x1 pixel
damage region. The problem with this is that we now are a bit more
aggressive optimizing away no-op redraws, meaning we still might end up
not drawing, making things get stuck.

Fix this by doing a full actor redraw, as that is the only reliable way
to both a new frame being drawn, as well as the actor in question itself
getting redrawn.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1516
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3369
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1471
Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1754&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With frame timings, we might end up in a situation where a frame drawn
is expected, but no damage was posted. Up until now, mutter handled
this, if the window wasn't completely hidden, by posting a 1x1 pixel
damage region. The problem with this is that we now are a bit more
aggressive optimizing away no-op redraws, meaning we still might end up
not drawing, making things get stuck.

Fix this by doing a full actor redraw, as that is the only reliable way
to both a new frame being drawn, as well as the actor in question itself
getting redrawn.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1516
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3369
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1471
Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1754&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>compositor/x11: Notify the sync ring about frames on updates</title>
<updated>2021-03-09T17:42:58+00:00</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2021-03-04T18:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=44a4e616658edb2a21a9612cfd3a41742a1ca427'/>
<id>44a4e616658edb2a21a9612cfd3a41742a1ca427</id>
<content type='text'>
The sync ring has an API about "frames", where it is notified about
the end of frames. However, its "insert wait" call is done before
updates, meaning that some "insert waits" will never see the "after
frame" if there was no frame drawn. This will cause mismatching in the
frame counting, causing freezes in the synchronization until something
else triggers an actual frame, effectively "unfreezing" the sync ring.

Fix this by not only notifying the sync ring about frames when there
were actual frames drawn, but also on plain updates which didn't result
in a drawn frame.

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/1516
Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1754&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sync ring has an API about "frames", where it is notified about
the end of frames. However, its "insert wait" call is done before
updates, meaning that some "insert waits" will never see the "after
frame" if there was no frame drawn. This will cause mismatching in the
frame counting, causing freezes in the synchronization until something
else triggers an actual frame, effectively "unfreezing" the sync ring.

Fix this by not only notifying the sync ring about frames when there
were actual frames drawn, but also on plain updates which didn't result
in a drawn frame.

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/1516
Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1754&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cogl: Make presentation time always MONOTONIC</title>
<updated>2021-03-08T09:48:11+00:00</updated>
<author>
<name>Ivan Molodetskikh</name>
<email>yalterz@gmail.com</email>
</author>
<published>2021-01-30T20:14:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=48101648850c841317e1c04e6ebc13f2adae143d'/>
<id>48101648850c841317e1c04e6ebc13f2adae143d</id>
<content type='text'>
This concerns only the cases when the presentation timestamp is received
directly from the device (from KMS or from GLX). In the majority of
cases this timestamp is already MONOTONIC. When it isn't, after this
commit, the current value of the MONOTONIC clock is sampled instead.

The alternative is to store the clock id alongside the timestamp, with
possible values of MONOTONIC, REALTIME (from KMS) and GETTIMEOFDAY (from
GLX; this might be the same as REALTIME, I'm not sure), and then
"convert" the timestamp to MONOTONIC when needed. An example of such a
conversion was done in compositor.c (removed in this commit). It would
also be needed for the presentation-time Wayland protocol. However, it
seems that the vast majority of up-to-date systems are using MONOTONIC
anyway, making this effort not justified.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1484&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This concerns only the cases when the presentation timestamp is received
directly from the device (from KMS or from GLX). In the majority of
cases this timestamp is already MONOTONIC. When it isn't, after this
commit, the current value of the MONOTONIC clock is sampled instead.

The alternative is to store the clock id alongside the timestamp, with
possible values of MONOTONIC, REALTIME (from KMS) and GETTIMEOFDAY (from
GLX; this might be the same as REALTIME, I'm not sure), and then
"convert" the timestamp to MONOTONIC when needed. An example of such a
conversion was done in compositor.c (removed in this commit). It would
also be needed for the presentation-time Wayland protocol. However, it
seems that the vast majority of up-to-date systems are using MONOTONIC
anyway, making this effort not justified.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1484&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>background-content: Fix pipeline cache size</title>
<updated>2021-02-24T15:59:58+00:00</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2021-02-24T15:39:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=3bbfaa03b3944a856540eaca00f76f3975e09cfd'/>
<id>3bbfaa03b3944a856540eaca00f76f3975e09cfd</id>
<content type='text'>
The cache had the size 9, which was "big enough" in the past, but when
more ways pipelines could be constructed, the size was not enough. The
need to increase the cache size was hard to spot though, since adding
pipeline flag didn't give any hints about the cache being directly tied
to these flag values.

So, when enough flag bits were set when attempting to retrieve and put a
pipeline in the cache, it'd instead overwrite some arbitrary stack
memory, which would sooner or later result in a memory corruption
induced crash. Valgrind could not detect this particular memory
corruption, as it messed up stack memory, not e.g. freed heap memory, so
it instead got confused and thought plain stack values were unreadable.

Fix these two issues by making the cache size the combination of all
pipeline flags + 1, so that we can safely put any flag combination in
the cache.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1747&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cache had the size 9, which was "big enough" in the past, but when
more ways pipelines could be constructed, the size was not enough. The
need to increase the cache size was hard to spot though, since adding
pipeline flag didn't give any hints about the cache being directly tied
to these flag values.

So, when enough flag bits were set when attempting to retrieve and put a
pipeline in the cache, it'd instead overwrite some arbitrary stack
memory, which would sooner or later result in a memory corruption
induced crash. Valgrind could not detect this particular memory
corruption, as it messed up stack memory, not e.g. freed heap memory, so
it instead got confused and thought plain stack values were unreadable.

Fix these two issues by making the cache size the combination of all
pipeline flags + 1, so that we can safely put any flag combination in
the cache.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1747&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: Stop using GSlice</title>
<updated>2021-02-22T12:52:27+00:00</updated>
<author>
<name>Robert Mader</name>
<email>robert.mader@posteo.de</email>
</author>
<published>2020-10-19T17:57:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=6eeeffdc680a41057da1ab4d1b75185dd48000db'/>
<id>6eeeffdc680a41057da1ab4d1b75185dd48000db</id>
<content type='text'>
It has been inofficially deprecated for years, is known to cause issues
with valgrind and potentially hides memory corruption.
Lets stop using it.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1512&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It has been inofficially deprecated for years, is known to cause issues
with valgrind and potentially hides memory corruption.
Lets stop using it.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1512&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>display: Don't add MetaDisplay argument to grab-op-* signals twice</title>
<updated>2021-02-19T13:52:22+00:00</updated>
<author>
<name>Jonas Dreßler</name>
<email>verdre@v0yd.nl</email>
</author>
<published>2021-02-18T11:14:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=9512d58c28434aca03f445b6ab80d8a5a7a9268a'/>
<id>9512d58c28434aca03f445b6ab80d8a5a7a9268a</id>
<content type='text'>
GObject signals pass the emitting GObject as the first argument to
signal handler callbacks. When refactoring the grab-op-begin/end signals
to remove MetaScreen with commit 1d5e37050df2b8e1db8b5ea301ee0162d77d4b74,
the "screen" argument was replaced with a "display" argument instead of
being removed completely. This made us call the signal handlers with two
identical MetaDisplay arguments, which is very confusing and actually
wasn't handled in a grab-op-begin handler in gnome-shell.

So fix this by not adding the MetaDisplay as an argument to those
signals, GObject will take care of that for us.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1734&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GObject signals pass the emitting GObject as the first argument to
signal handler callbacks. When refactoring the grab-op-begin/end signals
to remove MetaScreen with commit 1d5e37050df2b8e1db8b5ea301ee0162d77d4b74,
the "screen" argument was replaced with a "display" argument instead of
being removed completely. This made us call the signal handlers with two
identical MetaDisplay arguments, which is very confusing and actually
wasn't handled in a grab-op-begin handler in gnome-shell.

So fix this by not adding the MetaDisplay as an argument to those
signals, GObject will take care of that for us.

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1734&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>background-content: Add support for rounded clipping when drawing</title>
<updated>2021-02-18T20:26:42+00:00</updated>
<author>
<name>Jonas Dreßler</name>
<email>verdre@v0yd.nl</email>
</author>
<published>2021-02-08T08:33:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/mutter.git/commit/?id=5527b6e4835a34800207a3d79e094921cfeaf291'/>
<id>5527b6e4835a34800207a3d79e094921cfeaf291</id>
<content type='text'>
We're going to round the workspace backgrounds in the new overview for
gnome-shell 40.

So far corner-rounding was only possible for StWidgets because the
rounded clipping was done using cairo drawing. We now need rounded
clipping for ClutterActors too because backgrounds are drawn using
ClutterActors (or more specifically a ClutterContent). To implement
that, first a ClutterOffscreenEffect subclass together with a fragment
shader from GSK (see gskSetOutputColor() [1] in the GSK GL renderer
code) was investigated, and while that was generic and worked quite
well, it was extremely slow for the case of drawing wallpapers because
of all the FBOs that had to be allocated.

This is the new, more performant approach: Use the same fragment shader,
but perform the rounded clipping right in MetaBackgroundContent while
we're painting the wallpaper. This has almost no performance impact,
with the downside of not being a generic solution.

To allow for rounded clipping not only at the edges of the wallpaper,
but using any given bounding rectangle, the API exposes not only the
radius, but also a bounding rect.

[1] https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gsk/resources/glsl/preamble.fs.glsl

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1717&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're going to round the workspace backgrounds in the new overview for
gnome-shell 40.

So far corner-rounding was only possible for StWidgets because the
rounded clipping was done using cairo drawing. We now need rounded
clipping for ClutterActors too because backgrounds are drawn using
ClutterActors (or more specifically a ClutterContent). To implement
that, first a ClutterOffscreenEffect subclass together with a fragment
shader from GSK (see gskSetOutputColor() [1] in the GSK GL renderer
code) was investigated, and while that was generic and worked quite
well, it was extremely slow for the case of drawing wallpapers because
of all the FBOs that had to be allocated.

This is the new, more performant approach: Use the same fragment shader,
but perform the rounded clipping right in MetaBackgroundContent while
we're painting the wallpaper. This has almost no performance impact,
with the downside of not being a generic solution.

To allow for rounded clipping not only at the edges of the wallpaper,
but using any given bounding rectangle, the API exposes not only the
radius, but also a bounding rect.

[1] https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gsk/resources/glsl/preamble.fs.glsl

Part-of: &lt;https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1717&gt;
</pre>
</div>
</content>
</entry>
</feed>
