/[packages]/updates/5/libreoffice/current/SOURCES/0001-tdf-88831-fix-inverted-textures-when-OpenGL-is-enabl.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-tdf-88831-fix-inverted-textures-when-OpenGL-is-enabl.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 896529 - (show annotations) (download)
Thu Oct 29 21:56:40 2015 UTC (8 years, 5 months ago) by tv
File size: 1611 byte(s)
new release
1 From b1ee2df8d21df5d4d54427c4dc0bcb58613736a3 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= <tomaz.vajngerl@collabora.co.uk>
3 Date: Fri, 3 Jul 2015 14:38:24 +0900
4 Subject: [PATCH] tdf#88831 fix inverted textures when OpenGL is enabled
5
6 GLX returns a wrong value if the y coords are inverted. Most other
7 programs don't even ask for this (gnome-shell for example) and just
8 assumes "true" (and this works because most relevant X servers work
9 like this). We make this more robust and assume true only if the
10 returned value is GLX_DONT_CARE (-1).
11
12 (cherry picked from commit f7f0486376adbabf3ea66bfd8a7b692c335ec3c8)
13
14 Change-Id: I4800b3364fd00f5f4a8f5a459472bfa8d97827ba
15 ---
16 vcl/source/opengl/OpenGLHelper.cxx | 6 +++++-
17 1 file changed, 5 insertions(+), 1 deletion(-)
18
19 diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
20 index c71380e..6387192 100644
21 --- a/vcl/source/opengl/OpenGLHelper.cxx
22 +++ b/vcl/source/opengl/OpenGLHelper.cxx
23 @@ -507,7 +507,11 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted
24 }
25
26 glXGetFBConfigAttrib( pDisplay, aFbConfigs[i], GLX_Y_INVERTED_EXT, &nValue );
27 - bInverted = (nValue == True) ? true : false;
28 +
29 + // Looks like that X sends GLX_DONT_CARE but this usually means "true" for most
30 + // of the X implementations. Investigation on internet pointed that this could be
31 + // safely "true" all the time (for example gnome-shell always assumes "true").
32 + bInverted = nValue == True || nValue == int(GLX_DONT_CARE);
33
34 break;
35 }
36 --
37 2.4.0
38

  ViewVC Help
Powered by ViewVC 1.1.30