Files
gtk/gdk
Ray Strode 56b3669411 x11: Avoid thawing surface until frame is drawn
Since commit 972134abe4 a frame getting
drawn has three states (with the vendor nvidia driver at least):

1. drawn by gtk waiting on the GPU
2. drawn by GPU waiting on the compositor
3. drawn by compositor

Those three states are encoded in two flags: frame_pending and
frame_still_painting.

frame_pending means step 1 is done, but step 2 and 3 are still
in progress.  frame_still_painting means step 2 is still in progress.

After step 1 is finished the surface is frozen until step 3 is finished.

When the compositor notifies gtk it's done with step 3, with a
_NET_WM_FRAME_DRAWN client message, the toolkit thaws the surface to
allow the next frame to proceed.

The compositor sometimes sends gtk a _NET_WM_FRAME_DRAWN client message
between steps 1 and 2.  This message should be ignored because it's not
a reply to the current frame.

Unfortunately, gtk currently assumes if it gets a _NET_WM_FRAME_DRAWN
client message while waiting for step 2 that it's actually at step 3,
and proceeds to draw a new frame while the existing frame is still
pending, leading to a blown assertion.

This commit addresses the problem by ignoring _NET_WM_FRAME_DRAWN
client messages from the compositor unless actually expecting one.

Fixes: #2902
2020-06-30 14:36:15 -04:00
..
2020-06-23 23:42:53 +02:00
2020-06-18 19:22:20 +01:00
2020-06-23 23:42:53 +02:00
2020-06-28 13:42:02 -04:00
2020-06-28 13:42:02 -04:00
2020-03-12 14:56:21 -04:00
2020-06-18 10:47:16 +03:00
2019-11-27 13:33:43 +00:00
2019-12-28 21:52:34 -05:00
2020-06-18 10:47:16 +03:00
2018-07-13 10:13:00 +02:00
2019-11-27 13:33:43 +00:00
2019-11-27 13:33:43 +00:00
2020-06-23 23:42:53 +02:00
2020-05-29 09:26:50 -04:00
2020-05-28 11:00:03 +03:00
2020-06-23 23:42:53 +02:00
2020-02-21 00:51:02 -05:00
2020-04-03 15:30:56 +01:00
2020-03-02 04:43:56 +01:00
2020-06-28 12:24:03 -04:00
2020-06-23 23:42:53 +02:00
2020-06-09 13:43:03 -04:00
2020-06-12 15:08:44 +02:00
2019-11-27 13:33:43 +00:00
2019-01-23 22:33:44 -05:00
2019-11-27 13:33:43 +00:00
2020-06-23 23:42:53 +02:00
2020-06-18 10:47:16 +03:00
2020-04-06 16:32:03 -04:00
2020-04-30 13:05:52 -04:00
2019-02-06 10:39:27 +01:00
2018-04-28 16:22:29 -04:00
2020-05-17 07:32:37 +02:00
2020-01-30 21:33:37 +01:00
2019-11-27 13:33:43 +00:00
2019-11-27 13:33:43 +00:00
2020-03-11 19:35:55 -04:00
2020-03-11 19:35:55 -04:00
2020-06-05 20:59:51 -04:00
2020-03-11 19:35:55 -04:00
2019-11-27 13:33:43 +00:00
2020-05-31 17:09:23 +02:00
2018-03-18 19:21:33 +01:00
2019-11-27 13:33:43 +00:00
2020-06-18 10:47:16 +03:00
2020-05-28 11:00:03 +03:00
2020-06-05 20:59:51 -04:00
2020-05-28 11:00:03 +03:00
2020-03-12 14:56:21 -04:00