Alexandre Julliard : opengl32: Get rid of the DIB section sync support.
Alexandre Julliard
julliard at winehq.org
Tue Jan 10 13:11:19 CST 2012
Module: wine
Branch: master
Commit: b88b6b74f0a45c4ee1bb89dfdcc8e951e6a1d8e9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b88b6b74f0a45c4ee1bb89dfdcc8e951e6a1d8e9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jan 9 14:34:41 2012 +0100
opengl32: Get rid of the DIB section sync support.
---
dlls/opengl32/opengl_ext.h | 3 +--
dlls/opengl32/wgl.c | 36 ------------------------------------
dlls/winex11.drv/init.c | 8 +-------
dlls/winex11.drv/opengl.c | 7 +------
4 files changed, 3 insertions(+), 51 deletions(-)
diff --git a/dlls/opengl32/opengl_ext.h b/dlls/opengl32/opengl_ext.h
index 988317f..c768560 100644
--- a/dlls/opengl32/opengl_ext.h
+++ b/dlls/opengl32/opengl_ext.h
@@ -42,8 +42,7 @@ extern void (*wine_tsx11_lock_ptr)(void);
extern void (*wine_tsx11_unlock_ptr)(void);
/* As GLX relies on X, this is needed */
-void enter_gl(void);
-#define ENTER_GL() enter_gl()
+#define ENTER_GL() wine_tsx11_lock_ptr()
#define LEAVE_GL() wine_tsx11_unlock_ptr()
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index cdd6686..98b04d4 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -81,22 +81,6 @@ MAKE_FUNCPTR(gluTessVertex)
#undef MAKE_FUNCPTR
#endif /* SONAME_LIBGLU */
-/* x11drv GDI escapes */
-#define X11DRV_ESCAPE 6789
-enum x11drv_escape_codes
-{
- X11DRV_GET_DISPLAY, /* get X11 display for a DC */
- X11DRV_GET_DRAWABLE, /* get current drawable for a DC */
- X11DRV_GET_FONT, /* get current X font for a DC */
- X11DRV_SET_DRAWABLE, /* set current drawable for a DC */
- X11DRV_START_EXPOSURES, /* start graphics exposures */
- X11DRV_END_EXPOSURES, /* end graphics exposures */
- X11DRV_GET_DCE, /* get the DCE pointer */
- X11DRV_SET_DCE, /* set the DCE pointer */
- X11DRV_GET_GLX_DRAWABLE, /* get current glx drawable for a DC */
- X11DRV_SYNC_PIXMAP /* sync the dibsection to its pixmap */
-};
-
void (*wine_tsx11_lock_ptr)(void) = NULL;
void (*wine_tsx11_unlock_ptr)(void) = NULL;
@@ -106,26 +90,6 @@ static void* libglu_handle = NULL;
static char* internal_gl_disabled_extensions = NULL;
static char* internal_gl_extensions = NULL;
-typedef struct wine_glcontext {
- HDC hdc;
- BOOL do_escape;
- /* ... more stuff here */
-} Wine_GLContext;
-
-void enter_gl(void)
-{
- Wine_GLContext *curctx = NtCurrentTeb()->glContext;
-
- if (curctx && curctx->do_escape)
- {
- enum x11drv_escape_codes escape = X11DRV_SYNC_PIXMAP;
- ExtEscape(curctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPCSTR)&escape, 0, NULL);
- }
-
- wine_tsx11_lock_ptr();
- return;
-}
-
const GLubyte * WINAPI wine_glGetString( GLenum name );
/***********************************************************************
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 15ab4c2..15f110b 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -429,6 +429,7 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
break;
case X11DRV_GET_DCE:
case X11DRV_SET_DCE:
+ case X11DRV_SYNC_PIXMAP:
FIXME( "%x escape no longer supported\n", *(const enum x11drv_escape_codes *)in_data );
break;
case X11DRV_GET_GLX_DRAWABLE:
@@ -438,13 +439,6 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
return TRUE;
}
break;
- case X11DRV_SYNC_PIXMAP:
- if(physDev->bitmap)
- {
- X11DRV_CoerceDIBSection(physDev, DIB_Status_GdiMod);
- return TRUE;
- }
- return FALSE;
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 0d4d822..e8d0f89 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -111,7 +111,6 @@ typedef struct wine_glpixelformat {
typedef struct wine_glcontext {
HDC hdc;
- BOOL do_escape;
BOOL has_been_current;
BOOL sharing;
DWORD tid;
@@ -1950,11 +1949,7 @@ BOOL X11DRV_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc)
ctx->drawables[1] = drawable;
ctx->refresh_drawables = FALSE;
- if (type == OBJ_MEMDC)
- {
- ctx->do_escape = TRUE;
- pglDrawBuffer(GL_FRONT_LEFT);
- }
+ if (type == OBJ_MEMDC) pglDrawBuffer(GL_FRONT_LEFT);
}
else
SetLastError(ERROR_INVALID_HANDLE);
More information about the wine-cvs
mailing list