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
4c814590
Commit
4c814590
authored
Mar 03, 2022
by
Aleix Pol Gonzalez
🐧
Browse files
Fix textureForOutput for the EglWaylandBackend
Ensure we get our texture from the right output
parent
eb760505
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/backends/wayland/egl_wayland_backend.cpp
View file @
4c814590
...
...
@@ -309,6 +309,17 @@ static QVector<EGLint> regionToRects(const QRegion ®ion, AbstractWaylandOutpu
return
rects
;
}
QSharedPointer
<
KWin
::
GLTexture
>
EglWaylandBackend
::
textureForOutput
(
KWin
::
AbstractOutput
*
output
)
const
{
QSharedPointer
<
GLTexture
>
texture
(
new
GLTexture
(
GL_RGBA8
,
output
->
pixelSize
()));
GLRenderTarget
::
pushRenderTarget
(
m_outputs
[
output
]
->
renderTarget
());
GLRenderTarget
renderTarget
(
texture
.
data
());
renderTarget
.
blitFromFramebuffer
(
QRect
(
0
,
texture
->
height
(),
texture
->
width
(),
-
texture
->
height
()));
GLRenderTarget
::
popRenderTarget
();
return
texture
;
}
void
EglWaylandBackend
::
aboutToStartPainting
(
AbstractOutput
*
output
,
const
QRegion
&
damagedRegion
)
{
Q_ASSERT_X
(
output
,
"aboutToStartPainting"
,
"not using per screen rendering"
);
...
...
src/backends/wayland/egl_wayland_backend.h
View file @
4c814590
...
...
@@ -83,6 +83,7 @@ public:
return
m_havePlatformBase
;
}
QSharedPointer
<
KWin
::
GLTexture
>
textureForOutput
(
KWin
::
AbstractOutput
*
output
)
const
override
;
void
aboutToStartPainting
(
AbstractOutput
*
output
,
const
QRegion
&
damage
)
override
;
private:
...
...
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