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
ac203818
Commit
ac203818
authored
Oct 29, 2020
by
Vlad Zahorodnii
Browse files
platforms/drm: Enable buffer age for all outputs
parent
74391e25
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/platforms/drm/egl_gbm_backend.cpp
View file @
ac203818
...
...
@@ -568,7 +568,7 @@ void EglGbmBackend::endRenderingFrameForScreen(int screenId,
Output
&
output
=
m_outputs
[
screenId
];
renderFramebufferToSurface
(
output
);
if
(
damagedRegion
.
intersected
(
output
.
output
->
geometry
()).
isEmpty
()
&&
screenId
==
0
)
{
if
(
damagedRegion
.
intersected
(
output
.
output
->
geometry
()).
isEmpty
())
{
// If the damaged region of a window is fully occluded, the only
// rendering done, if any, will have been to repair a reused back
...
...
@@ -580,22 +580,12 @@ void EglGbmBackend::endRenderingFrameForScreen(int screenId,
if
(
!
renderedRegion
.
intersected
(
output
.
output
->
geometry
()).
isEmpty
())
glFlush
();
for
(
auto
&
output
:
m_outputs
)
{
output
.
bufferAge
=
1
;
}
output
.
bufferAge
=
1
;
return
;
}
presentOnOutput
(
output
,
damagedRegion
);
// Save the damaged region to history
// Note: damage history is only collected for the first screen. For any other screen full
// repaints are triggered. This is due to a limitation in Scene::paintGenericScreen which resets
// the Toplevel's repaint. So multiple calls to Scene::paintScreen as it's done in multi-output
// rendering only have correct damage information for the first screen. If we try to track
// damage nevertheless, it creates artifacts. So for the time being we work around the problem
// by only supporting buffer age on the first output. To properly support buffer age on all
// outputs the rendering needs to be refactored in general.
if
(
supportsBufferAge
()
&&
screenId
==
0
)
{
if
(
supportsBufferAge
())
{
if
(
output
.
damageHistory
.
count
()
>
10
)
{
output
.
damageHistory
.
removeLast
();
}
...
...
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