Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
05c32b9b
Commit
05c32b9b
authored
Sep 07, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move the SwapBuffers entry point to the OpenGL driver.
parent
9713a54b
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
43 additions
and
63 deletions
+43
-63
dc.c
dlls/gdi32/dibdrv/dc.c
+0
-2
opengl.c
dlls/gdi32/dibdrv/opengl.c
+9
-0
driver.c
dlls/gdi32/driver.c
+0
-6
init.c
dlls/gdi32/enhmfdrv/init.c
+0
-1
freetype.c
dlls/gdi32/freetype.c
+0
-1
init.c
dlls/gdi32/mfdrv/init.c
+0
-1
painting.c
dlls/gdi32/painting.c
+2
-13
path.c
dlls/gdi32/path.c
+0
-1
make_opengl
dlls/opengl32/make_opengl
+1
-0
opengl_norm.c
dlls/opengl32/opengl_norm.c
+2
-0
wgl.c
dlls/opengl32/wgl.c
+13
-14
init.c
dlls/wineps.drv/init.c
+0
-1
init.c
dlls/winex11.drv/init.c
+0
-1
opengl.c
dlls/winex11.drv/opengl.c
+13
-18
xrender.c
dlls/winex11.drv/xrender.c
+0
-1
gdi_driver.h
include/wine/gdi_driver.h
+1
-2
wgl_driver.h
include/wine/wgl_driver.h
+2
-1
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
05c32b9b
...
...
@@ -531,7 +531,6 @@ const struct gdi_dc_funcs dib_driver =
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
dibdrv_wine_get_wgl_driver
,
/* wine_get_wgl_driver */
...
...
@@ -1139,7 +1138,6 @@ static const struct gdi_dc_funcs window_driver =
windrv_StretchDIBits
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
windrv_wine_get_wgl_driver
,
/* wine_get_wgl_driver */
...
...
dlls/gdi32/dibdrv/opengl.c
View file @
05c32b9b
...
...
@@ -304,6 +304,14 @@ static BOOL dibdrv_wglShareLists( struct wgl_context *org, struct wgl_context *d
return
FALSE
;
}
/***********************************************************************
* dibdrv_wglSwapBuffers
*/
static
BOOL
dibdrv_wglSwapBuffers
(
HDC
hdc
)
{
return
TRUE
;
}
static
struct
opengl_funcs
opengl_funcs
=
{
{
...
...
@@ -316,6 +324,7 @@ static struct opengl_funcs opengl_funcs =
dibdrv_wglMakeCurrent
,
/* p_wglMakeCurrent */
dibdrv_wglSetPixelFormat
,
/* p_wglSetPixelFormat */
dibdrv_wglShareLists
,
/* p_wglShareLists */
dibdrv_wglSwapBuffers
,
/* p_wglSwapBuffers */
}
};
...
...
dlls/gdi32/driver.c
View file @
05c32b9b
...
...
@@ -640,11 +640,6 @@ static INT nulldrv_StartPage( PHYSDEV dev )
return
1
;
}
static
BOOL
nulldrv_SwapBuffers
(
PHYSDEV
dev
)
{
return
TRUE
;
}
static
BOOL
nulldrv_UnrealizePalette
(
HPALETTE
palette
)
{
return
FALSE
;
...
...
@@ -781,7 +776,6 @@ const struct gdi_dc_funcs null_driver =
nulldrv_StretchDIBits
,
/* pStretchDIBits */
nulldrv_StrokeAndFillPath
,
/* pStrokeAndFillPath */
nulldrv_StrokePath
,
/* pStrokePath */
nulldrv_SwapBuffers
,
/* pSwapBuffers */
nulldrv_UnrealizePalette
,
/* pUnrealizePalette */
nulldrv_WidenPath
,
/* pWidenPath */
nulldrv_wine_get_wgl_driver
,
/* wine_get_wgl_driver */
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
05c32b9b
...
...
@@ -160,7 +160,6 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
EMFDRV_StretchDIBits
,
/* pStretchDIBits */
EMFDRV_StrokeAndFillPath
,
/* pStrokeAndFillPath */
EMFDRV_StrokePath
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
EMFDRV_WidenPath
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
dlls/gdi32/freetype.c
View file @
05c32b9b
...
...
@@ -7851,7 +7851,6 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
dlls/gdi32/mfdrv/init.c
View file @
05c32b9b
...
...
@@ -223,7 +223,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
MFDRV_StretchDIBits
,
/* pStretchDIBits */
MFDRV_StrokeAndFillPath
,
/* pStrokeAndFillPath */
MFDRV_StrokePath
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
MFDRV_WidenPath
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
dlls/gdi32/painting.c
View file @
05c32b9b
...
...
@@ -525,19 +525,8 @@ INT WINAPI GdiDescribePixelFormat( HDC hdc, INT format, UINT size, PIXELFORMATDE
*/
BOOL
WINAPI
GdiSwapBuffers
(
HDC
hdc
)
{
INT
bRet
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
TRACE
(
"(%p)
\n
"
,
hdc
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSwapBuffers
);
update_dc
(
dc
);
bRet
=
physdev
->
funcs
->
pSwapBuffers
(
physdev
);
release_dc_ptr
(
dc
);
}
return
bRet
;
FIXME
(
"(%p): stub
\n
"
,
hdc
);
return
FALSE
;
}
...
...
dlls/gdi32/path.c
View file @
05c32b9b
...
...
@@ -2344,7 +2344,6 @@ const struct gdi_dc_funcs path_driver =
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
dlls/opengl32/make_opengl
View file @
05c32b9b
...
...
@@ -637,6 +637,7 @@ my %wgl_functions =
[
"const PIXELFORMATDESCRIPTOR *"
,
"descr"
]
]
],
"wglShareLists"
=>
[
"BOOL"
,
[
[
"struct wgl_context *"
,
"org"
],
[
"struct wgl_context *"
,
"dst"
]
]
],
"wglSwapBuffers"
=>
[
"BOOL"
,
[
[
"HDC"
,
"hdc"
]
]
],
);
my
%
supported_wgl_extensions
=
...
...
dlls/opengl32/opengl_norm.c
View file @
05c32b9b
...
...
@@ -3034,6 +3034,7 @@ static PROC null_wglGetProcAddress( LPCSTR name ) { return 0; }
static
BOOL
null_wglMakeCurrent
(
HDC
hdc
,
struct
wgl_context
*
context
)
{
return
0
;
}
static
BOOL
null_wglSetPixelFormat
(
HDC
hdc
,
INT
format
,
const
PIXELFORMATDESCRIPTOR
*
descr
)
{
return
0
;
}
static
BOOL
null_wglShareLists
(
struct
wgl_context
*
org
,
struct
wgl_context
*
dst
)
{
return
0
;
}
static
BOOL
null_wglSwapBuffers
(
HDC
hdc
)
{
return
0
;
}
static
void
null_glAccum
(
GLenum
op
,
GLfloat
value
)
{
}
static
void
null_glAlphaFunc
(
GLenum
func
,
GLfloat
ref
)
{
}
static
GLboolean
null_glAreTexturesResident
(
GLsizei
n
,
const
GLuint
*
textures
,
GLboolean
*
residences
)
{
return
0
;
}
...
...
@@ -5524,6 +5525,7 @@ struct opengl_funcs null_opengl_funcs =
null_wglMakeCurrent
,
null_wglSetPixelFormat
,
null_wglShareLists
,
null_wglSwapBuffers
,
},
{
null_glAccum
,
...
...
dlls/opengl32/wgl.c
View file @
05c32b9b
...
...
@@ -41,7 +41,6 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wgl
);
WINE_DECLARE_DEBUG_CHANNEL
(
opengl
);
static
HMODULE
opengl32_handle
;
...
...
@@ -49,9 +48,6 @@ extern struct opengl_funcs null_opengl_funcs;
const
GLubyte
*
WINAPI
wine_glGetString
(
GLenum
name
);
/* internal GDI functions */
extern
BOOL
WINAPI
GdiSwapBuffers
(
HDC
hdc
);
/* handle management */
#define MAX_WGL_HANDLES 1024
...
...
@@ -600,6 +596,17 @@ BOOL WINAPI wglSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR
}
/***********************************************************************
* wglSwapBuffers (OPENGL32.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
wglSwapBuffers
(
HDC
hdc
)
{
const
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
if
(
!
funcs
||
!
funcs
->
wgl
.
p_wglSwapBuffers
)
return
FALSE
;
return
funcs
->
wgl
.
p_wglSwapBuffers
(
hdc
);
}
/***********************************************************************
* wglCreateLayerContext (OPENGL32.@)
*/
HGLRC
WINAPI
wglCreateLayerContext
(
HDC
hdc
,
...
...
@@ -814,10 +821,10 @@ int WINAPI wglSetLayerPaletteEntries(HDC hdc,
*/
BOOL
WINAPI
wglSwapLayerBuffers
(
HDC
hdc
,
UINT
fuPlanes
)
{
TRACE
_
(
opengl
)
(
"(%p, %08x)
\n
"
,
hdc
,
fuPlanes
);
TRACE
(
"(%p, %08x)
\n
"
,
hdc
,
fuPlanes
);
if
(
fuPlanes
&
WGL_SWAP_MAIN_PLANE
)
{
if
(
!
GdiSwapBuffers
(
hdc
))
return
FALSE
;
if
(
!
wglSwapBuffers
(
hdc
))
return
FALSE
;
fuPlanes
&=
~
WGL_SWAP_MAIN_PLANE
;
}
...
...
@@ -1560,14 +1567,6 @@ const GLubyte * WINAPI wine_glGetString( GLenum name )
}
/***********************************************************************
* wglSwapBuffers (OPENGL32.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
wglSwapBuffers
(
HDC
hdc
)
{
return
GdiSwapBuffers
(
hdc
);
}
/***********************************************************************
* OpenGL initialisation routine
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
...
...
dlls/wineps.drv/init.c
View file @
05c32b9b
...
...
@@ -834,7 +834,6 @@ static const struct gdi_dc_funcs psdrv_funcs =
NULL
,
/* pStretchDIBits */
PSDRV_StrokeAndFillPath
,
/* pStrokeAndFillPath */
PSDRV_StrokePath
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
dlls/winex11.drv/init.c
View file @
05c32b9b
...
...
@@ -538,7 +538,6 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
X11DRV_UnrealizePalette
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
dlls/winex11.drv/opengl.c
View file @
05c32b9b
...
...
@@ -3026,33 +3026,25 @@ static void X11DRV_WineGL_LoadExtensions(void)
*
* Swap the buffers of this DC
*/
static
BOOL
glxdrv_
SwapBuffers
(
PHYSDEV
dev
)
static
BOOL
glxdrv_
wglSwapBuffers
(
HDC
hdc
)
{
enum
x11drv_escape_codes
code
=
X11DRV_FLUSH_GL_DRAWABLE
;
struct
gl_drawable
*
gl
;
HWND
hwnd
;
struct
wgl_context
*
ctx
=
NtCurrentTeb
()
->
glContext
;
TRACE
(
"(%p)
\n
"
,
dev
->
hdc
);
if
(
!
ctx
)
{
WARN
(
"Using a NULL context, skipping
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
struct
wgl_context
*
ctx
=
NtCurrentTeb
()
->
glContext
;
HWND
hwnd
=
WindowFromDC
(
hdc
);
BOOL
ret
=
FALSE
;
sync_context
(
ctx
);
TRACE
(
"(%p)
\n
"
,
hdc
);
hwnd
=
WindowFromDC
(
dev
->
hdc
);
EnterCriticalSection
(
&
context_section
);
if
(
!
XFindContext
(
gdi_display
,
(
XID
)
hwnd
,
gl_hwnd_context
,
(
char
**
)
&
gl
)
||
!
XFindContext
(
gdi_display
,
(
XID
)
dev
->
hdc
,
gl_pbuffer_context
,
(
char
**
)
&
gl
))
!
XFindContext
(
gdi_display
,
(
XID
)
hdc
,
gl_pbuffer_context
,
(
char
**
)
&
gl
))
{
switch
(
gl
->
type
)
{
case
DC_GL_PIXMAP_WIN
:
if
(
ctx
)
sync_context
(
ctx
);
if
(
pglXCopySubBufferMESA
)
{
/* (glX)SwapBuffers has an implicit glFlush effect, however
* GLX_MESA_copy_sub_buffer doesn't. Make sure GL is flushed before
...
...
@@ -3067,10 +3059,13 @@ static BOOL glxdrv_SwapBuffers(PHYSDEV dev)
pglXSwapBuffers
(
gdi_display
,
gl
->
drawable
);
break
;
}
ret
=
TRUE
;
}
else
SetLastError
(
ERROR_INVALID_HANDLE
);
LeaveCriticalSection
(
&
context_section
);
ExtEscape
(
dev
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
0
,
NULL
);
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
0
,
NULL
);
/* FPS support */
if
(
TRACE_ON
(
fps
))
...
...
@@ -3091,7 +3086,7 @@ static BOOL glxdrv_SwapBuffers(PHYSDEV dev)
}
}
return
TRUE
;
return
ret
;
}
static
BOOL
create_glx_dc
(
PHYSDEV
*
pdev
)
...
...
@@ -3341,7 +3336,6 @@ static const struct gdi_dc_funcs glxdrv_funcs =
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
glxdrv_SwapBuffers
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
glxdrv_wine_get_wgl_driver
,
/* wine_get_wgl_driver */
...
...
@@ -3360,6 +3354,7 @@ static struct opengl_funcs opengl_funcs =
glxdrv_wglMakeCurrent
,
/* p_wglMakeCurrent */
glxdrv_wglSetPixelFormat
,
/* p_wglSetPixelFormat */
glxdrv_wglShareLists
,
/* p_wglShareLists */
glxdrv_wglSwapBuffers
,
/* p_wglSwapBuffers */
}
};
...
...
dlls/winex11.drv/xrender.c
View file @
05c32b9b
...
...
@@ -2486,7 +2486,6 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
...
...
include/wine/gdi_driver.h
View file @
05c32b9b
...
...
@@ -188,7 +188,6 @@ struct gdi_dc_funcs
INT
(
*
pStretchDIBits
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
const
void
*
,
BITMAPINFO
*
,
UINT
,
DWORD
);
BOOL
(
*
pStrokeAndFillPath
)(
PHYSDEV
);
BOOL
(
*
pStrokePath
)(
PHYSDEV
);
BOOL
(
*
pSwapBuffers
)(
PHYSDEV
);
BOOL
(
*
pUnrealizePalette
)(
HPALETTE
);
BOOL
(
*
pWidenPath
)(
PHYSDEV
);
struct
opengl_funcs
*
(
*
wine_get_wgl_driver
)(
PHYSDEV
,
UINT
);
...
...
@@ -198,7 +197,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 4
3
#define WINE_GDI_DRIVER_VERSION 4
4
#define GDI_PRIORITY_NULL_DRV 0
/* null driver */
#define GDI_PRIORITY_FONT_DRV 100
/* any font driver */
...
...
include/wine/wgl_driver.h
View file @
05c32b9b
...
...
@@ -7,7 +7,7 @@
#define WINE_GLAPI
#endif
#define WINE_WGL_DRIVER_VERSION
7
#define WINE_WGL_DRIVER_VERSION
8
struct
wgl_context
;
struct
wgl_pbuffer
;
...
...
@@ -25,6 +25,7 @@ struct opengl_funcs
BOOL
(
WINE_GLAPI
*
p_wglMakeCurrent
)(
HDC
,
struct
wgl_context
*
);
BOOL
(
WINE_GLAPI
*
p_wglSetPixelFormat
)(
HDC
,
INT
,
const
PIXELFORMATDESCRIPTOR
*
);
BOOL
(
WINE_GLAPI
*
p_wglShareLists
)(
struct
wgl_context
*
,
struct
wgl_context
*
);
BOOL
(
WINE_GLAPI
*
p_wglSwapBuffers
)(
HDC
);
}
wgl
;
struct
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment