From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/opengl.c | 5 +++++ dlls/winemac.drv/opengl.c | 5 ----- dlls/winewayland.drv/opengl.c | 5 ----- dlls/winex11.drv/opengl.c | 5 ----- 4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 8eedc5c2344..fb67832ff37 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -517,6 +517,11 @@ static void display_funcs_init(void) */ register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_WINE_pixel_format_passthrough" ); display_funcs->p_wglSetPixelFormatWINE = win32u_wglSetPixelFormatWINE; + + register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pixel_format" ); + display_funcs->p_wglChoosePixelFormatARB = (void *)1; /* never called */ + display_funcs->p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ + display_funcs->p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */ }
static struct opengl_funcs *get_dc_funcs( HDC hdc, void *null_funcs ) diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index d97e01578b7..34315219d3c 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -3334,11 +3334,6 @@ static const char *macdrv_init_wgl_extensions(void) opengl_funcs.p_wglGetCurrentReadDCARB = (void *)1; /* never called */ opengl_funcs.p_wglMakeContextCurrentARB = macdrv_wglMakeContextCurrentARB;
- register_extension("WGL_ARB_pixel_format"); - opengl_funcs.p_wglChoosePixelFormatARB = (void *)1; /* never called */ - opengl_funcs.p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ - opengl_funcs.p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */ - if (gluCheckExtension((GLubyte*)"GL_ARB_color_buffer_float", (GLubyte*)gl_info.glExtensions)) { register_extension("WGL_ARB_pixel_format_float"); diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index d9af9a7247d..849a2c3730b 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -1190,11 +1190,6 @@ static const char *wayland_init_wgl_extensions(void) opengl_funcs.p_wglGetSwapIntervalEXT = wayland_wglGetSwapIntervalEXT; opengl_funcs.p_wglSwapIntervalEXT = wayland_wglSwapIntervalEXT;
- register_extension("WGL_ARB_pixel_format"); - opengl_funcs.p_wglChoosePixelFormatARB = (void *)1; /* never called */ - opengl_funcs.p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ - opengl_funcs.p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */ - if (has_egl_ext_pixel_format_float) { register_extension("WGL_ARB_pixel_format_float"); diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index b0c45b13aad..7a2799f9bac 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2598,11 +2598,6 @@ static const char *x11drv_init_wgl_extensions(void) opengl_funcs.p_wglSetPbufferAttribARB = X11DRV_wglSetPbufferAttribARB; }
- register_extension( "WGL_ARB_pixel_format" ); - opengl_funcs.p_wglChoosePixelFormatARB = (void *)1; /* never called */ - opengl_funcs.p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ - opengl_funcs.p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */ - if (has_extension( glxExtensions, "GLX_ARB_fbconfig_float")) { register_extension("WGL_ARB_pixel_format_float");
From: Rémi Bernon rbernon@codeweavers.com
This is unlikely and not supposed to happen, only in allocation failure cases, and already warned about. --- dlls/winex11.drv/opengl.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 7a2799f9bac..532e3b20c3e 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1327,11 +1327,6 @@ void set_gl_drawable_parent( HWND hwnd, HWND parent ) mark_drawable_dirty( old, new ); release_gl_drawable( new ); } - else - { - destroy_gl_drawable( hwnd ); - win32u_set_window_pixel_format( hwnd, 0, FALSE ); - } release_gl_drawable( old ); }
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/opengl.c | 6 +++--- dlls/win32u/win32u_private.h | 2 ++ dlls/win32u/window.c | 4 ++-- include/wine/gdi_driver.h | 3 --- 4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index fb67832ff37..36db698edae 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -418,7 +418,7 @@ static int win32u_wglGetPixelFormat( HDC hdc ) DC *dc;
if ((hwnd = NtUserWindowFromDC( hdc ))) - ret = win32u_get_window_pixel_format( hwnd ); + ret = get_window_pixel_format( hwnd ); else if ((dc = get_dc_ptr( hdc ))) { BOOL is_display = dc->is_display; @@ -462,9 +462,9 @@ static BOOL set_dc_pixel_format( HDC hdc, int new_format, BOOL internal )
TRACE( "%p/%p format %d, internal %u\n", hdc, hwnd, new_format, internal );
- if ((old_format = win32u_get_window_pixel_format( hwnd )) && !internal) return old_format == new_format; + if ((old_format = get_window_pixel_format( hwnd )) && !internal) return old_format == new_format; if (!driver_funcs->p_set_pixel_format( hwnd, old_format, new_format, internal )) return FALSE; - return win32u_set_window_pixel_format( hwnd, new_format, internal ); + return set_window_pixel_format( hwnd, new_format, internal ); }
TRACE( "%p/%p format %d, internal %u\n", hdc, hwnd, new_format, internal ); diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index b4738ed6b16..6101935a8b8 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -250,6 +250,8 @@ extern BOOL is_window_enabled( HWND hwnd ); extern BOOL is_window_unicode( HWND hwnd ); extern BOOL is_window_visible( HWND hwnd ); extern BOOL is_zoomed( HWND hwnd ); +extern BOOL set_window_pixel_format( HWND hwnd, int format, BOOL internal ); +extern int get_window_pixel_format( HWND hwnd ); extern DWORD get_window_long( HWND hwnd, INT offset ); extern ULONG_PTR get_window_long_ptr( HWND hwnd, INT offset, BOOL ansi ); extern BOOL get_window_rect( HWND hwnd, RECT *rect, UINT dpi ); diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 3fb64755ba0..fdb6f8bbdda 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1457,7 +1457,7 @@ LONG_PTR WINAPI NtUserSetWindowLongPtr( HWND hwnd, INT offset, LONG_PTR newval, return set_window_long( hwnd, offset, sizeof(LONG_PTR), newval, ansi ); }
-BOOL win32u_set_window_pixel_format( HWND hwnd, int format, BOOL internal ) +BOOL set_window_pixel_format( HWND hwnd, int format, BOOL internal ) { WND *win = get_win_ptr( hwnd );
@@ -1476,7 +1476,7 @@ BOOL win32u_set_window_pixel_format( HWND hwnd, int format, BOOL internal ) return TRUE; }
-int win32u_get_window_pixel_format( HWND hwnd ) +int get_window_pixel_format( HWND hwnd ) { WND *win = get_win_ptr( hwnd ); int ret; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index f7733402b50..560e75ca591 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -402,7 +402,4 @@ struct user_driver_funcs
W32KAPI void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version );
-W32KAPI BOOL win32u_set_window_pixel_format( HWND hwnd, int format, BOOL internal ); -W32KAPI int win32u_get_window_pixel_format( HWND hwnd ); - #endif /* __WINE_WINE_GDI_DRIVER_H */