Module: wine Branch: master Commit: 54170fe8671b12df44a4dea8ffac7eed73300bdd URL: http://source.winehq.org/git/wine.git/?a=commit;h=54170fe8671b12df44a4dea8ff...
Author: Alexandre Julliard julliard@winehq.org Date: Thu May 3 12:22:49 2012 +0200
winex11: Remove support for the no longer used GET_GLX_DRAWABLE escape.
---
dlls/winex11.drv/init.c | 8 +------ dlls/winex11.drv/opengl.c | 49 ++++++++++++++++++++------------------------ dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 23 insertions(+), 35 deletions(-)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index ea0befa..b1b52c0 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -440,16 +440,10 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d case X11DRV_GET_FONT: case X11DRV_GET_DCE: case X11DRV_SET_DCE: + case X11DRV_GET_GLX_DRAWABLE: case X11DRV_SYNC_PIXMAP: FIXME( "%x escape no longer supported\n", *(const enum x11drv_escape_codes *)in_data ); break; - case X11DRV_GET_GLX_DRAWABLE: - if (out_count >= sizeof(Drawable)) - { - *(Drawable *)out_data = get_glxdrawable(physDev); - return TRUE; - } - break; case X11DRV_FLUSH_GL_DRAWABLE: flush_gl_drawable(physDev); return TRUE; diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 566ee65..708825e 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -641,6 +641,24 @@ static inline BOOL is_valid_context( Wine_GLContext *ctx ) return (ptr != NULL); }
+static Drawable get_glxdrawable(X11DRV_PDEVICE *physDev) +{ + Drawable ret; + + if(physDev->bitmap) + { + if (physDev->bitmap->hbitmap == BITMAP_stock_phys_bitmap.hbitmap) + ret = physDev->drawable; /* PBuffer */ + else + ret = physDev->bitmap->glxpixmap; + } + else if(physDev->gl_drawable) + ret = physDev->gl_drawable; + else + ret = physDev->drawable; + return ret; +} + static int describeContext(Wine_GLContext* ctx) { int tmp; int ctx_vis_id; @@ -663,7 +681,7 @@ static BOOL describeDrawable(X11DRV_PDEVICE *physDev) {
TRACE(" HDC %p has:\n", physDev->dev.hdc); TRACE(" - iPixelFormat %d\n", fmt->iPixelFormat); - TRACE(" - Drawable %p\n", (void*) get_glxdrawable(physDev)); + TRACE(" - Drawable %lx\n", get_glxdrawable(physDev)); TRACE(" - FBCONFIG_ID 0x%x\n", fmt->fmt_id);
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_VISUAL_ID, &tmp); @@ -1931,7 +1949,7 @@ BOOL X11DRV_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) describeContext(ctx); }
- TRACE(" make current for dis %p, drawable %p, ctx %p\n", gdi_display, (void*) drawable, ctx->ctx); + TRACE(" make current for drawable %lx, ctx %p\n", drawable, ctx->ctx); ret = pglXMakeCurrent(gdi_display, drawable, ctx->ctx);
if (ret) @@ -2620,7 +2638,7 @@ static HPBUFFERARB WINAPI X11DRV_wglCreatePbufferARB(HDC hdc, int iPixelFormat, wine_tsx11_lock(); object->drawable = pglXCreatePbuffer(gdi_display, fmt->fbconfig, attribs); wine_tsx11_unlock(); - TRACE("new Pbuffer drawable as %p\n", (void*) object->drawable); + TRACE("new Pbuffer drawable as %lx\n", object->drawable); if (!object->drawable) { SetLastError(ERROR_NO_SYSTEM_RESOURCES); goto create_failed; /* unexpected error */ @@ -3298,7 +3316,7 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf FIXME("partial stub!\n"); }
- TRACE("drawable=%p, context=%p\n", (void*)object->drawable, prev_context); + TRACE("drawable=%lx, context=%p\n", object->drawable, prev_context); tmp_context = pglXCreateNewContext(gdi_display, object->fmt->fbconfig, object->fmt->render_type, prev_context, True);
pglGetIntegerv(object->texture_bind_target, &prev_binded_texture); @@ -3772,24 +3790,6 @@ static void X11DRV_WineGL_LoadExtensions(void) }
-Drawable get_glxdrawable(X11DRV_PDEVICE *physDev) -{ - Drawable ret; - - if(physDev->bitmap) - { - if (physDev->bitmap->hbitmap == BITMAP_stock_phys_bitmap.hbitmap) - ret = physDev->drawable; /* PBuffer */ - else - ret = physDev->bitmap->glxpixmap; - } - else if(physDev->gl_drawable) - ret = physDev->gl_drawable; - else - ret = physDev->drawable; - return ret; -} - BOOL destroy_glxpixmap(Display *display, XID glxpixmap) { wine_tsx11_lock(); @@ -4087,11 +4087,6 @@ BOOL X11DRV_wglSetPixelFormatWINE(PHYSDEV dev, int iPixelFormat, const PIXELFORM return FALSE; }
-Drawable get_glxdrawable(X11DRV_PDEVICE *physDev) -{ - return 0; -} - BOOL destroy_glxpixmap(Display *display, XID glxpixmap) { return FALSE; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 2548155..e9985bb 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -270,7 +270,6 @@ extern int client_side_antialias_with_render DECLSPEC_HIDDEN; extern const struct gdi_dc_funcs *X11DRV_XRender_Init(void) DECLSPEC_HIDDEN; extern void X11DRV_XRender_Finalize(void) DECLSPEC_HIDDEN;
-extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev) DECLSPEC_HIDDEN; extern BOOL destroy_glxpixmap(Display *display, XID glxpixmap) DECLSPEC_HIDDEN;
/* IME support */