[gtk+: 8/8] wayland: rework buffer management code (3 changes)
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+: 8/8] wayland: rework buffer management code (3 changes)
- Date: Sat, 6 Feb 2016 13:45:42 +0000 (UTC)
commit 2ebae407ca743d09a82fd9a383b34779100c9fe6
Merge: 1cfa2f4 c80dd549
Author: Ray Strode <rstrode redhat com>
Date: Sat Feb 6 08:03:27 2016 -0500
wayland: rework buffer management code (3 changes)
There are a couple of issues with the way that buffers are handled in
wayland in right. These issues mean that:
- buffers can get leaked at a fairly fast clip under the right
conditions. This leads to the OOM killer kicking in and
gnome-shell and gnome-terminal (for instance) showing memory
usage in the high gigabytes range.
- drawing can happen to a shared memory buffer at the same time
the compositor is reading out the pixels. This can lead to
glitching in drawing and other undefined behavior by the compositor.
This changeset reworks how buffer management is done in the code to try
to address both problems.
The first change (commit 2c300081) addresses the leak by dropping code
that has an unchecked cairo_surface_reference call. The code is dropped
rather than fixed, because it has a more serious issue: it's overarching
purpose is to deal with shared memory buffer contention with the
compositor, but it does it in a racy way and so fails at that mission.
The second change (commit 40e91195a) moves what layer of the code buffer
release events are handled. This is an organizational change in the
code, with no functional changes, but it's important for the last change
in the changeset.
The last change (commit c80dd549) adds back code for dealing with shared
member buffer contention in a race free way. The new code is careful to
never reuse a buffer that hasn't been explicitly released by the
compositor.
gdk/wayland/gdkcursor-wayland.c | 18 +++
gdk/wayland/gdkdisplay-wayland.c | 33 ------
gdk/wayland/gdkprivate-wayland.h | 2 -
gdk/wayland/gdkwindow-wayland.c | 214 +++++++++++++++++++++++++++++++-------
4 files changed, 192 insertions(+), 75 deletions(-)
---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]