Revert "Ref count buffer usage"
When a buffer is committed multiple times, not all compositors (i.e. Weston) send a matching number of release events. This caused clients to freeze on some occasions on those compositors because they were waiting for a release event that never came. This reverts commit 1fbffb9dfb011c3b7c7aaa41b7be3a8167ce0c8a. Backport from 5.10.0 to 5.9.4 Task-number: QTBUG-64631 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit f1b07ea1ee9e839a5ca38c4c330511ab6cd0b56c) Change-Id: I2acf5574a1b792d3bbf928fb0bc328aa8ee8ffe0 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
7f8d9b7f54
commit
2a82da8787
@ -66,7 +66,7 @@ void QWaylandBuffer::init(wl_buffer *buf)
|
||||
|
||||
void QWaylandBuffer::release(void *data, wl_buffer *)
|
||||
{
|
||||
static_cast<QWaylandBuffer *>(data)->mBusy--;
|
||||
static_cast<QWaylandBuffer *>(data)->mBusy = false;
|
||||
}
|
||||
|
||||
const wl_buffer_listener QWaylandBuffer::listener = {
|
||||
|
@ -73,14 +73,14 @@ public:
|
||||
virtual QSize size() const = 0;
|
||||
virtual int scale() const { return 1; }
|
||||
|
||||
void setBusy() { mBusy++; }
|
||||
bool busy() const { return mBusy > 0; }
|
||||
void setBusy() { mBusy = true; }
|
||||
bool busy() const { return mBusy; }
|
||||
|
||||
protected:
|
||||
struct wl_buffer *mBuffer;
|
||||
|
||||
private:
|
||||
int mBusy;
|
||||
bool mBusy;
|
||||
|
||||
static void release(void *data, wl_buffer *);
|
||||
static const wl_buffer_listener listener;
|
||||
|
Loading…
x
Reference in New Issue
Block a user