File: 0002_src-modules-Re-introduce-lost-workaround-for-font-re.patch

package info (click to toggle)
qtmir 0.8.0~git20250407.ea2f477-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,256 kB
  • sloc: cpp: 23,438; python: 304; xml: 271; ansic: 94; makefile: 47; sh: 12
file content (33 lines) | stat: -rw-r--r-- 1,305 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From b7333e0a00c2d7169c48e16b6e08c32803823fb4 Mon Sep 17 00:00:00 2001
From: Alfred <dev.beidl@gmail.com>
Date: Thu, 11 Jul 2024 18:54:41 +0200
Subject: [PATCH 02/14] src/modules: Re-introduce lost workaround for font
 render issue

Lost in commit b27b44772de3be476a05831c0f14a63f56d79378, pulled from
revision 15fcc65039b19a598eda76e18260ea9824a13048 and placed in a
similar place around buffer bindings happen.

Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
 src/modules/QtMir/Application/mirbuffersgtexture.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/modules/QtMir/Application/mirbuffersgtexture.cpp b/src/modules/QtMir/Application/mirbuffersgtexture.cpp
index 47d9f03a..6397b528 100644
--- a/src/modules/QtMir/Application/mirbuffersgtexture.cpp
+++ b/src/modules/QtMir/Application/mirbuffersgtexture.cpp
@@ -135,6 +135,10 @@ public:
         f->glBindTexture(GL_TEXTURE_2D, m_textureId);
 
         m_texSourceBuf->bind();
+
+        // Fix for lp:1583088 - For non-GL clients, Mir uploads the client pixel buffer to a GL texture.
+        // But as it does so, it changes some GL state and neglects to restore it, which breaks Qt's rendering.
+        f->glPixelStorei(GL_UNPACK_ALIGNMENT, 4); // 4 is the default which Qt uses
     }
 
 private:
-- 
2.47.2