Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
:
beagle
>
xorg-x11-server-10-compat
> 0003-Enable-notfp-feature-for-Xephyr.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0003-Enable-notfp-feature-for-Xephyr.patch of Package xorg-x11-server-10-compat
Subject: [PATCH 3/3] Enable notfp feature for Xephyr Signed-off-by: Haitao Feng <haitao.feng@intel.com> --- hw/kdrive/ephyr/ephyr.c | 1 + hw/kdrive/ephyr/ephyrhostglx.c | 27 +++++++++++++++++++++++++++ hw/kdrive/ephyr/ephyrinit.c | 8 ++++++++ 3 files changed, 36 insertions(+), 0 deletions(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 47bd82d..c1faeca 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -56,6 +56,7 @@ EphyrKeySyms ephyrKeySyms; Bool ephyrNoDRI=FALSE ; Bool ephyrNoDRI2=FALSE ; Bool ephyrNoOSR=FALSE ; +Bool ephyrNoTFP=FALSE ; Bool ephyrNoXV=FALSE ; static int mouseState = 0; diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c index 728687b..2475c8a 100644 --- a/hw/kdrive/ephyr/ephyrhostglx.c +++ b/hw/kdrive/ephyr/ephyrhostglx.c @@ -153,6 +153,10 @@ typedef struct GLXGenericGetString { #define sz_xGLXGenericGetStringReq 12 #define X_GLXGenericGetString 0 +#ifdef DRI2 +extern Bool ephyrNoTFP; +#endif + Bool ephyrHostGLXGetStringFromServer (int a_screen_number, int a_string_name, @@ -166,6 +170,13 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, xGLXSingleReply reply; int length=0, numbytes=0, major_opcode=0, get_string_op=0; +#ifdef DRI2 + const char *glx_texture_from_pixmap = "GLX_EXT_texture_from_pixmap "; + char *start = NULL; + char *end = NULL; + int pos = 0, len = 0; +#endif + EPHYR_RETURN_VAL_IF_FAIL (dpy && a_string, FALSE) ; EPHYR_LOG ("enter\n") ; @@ -232,6 +243,22 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n", a_string_name, *a_string, numbytes) ; +#ifdef DRI2 + if (ephyrNoTFP) { + start = strstr(*a_string, glx_texture_from_pixmap); + if (start){ + EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n", + a_string_name, *a_string, numbytes) ; + len = strlen(glx_texture_from_pixmap); + pos = start - *a_string; + end = start + strlen(glx_texture_from_pixmap); + memmove(start, end, numbytes + 1 - pos - len); + EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n", + a_string_name, *a_string, numbytes) ; + } + } +#endif + is_ok = TRUE ; out: EPHYR_LOG ("leave\n") ; diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 07e6c65..5492e40 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -38,6 +38,7 @@ extern Bool kdHasKbd; extern Bool ephyrNoDRI; extern Bool ephyrNoDRI2; extern Bool ephyrNoOSR; +extern Bool ephyrNoTFP; extern Bool noGlxVisualInit; #endif extern Bool ephyrNoXV; @@ -124,6 +125,7 @@ ddxUseMsg (void) ErrorF("-nodri do not use DRI\n"); ErrorF("-nodri2 do not use DRI2\n"); ErrorF("-noosr do not use off-screen rendering\n"); + ErrorF("-notfp do not use texture from pixmap extension\n"); #endif ErrorF("-noxv do not use XV\n"); ErrorF("-name [name] define the name in the WM_CLASS property\n"); @@ -265,6 +267,12 @@ ddxProcessArgument (int argc, char **argv, int i) EPHYR_LOG ("no off-screen rendering enabled\n") ; return 1 ; } + else if (!strcmp (argv[i], "-notfp")) + { + ephyrNoTFP = TRUE ; + EPHYR_LOG ("no texture from pixmap enabled\n") ; + return 1 ; + } #endif else if (!strcmp (argv[i], "-noxv")) { -- 1.6.1.3