From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/opengl.c | 6 +++--- dlls/wineandroid.drv/opengl.c | 10 +++++----- dlls/winemac.drv/opengl.c | 4 ++-- dlls/winewayland.drv/opengl.c | 2 +- dlls/winex11.drv/opengl.c | 7 ++----- include/wine/opengl_driver.h | 2 +- 6 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 0cf20475bc7..1a5067c62e1 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -606,7 +606,7 @@ static const char *egldrv_init_wgl_extensions( struct opengl_funcs *funcs ) return ""; }
-static BOOL egldrv_surface_create( HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable ) +static BOOL egldrv_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) { struct client_surface *client;
@@ -1000,7 +1000,7 @@ static const char *nulldrv_init_wgl_extensions( struct opengl_funcs *funcs ) return ""; }
-static BOOL nulldrv_surface_create( HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable ) +static BOOL nulldrv_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) { return TRUE; } @@ -1258,7 +1258,7 @@ static BOOL set_dc_pixel_format( HDC hdc, int new_format, BOOL internal ) if ((old_format = get_window_pixel_format( hwnd, FALSE )) && !internal) return old_format == new_format;
drawable = get_dc_opengl_drawable( hdc ); - if ((ret = driver_funcs->p_surface_create( hwnd, hdc, new_format, &drawable ))) + if ((ret = driver_funcs->p_surface_create( hwnd, new_format, &drawable ))) { /* update the current window drawable to the last used draw surface */ if ((hwnd = NtUserWindowFromDC( hdc ))) set_window_opengl_drawable( hwnd, drawable ); diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index 54e22cc19af..4893e288289 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -71,7 +71,7 @@ static inline EGLConfig egl_config_for_format(int format) return egl->configs[format - egl->config_count - 1]; }
-static struct gl_drawable *create_gl_drawable( HWND hwnd, HDC hdc, int format, ANativeWindow *window ) +static struct gl_drawable *create_gl_drawable( HWND hwnd, int format, ANativeWindow *window ) { static const int attribs[] = { EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE }; struct client_surface *client; @@ -103,7 +103,7 @@ void update_gl_drawable( HWND hwnd ) struct gl_drawable *old, *new;
if (!(old = impl_from_opengl_drawable( get_window_opengl_drawable( hwnd ) ))) return; - if ((new = create_gl_drawable( hwnd, 0, old->base.format, old->window ))) + if ((new = create_gl_drawable( hwnd, old->base.format, old->window ))) { set_window_opengl_drawable( hwnd, &new->base ); opengl_drawable_release( &new->base ); @@ -113,11 +113,11 @@ void update_gl_drawable( HWND hwnd ) NtUserRedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE ); }
-static BOOL android_surface_create( HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable ) +static BOOL android_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) { struct gl_drawable *gl;
- TRACE( "hwnd %p, hdc %p, format %d, drawable %p\n", hwnd, hdc, format, drawable ); + TRACE( "hwnd %p, format %d, drawable %p\n", hwnd, format, drawable );
if (*drawable) { @@ -134,7 +134,7 @@ static BOOL android_surface_create( HWND hwnd, HDC hdc, int format, struct openg return TRUE; }
- if (!(gl = create_gl_drawable( hwnd, hdc, format, NULL ))) return FALSE; + if (!(gl = create_gl_drawable( hwnd, format, NULL ))) return FALSE; *drawable = &gl->base; return TRUE; } diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index d9bc7067dfa..7f145b73711 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -1458,13 +1458,13 @@ static BOOL create_context(struct macdrv_context *context, CGLContextObj share, return TRUE; }
-static BOOL macdrv_surface_create(HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable) +static BOOL macdrv_surface_create(HWND hwnd, int format, struct opengl_drawable **drawable) { struct macdrv_client_surface *client; struct macdrv_win_data *data; struct gl_drawable *gl;
- TRACE("hwnd %p, hdc %p, format %d, drawable %p\n", hwnd, hdc, format, drawable); + TRACE("hwnd %p, format %d, drawable %p\n", hwnd, format, drawable);
if (!(data = get_win_data(hwnd))) { diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index 41cb8463fb1..158ad106fe3 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -83,7 +83,7 @@ static void wayland_gl_drawable_sync_size(struct wayland_gl_drawable *gl) wl_egl_window_resize(gl->wl_egl_window, client_width, client_height, 0, 0); }
-static BOOL wayland_opengl_surface_create(HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable) +static BOOL wayland_opengl_surface_create(HWND hwnd, int format, struct opengl_drawable **drawable) { EGLConfig config = egl_config_for_format(format); struct wayland_client_surface *client; diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 188b04ea449..8dcc1b1b24a 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -202,7 +202,6 @@ struct gl_drawable Colormap colormap; /* colormap for the client window */ Pixmap pixmap; /* base pixmap if drawable is a GLXPixmap */ BOOL offscreen; - HDC hdc; HDC hdc_src; HDC hdc_dst; }; @@ -484,7 +483,7 @@ static inline EGLConfig egl_config_for_format(int format) return egl->configs[format - egl->config_count - 1]; }
-static BOOL x11drv_egl_surface_create( HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable ) +static BOOL x11drv_egl_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) { struct opengl_drawable *previous; struct client_surface *client; @@ -500,7 +499,6 @@ static BOOL x11drv_egl_surface_create( HWND hwnd, HDC hdc, int format, struct op client_surface_release( client ); if (!gl) return FALSE; gl->rect = rect; - gl->hdc = hdc;
if (!(gl->base.surface = funcs->p_eglCreateWindowSurface( egl->display, egl_config_for_format( format ), (void *)window, NULL ))) @@ -926,7 +924,7 @@ static GLXContext create_glxcontext( int format, GLXContext share, const int *at return ctx; }
-static BOOL x11drv_surface_create( HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable ) +static BOOL x11drv_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) { struct glx_pixel_format *fmt = glx_pixel_format_from_format( format ); struct opengl_drawable *previous; @@ -949,7 +947,6 @@ static BOOL x11drv_surface_create( HWND hwnd, HDC hdc, int format, struct opengl client_surface_release( client ); if (!gl) goto failed; gl->rect = rect; - gl->hdc = hdc; gl->colormap = colormap;
if (!(gl->drawable = pglXCreateWindow( gdi_display, fmt->fbconfig, window, NULL ))) diff --git a/include/wine/opengl_driver.h b/include/wine/opengl_driver.h index 56f9c1c6793..984861f106d 100644 --- a/include/wine/opengl_driver.h +++ b/include/wine/opengl_driver.h @@ -194,7 +194,7 @@ struct opengl_driver_funcs UINT (*p_init_pixel_formats)(UINT*); BOOL (*p_describe_pixel_format)(int,struct wgl_pixel_format*); const char *(*p_init_wgl_extensions)(struct opengl_funcs *funcs); - BOOL (*p_surface_create)( HWND hwnd, HDC hdc, int format, struct opengl_drawable **drawable ); + BOOL (*p_surface_create)( HWND hwnd, int format, struct opengl_drawable **drawable ); BOOL (*p_context_create)( int format, void *share, const int *attribs, void **context ); BOOL (*p_context_destroy)(void*); BOOL (*p_make_current)( struct opengl_drawable *draw, struct opengl_drawable *read, void *private );