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
12515b46
Commit
12515b46
authored
May 09, 2022
by
Xaver Hugl
Committed by
Vlad Zahorodnii
May 10, 2022
Browse files
backends/drm: fix qpainter
parent
1dd12a06
Pipeline
#174234
passed with stage
in 12 minutes and 52 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/backends/drm/drm_qpainter_layer.cpp
View file @
12515b46
...
...
@@ -48,14 +48,20 @@ void DrmQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &da
Q_UNUSED
(
renderedRegion
)
m_currentDamage
=
damagedRegion
;
m_swapchain
->
releaseBuffer
(
m_swapchain
->
currentBuffer
(),
damagedRegion
);
m_currentFramebuffer
=
DrmFramebuffer
::
createFramebuffer
(
m_swapchain
->
currentBuffer
());
}
bool
DrmQPainterLayer
::
checkTestBuffer
()
{
if
(
!
doesSwapchainFit
())
{
m_swapchain
=
std
::
make_shared
<
DumbSwapchain
>
(
m_pipeline
->
gpu
(),
m_pipeline
->
bufferSize
(),
DRM_FORMAT_XRGB8888
);
if
(
!
m_swapchain
->
isEmpty
())
{
m_currentFramebuffer
=
DrmFramebuffer
::
createFramebuffer
(
m_swapchain
->
currentBuffer
());
}
else
{
m_currentFramebuffer
.
reset
();
}
}
return
!
m_
swapchain
->
isEmpty
()
;
return
m_
currentFramebuffer
!=
nullptr
;
}
bool
DrmQPainterLayer
::
doesSwapchainFit
()
const
...
...
@@ -65,7 +71,7 @@ bool DrmQPainterLayer::doesSwapchainFit() const
std
::
shared_ptr
<
DrmFramebuffer
>
DrmQPainterLayer
::
currentBuffer
()
const
{
return
m_swapchain
?
m_currentFramebuffer
:
nullptr
;
return
m_currentFramebuffer
;
}
QRegion
DrmQPainterLayer
::
currentDamage
()
const
...
...
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