Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
db91050f
Commit
db91050f
authored
Dec 05, 2021
by
Xaver Hugl
Browse files
dmabuf-feedback: fix crash
BUG: 446502
parent
53064d9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/wayland/linuxdmabufv1clientbuffer.cpp
View file @
db91050f
...
...
@@ -25,7 +25,7 @@ static const int s_version = 4;
LinuxDmaBufV1ClientBufferIntegrationPrivate
::
LinuxDmaBufV1ClientBufferIntegrationPrivate
(
LinuxDmaBufV1ClientBufferIntegration
*
q
,
Display
*
display
)
:
QtWaylandServer
::
zwp_linux_dmabuf_v1
(
*
display
,
s_version
)
,
q
(
q
)
,
defaultFeedback
(
new
LinuxDmaBufV1Feedback
(
q
))
,
defaultFeedback
(
new
LinuxDmaBufV1Feedback
(
this
))
{
}
...
...
@@ -66,7 +66,7 @@ void LinuxDmaBufV1ClientBufferIntegrationPrivate::zwp_linux_dmabuf_v1_get_surfac
}
auto
surfacePrivate
=
SurfaceInterfacePrivate
::
get
(
surface
);
if
(
!
surfacePrivate
->
dmabufFeedbackV1
)
{
surfacePrivate
->
dmabufFeedbackV1
.
reset
(
new
LinuxDmaBufV1Feedback
(
q
));
surfacePrivate
->
dmabufFeedbackV1
.
reset
(
new
LinuxDmaBufV1Feedback
(
this
));
}
LinuxDmaBufV1FeedbackPrivate
::
get
(
surfacePrivate
->
dmabufFeedbackV1
.
data
())
->
add
(
resource
->
client
(),
id
,
resource
->
version
());
}
...
...
@@ -86,11 +86,6 @@ void LinuxDmaBufV1ClientBufferIntegrationPrivate::zwp_linux_dmabuf_v1_create_par
new
LinuxDmaBufParamsV1
(
q
,
paramsResource
);
}
LinuxDmaBufV1ClientBufferIntegrationPrivate
*
LinuxDmaBufV1ClientBufferIntegrationPrivate
::
get
(
LinuxDmaBufV1ClientBufferIntegration
*
integration
)
{
return
integration
->
d
.
data
();
}
LinuxDmaBufParamsV1
::
LinuxDmaBufParamsV1
(
LinuxDmaBufV1ClientBufferIntegration
*
integration
,
::
wl_resource
*
resource
)
:
QtWaylandServer
::
zwp_linux_buffer_params_v1
(
resource
)
,
m_integration
(
integration
)
...
...
@@ -437,8 +432,8 @@ ClientBuffer::Origin LinuxDmaBufV1ClientBuffer::origin() const
}
}
LinuxDmaBufV1Feedback
::
LinuxDmaBufV1Feedback
(
LinuxDmaBufV1ClientBufferIntegration
*
integration
)
:
d
(
new
LinuxDmaBufV1FeedbackPrivate
(
LinuxDmaBufV1ClientBufferIntegrationPrivate
::
get
(
integration
))
)
LinuxDmaBufV1Feedback
::
LinuxDmaBufV1Feedback
(
LinuxDmaBufV1ClientBufferIntegration
Private
*
integration
)
:
d
(
new
LinuxDmaBufV1FeedbackPrivate
(
integration
))
{
}
...
...
src/wayland/linuxdmabufv1clientbuffer.h
View file @
db91050f
...
...
@@ -135,7 +135,7 @@ public:
void
setTranches
(
const
QVector
<
Tranche
>
&
tranches
);
private:
LinuxDmaBufV1Feedback
(
LinuxDmaBufV1ClientBufferIntegration
*
integration
);
LinuxDmaBufV1Feedback
(
LinuxDmaBufV1ClientBufferIntegration
Private
*
integration
);
friend
class
LinuxDmaBufV1ClientBufferIntegrationPrivate
;
friend
class
LinuxDmaBufV1FeedbackPrivate
;
QScopedPointer
<
LinuxDmaBufV1FeedbackPrivate
>
d
;
...
...
src/wayland/linuxdmabufv1clientbuffer_p.h
View file @
db91050f
...
...
@@ -39,8 +39,6 @@ public:
dev_t
mainDevice
;
QHash
<
uint32_t
,
QSet
<
uint64_t
>>
supportedModifiers
;
static
LinuxDmaBufV1ClientBufferIntegrationPrivate
*
get
(
LinuxDmaBufV1ClientBufferIntegration
*
integration
);
protected:
void
zwp_linux_dmabuf_v1_bind_resource
(
Resource
*
resource
)
override
;
void
zwp_linux_dmabuf_v1_destroy
(
Resource
*
resource
)
override
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment