-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add spec file for KWin 5.27.10
- Loading branch information
Showing
2 changed files
with
1,357 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
From 17f81c4faa4c93dc9ac2d9abf1b759b38df2ed9d Mon Sep 17 00:00:00 2001 | ||
From: Alessandro Astone <[email protected]> | ||
Date: Wed, 15 Nov 2023 23:22:56 +0100 | ||
Subject: [PATCH 1/2] screencast: Fix GLES path | ||
|
||
glReadPixels reads from the bound framebuffer, so create an offscreen | ||
framebuffer and attach the texture to it | ||
|
||
Co-authored-by: Jan Grulich <[email protected]> | ||
--- | ||
src/plugins/screencast/screencastutils.h | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/src/plugins/screencast/screencastutils.h b/src/plugins/screencast/screencastutils.h | ||
index f402c21fdf..1a57362dea 100644 | ||
--- a/src/plugins/screencast/screencastutils.h | ||
+++ b/src/plugins/screencast/screencastutils.h | ||
@@ -8,6 +8,7 @@ | ||
|
||
#include "kwinglplatform.h" | ||
#include "kwingltexture.h" | ||
+#include "kwinglutils.h" | ||
#include <spa/buffer/buffer.h> | ||
#include <spa/param/video/raw.h> | ||
|
||
@@ -60,7 +61,10 @@ static void grabTexture(GLTexture *texture, spa_data *spa, spa_video_format form | ||
|
||
texture->bind(); | ||
if (GLPlatform::instance()->isGLES()) { | ||
+ GLFramebuffer fbo(texture); | ||
+ GLFramebuffer::pushFramebuffer(&fbo); | ||
glReadPixels(0, 0, size.width(), size.height(), closestGLType(format), GL_UNSIGNED_BYTE, spa->data); | ||
+ GLFramebuffer::popFramebuffer(); | ||
} else if (GLPlatform::instance()->glVersion() >= kVersionNumber(4, 5)) { | ||
glGetTextureImage(texture->texture(), 0, closestGLType(format), GL_UNSIGNED_BYTE, spa->chunk->size, spa->data); | ||
} else { | ||
-- | ||
2.41.0 | ||
|
||
|
||
From 79083bdf721dd56ace7412f89d7b80e7b9a2ba52 Mon Sep 17 00:00:00 2001 | ||
From: Alessandro Astone <[email protected]> | ||
Date: Wed, 15 Nov 2023 23:23:14 +0100 | ||
Subject: [PATCH 2/2] screencast: Make nvidia use the GLES path | ||
|
||
glGetTexImage returns a black image | ||
|
||
Fixes: BUG:476602 | ||
--- | ||
src/plugins/screencast/screencastutils.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/plugins/screencast/screencastutils.h b/src/plugins/screencast/screencastutils.h | ||
index 1a57362dea..31b8a1c95c 100644 | ||
--- a/src/plugins/screencast/screencastutils.h | ||
+++ b/src/plugins/screencast/screencastutils.h | ||
@@ -60,7 +60,7 @@ static void grabTexture(GLTexture *texture, spa_data *spa, spa_video_format form | ||
} | ||
|
||
texture->bind(); | ||
- if (GLPlatform::instance()->isGLES()) { | ||
+ if (GLPlatform::instance()->isGLES() || GLPlatform::instance()->driver() == Driver_NVidia) { | ||
GLFramebuffer fbo(texture); | ||
GLFramebuffer::pushFramebuffer(&fbo); | ||
glReadPixels(0, 0, size.width(), size.height(), closestGLType(format), GL_UNSIGNED_BYTE, spa->data); | ||
-- | ||
2.41.0 | ||
|
Oops, something went wrong.