This part of work will enable Xephyr to run mutter. The logic is that I disabled the GLX_texture_from_pixmap extension in Xephyr so that mutter will have to copy the pixmap into texture and draw the texture with glTexImage2D.
To support GLX_texture_from_pixmap, we have to support the general GLX pixmap applications. Currently I have not implemented that. >From b8455ad213b33634f7b68732e45813e771eaeb3a Mon Sep 17 00:00:00 2001 From: Haitao Feng <[email protected]> Date: Tue, 11 May 2010 14:32:32 +0800 Subject: Make mutter work Signed-off-by: Haitao Feng <[email protected]> --- hw/kdrive/ephyr/ephyrhostglx.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c index 728687b..6733782 100644 --- a/hw/kdrive/ephyr/ephyrhostglx.c +++ b/hw/kdrive/ephyr/ephyrhostglx.c @@ -165,6 +165,10 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, xGLXGenericGetStringReq *req=NULL; xGLXSingleReply reply; int length=0, numbytes=0, major_opcode=0, get_string_op=0; + const char *glx_texture_from_pixmap = "GLX_EXT_texture_from_pixmap "; + char *start = NULL; + char *end = NULL; + int pos = 0, len = 0; EPHYR_RETURN_VAL_IF_FAIL (dpy && a_string, FALSE) ; @@ -229,8 +233,18 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, _XEatData (dpy, length) ; UnlockDisplay (dpy); SyncHandle (); - EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n", - a_string_name, *a_string, numbytes) ; + + 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) ; + } is_ok = TRUE ; out: -- 1.6.3.3 _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
