Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwlbuffermanager.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5#include <QWaylandCompositor>
6#include <QtWaylandCompositor/private/qwaylandcompositor_p.h>
7#include <QtWaylandCompositor/private/qwlclientbufferintegration_p.h>
8#include <QDebug>
9
11
12namespace QtWayland {
13
20
22{
24 {
25 notify = BufferManager::destroy_listener_callback;
26 wl_list_init(&this->link);
27 }
28
29 BufferManager *d = nullptr;
30};
31
41
43{
44 if (!buffer_resource)
45 return nullptr;
46
48 if (it != m_buffers.end())
49 return it.value();
50
51 ClientBuffer *newBuffer = nullptr;
52
55 if (newBuffer)
56 break;
57 }
58
59 if (newBuffer)
61 else
62 qCWarning(qLcWaylandCompositorHardwareIntegration) << "Could not create buffer for resource.";
63
64 return newBuffer;
65}
66
67
69{
72 struct ::wl_resource *buffer = static_cast<struct ::wl_resource *>(data);
73
75 delete destroy_listener;
76
79
81
82 if (!clientBuffer)
83 return;
84
86}
87
88}
89QT_END_NAMESPACE
Combined button and popup list for selecting options.