Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ee215548
Commit
ee215548
authored
Jun 25, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Remove OpenGL functions that don't use an HDC from the driver entry points.
parent
66a5995e
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2 additions
and
235 deletions
+2
-235
dc.c
dlls/gdi32/dibdrv/dc.c
+0
-5
driver.c
dlls/gdi32/driver.c
+0
-30
init.c
dlls/gdi32/enhmfdrv/init.c
+0
-5
freetype.c
dlls/gdi32/freetype.c
+0
-5
gdi32.spec
dlls/gdi32/gdi32.spec
+0
-7
init.c
dlls/gdi32/mfdrv/init.c
+0
-5
opengl.c
dlls/gdi32/opengl.c
+1
-147
path.c
dlls/gdi32/path.c
+0
-5
init.c
dlls/wineps.drv/init.c
+0
-5
init.c
dlls/winex11.drv/init.c
+0
-5
opengl.c
dlls/winex11.drv/opengl.c
+0
-5
xrender.c
dlls/winex11.drv/xrender.c
+0
-5
gdi_driver.h
include/wine/gdi_driver.h
+1
-6
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
ee215548
...
...
@@ -526,16 +526,11 @@ const struct gdi_dc_funcs dib_driver =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_DIB_DRV
/* priority */
};
dlls/gdi32/driver.c
View file @
ee215548
...
...
@@ -670,11 +670,6 @@ static BOOL nulldrv_UnrealizePalette( HPALETTE palette )
return
FALSE
;
}
static
BOOL
nulldrv_wglCopyContext
(
HGLRC
ctx_src
,
HGLRC
ctx_dst
,
UINT
mask
)
{
return
FALSE
;
}
static
HGLRC
nulldrv_wglCreateContext
(
PHYSDEV
dev
)
{
return
0
;
...
...
@@ -685,11 +680,6 @@ static HGLRC nulldrv_wglCreateContextAttribsARB( PHYSDEV dev, HGLRC share_ctx, c
return
0
;
}
static
BOOL
nulldrv_wglDeleteContext
(
HGLRC
ctx
)
{
return
FALSE
;
}
static
PROC
nulldrv_wglGetProcAddress
(
LPCSTR
name
)
{
return
NULL
;
...
...
@@ -710,21 +700,6 @@ static BOOL nulldrv_wglSetPixelFormatWINE( PHYSDEV dev, INT format, const PIXELF
return
FALSE
;
}
static
BOOL
nulldrv_wglShareLists
(
HGLRC
ctx1
,
HGLRC
ctx2
)
{
return
FALSE
;
}
static
BOOL
nulldrv_wglUseFontBitmapsA
(
PHYSDEV
dev
,
DWORD
start
,
DWORD
count
,
DWORD
base
)
{
return
FALSE
;
}
static
BOOL
nulldrv_wglUseFontBitmapsW
(
PHYSDEV
dev
,
DWORD
start
,
DWORD
count
,
DWORD
base
)
{
return
FALSE
;
}
const
struct
gdi_dc_funcs
null_driver
=
{
nulldrv_AbortDoc
,
/* pAbortDoc */
...
...
@@ -858,17 +833,12 @@ const struct gdi_dc_funcs null_driver =
nulldrv_SwapBuffers
,
/* pSwapBuffers */
nulldrv_UnrealizePalette
,
/* pUnrealizePalette */
nulldrv_WidenPath
,
/* pWidenPath */
nulldrv_wglCopyContext
,
/* pwglCopyContext */
nulldrv_wglCreateContext
,
/* pwglCreateContext */
nulldrv_wglCreateContextAttribsARB
,
/* pwglCreateContextAttribsARB */
nulldrv_wglDeleteContext
,
/* pwglDeleteContext */
nulldrv_wglGetProcAddress
,
/* pwglGetProcAddress */
nulldrv_wglMakeContextCurrentARB
,
/* pwglMakeContextCurrentARB */
nulldrv_wglMakeCurrent
,
/* pwglMakeCurrent */
nulldrv_wglSetPixelFormatWINE
,
/* pwglSetPixelFormatWINE */
nulldrv_wglShareLists
,
/* pwglShareLists */
nulldrv_wglUseFontBitmapsA
,
/* pwglUseFontBitmapsA */
nulldrv_wglUseFontBitmapsW
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_NULL_DRV
/* priority */
};
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
ee215548
...
...
@@ -167,17 +167,12 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
EMFDRV_WidenPath
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_GRAPHICS_DRV
/* priority */
};
...
...
dlls/gdi32/freetype.c
View file @
ee215548
...
...
@@ -7871,17 +7871,12 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_FONT_DRV
/* priority */
};
...
...
dlls/gdi32/gdi32.spec
View file @
ee215548
...
...
@@ -499,16 +499,9 @@
################################################################
# Wine extensions: OpenGL support
#
@ stdcall wglCopyContext(long long long)
@ stdcall wglCreateContext(long)
@ stdcall wglDeleteContext(long)
@ stdcall wglGetCurrentContext()
@ stdcall wglGetCurrentDC()
@ stdcall -private wglGetProcAddress(str)
@ stdcall wglMakeCurrent(long long)
@ stdcall wglShareLists(long long)
@ stdcall wglUseFontBitmapsA(long long long long)
@ stdcall wglUseFontBitmapsW(long long long long)
################################################################
# Wine extensions: Win16 functions that are needed by other dlls
...
...
dlls/gdi32/mfdrv/init.c
View file @
ee215548
...
...
@@ -230,17 +230,12 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
MFDRV_WidenPath
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_GRAPHICS_DRV
/* priority */
};
...
...
dlls/gdi32/opengl.c
View file @
ee215548
...
...
@@ -40,11 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl);
static
HDC
default_hdc
=
0
;
typedef
struct
opengl_context
{
HDC
hdc
;
}
*
OPENGL_Context
;
/* We route all wgl functions from opengl32.dll through gdi32.dll to
* the display driver. Various wgl calls have a hDC as one of their parameters.
* Using get_dc_ptr we get access to the functions exported by the driver.
...
...
@@ -60,31 +55,6 @@ static DC* OPENGL_GetDefaultDC(void)
}
/***********************************************************************
* wglCopyContext (OPENGL32.@)
*/
BOOL
WINAPI
wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
DC
*
dc
;
BOOL
ret
=
FALSE
;
OPENGL_Context
ctx
=
(
OPENGL_Context
)
hglrcSrc
;
TRACE
(
"hglrcSrc: (%p), hglrcDst: (%p), mask: %#x
\n
"
,
hglrcSrc
,
hglrcDst
,
mask
);
/* If no context is set, this call doesn't have a purpose */
if
(
!
hglrcSrc
||
!
hglrcDst
)
return
FALSE
;
/* Retrieve the HDC associated with the context to access the display driver */
dc
=
get_dc_ptr
(
ctx
->
hdc
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pwglCopyContext
);
ret
=
physdev
->
funcs
->
pwglCopyContext
(
hglrcSrc
,
hglrcDst
,
mask
);
release_dc_ptr
(
dc
);
}
return
ret
;
}
/***********************************************************************
* wglCreateContext (OPENGL32.@)
*/
HGLRC
WINAPI
wglCreateContext
(
HDC
hdc
)
...
...
@@ -125,60 +95,6 @@ static HGLRC WINAPI wglCreateContextAttribsARB(HDC hdc, HGLRC hShareContext, con
}
/***********************************************************************
* wglDeleteContext (OPENGL32.@)
*/
BOOL
WINAPI
wglDeleteContext
(
HGLRC
hglrc
)
{
DC
*
dc
;
BOOL
ret
=
FALSE
;
OPENGL_Context
ctx
=
(
OPENGL_Context
)
hglrc
;
TRACE
(
"hglrc: (%p)
\n
"
,
hglrc
);
if
(
ctx
==
NULL
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
/* Retrieve the HDC associated with the context to access the display driver */
dc
=
get_dc_ptr
(
ctx
->
hdc
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pwglDeleteContext
);
ret
=
physdev
->
funcs
->
pwglDeleteContext
(
hglrc
);
release_dc_ptr
(
dc
);
}
else
SetLastError
(
ERROR_INVALID_HANDLE
);
return
ret
;
}
/***********************************************************************
* wglGetCurrentContext (OPENGL32.@)
*/
HGLRC
WINAPI
wglGetCurrentContext
(
void
)
{
HGLRC
ret
=
NtCurrentTeb
()
->
glContext
;
TRACE
(
" returning %p
\n
"
,
ret
);
return
ret
;
}
/***********************************************************************
* wglGetCurrentDC (OPENGL32.@)
*/
HDC
WINAPI
wglGetCurrentDC
(
void
)
{
OPENGL_Context
ctx
=
(
OPENGL_Context
)
wglGetCurrentContext
();
TRACE
(
" found context: %p
\n
"
,
ctx
);
if
(
ctx
==
NULL
)
return
NULL
;
/* Retrieve the current DC from the active context */
TRACE
(
" returning hdc: %p
\n
"
,
ctx
->
hdc
);
return
ctx
->
hdc
;
}
/***********************************************************************
* wglMakeCurrent (OPENGL32.@)
*/
BOOL
WINAPI
wglMakeCurrent
(
HDC
hdc
,
HGLRC
hglrc
)
...
...
@@ -190,7 +106,7 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
* In that case use the global hDC to get access to the driver. */
if
(
hglrc
==
NULL
)
{
if
(
hdc
==
NULL
&&
!
wglGetCurrentContext
()
)
if
(
hdc
==
NULL
&&
!
NtCurrentTeb
()
->
glContext
)
{
WARN
(
"Current context is NULL
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
...
...
@@ -268,68 +184,6 @@ static BOOL WINAPI wglSetPixelFormatWINE(HDC hdc, int iPixelFormat, const PIXELF
}
/***********************************************************************
* wglShareLists (OPENGL32.@)
*/
BOOL
WINAPI
wglShareLists
(
HGLRC
hglrc1
,
HGLRC
hglrc2
)
{
DC
*
dc
;
BOOL
ret
=
FALSE
;
OPENGL_Context
ctx
=
(
OPENGL_Context
)
hglrc1
;
TRACE
(
"hglrc1: (%p); hglrc: (%p)
\n
"
,
hglrc1
,
hglrc2
);
if
(
ctx
==
NULL
||
hglrc2
==
NULL
)
return
FALSE
;
/* Retrieve the HDC associated with the context to access the display driver */
dc
=
get_dc_ptr
(
ctx
->
hdc
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pwglShareLists
);
ret
=
physdev
->
funcs
->
pwglShareLists
(
hglrc1
,
hglrc2
);
release_dc_ptr
(
dc
);
}
return
ret
;
}
/***********************************************************************
* wglUseFontBitmapsA (OPENGL32.@)
*/
BOOL
WINAPI
wglUseFontBitmapsA
(
HDC
hdc
,
DWORD
first
,
DWORD
count
,
DWORD
listBase
)
{
BOOL
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
TRACE
(
"(%p, %d, %d, %d)
\n
"
,
hdc
,
first
,
count
,
listBase
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pwglUseFontBitmapsA
);
ret
=
physdev
->
funcs
->
pwglUseFontBitmapsA
(
physdev
,
first
,
count
,
listBase
);
release_dc_ptr
(
dc
);
}
return
ret
;
}
/***********************************************************************
* wglUseFontBitmapsW (OPENGL32.@)
*/
BOOL
WINAPI
wglUseFontBitmapsW
(
HDC
hdc
,
DWORD
first
,
DWORD
count
,
DWORD
listBase
)
{
BOOL
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
TRACE
(
"(%p, %d, %d, %d)
\n
"
,
hdc
,
first
,
count
,
listBase
);
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pwglUseFontBitmapsW
);
ret
=
physdev
->
funcs
->
pwglUseFontBitmapsW
(
physdev
,
first
,
count
,
listBase
);
release_dc_ptr
(
dc
);
}
return
ret
;
}
/***********************************************************************
* Internal wglGetProcAddress for retrieving WGL extensions
*/
PROC
WINAPI
wglGetProcAddress
(
LPCSTR
func
)
...
...
dlls/gdi32/path.c
View file @
ee215548
...
...
@@ -2364,16 +2364,11 @@ const struct gdi_dc_funcs path_driver =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_PATH_DRV
/* priority */
};
dlls/wineps.drv/init.c
View file @
ee215548
...
...
@@ -841,17 +841,12 @@ static const struct gdi_dc_funcs psdrv_funcs =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_GRAPHICS_DRV
/* priority */
};
...
...
dlls/winex11.drv/init.c
View file @
ee215548
...
...
@@ -635,17 +635,12 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL
,
/* pSwapBuffers */
X11DRV_UnrealizePalette
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
X11DRV_wglCreateContext
,
/* pwglCreateContext */
X11DRV_wglCreateContextAttribsARB
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
X11DRV_wglGetProcAddress
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
X11DRV_wglSetPixelFormatWINE
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_GRAPHICS_DRV
/* priority */
};
...
...
dlls/winex11.drv/opengl.c
View file @
ee215548
...
...
@@ -3777,17 +3777,12 @@ static const struct gdi_dc_funcs glxdrv_funcs =
glxdrv_SwapBuffers
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
glxdrv_wglCreateContext
,
/* pwglCreateContext */
glxdrv_wglCreateContextAttribsARB
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
glxdrv_wglGetProcAddress
,
/* pwglGetProcAddress */
glxdrv_wglMakeContextCurrentARB
,
/* pwglMakeContextCurrentARB */
glxdrv_wglMakeCurrent
,
/* pwglMakeCurrent */
glxdrv_wglSetPixelFormatWINE
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_GRAPHICS_DRV
+
20
/* priority */
};
...
...
dlls/winex11.drv/xrender.c
View file @
ee215548
...
...
@@ -2597,17 +2597,12 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pwglCopyContext */
NULL
,
/* pwglCreateContext */
NULL
,
/* pwglCreateContextAttribsARB */
NULL
,
/* pwglDeleteContext */
NULL
,
/* pwglGetProcAddress */
NULL
,
/* pwglMakeContextCurrentARB */
NULL
,
/* pwglMakeCurrent */
NULL
,
/* pwglSetPixelFormatWINE */
NULL
,
/* pwglShareLists */
NULL
,
/* pwglUseFontBitmapsA */
NULL
,
/* pwglUseFontBitmapsW */
GDI_PRIORITY_GRAPHICS_DRV
+
10
/* priority */
};
...
...
include/wine/gdi_driver.h
View file @
ee215548
...
...
@@ -192,24 +192,19 @@ struct gdi_dc_funcs
BOOL
(
*
pSwapBuffers
)(
PHYSDEV
);
BOOL
(
*
pUnrealizePalette
)(
HPALETTE
);
BOOL
(
*
pWidenPath
)(
PHYSDEV
);
BOOL
(
*
pwglCopyContext
)(
HGLRC
,
HGLRC
,
UINT
);
HGLRC
(
*
pwglCreateContext
)(
PHYSDEV
);
HGLRC
(
*
pwglCreateContextAttribsARB
)(
PHYSDEV
,
HGLRC
,
const
int
*
);
BOOL
(
*
pwglDeleteContext
)(
HGLRC
);
PROC
(
*
pwglGetProcAddress
)(
LPCSTR
);
BOOL
(
*
pwglMakeContextCurrentARB
)(
PHYSDEV
,
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglMakeCurrent
)(
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglSetPixelFormatWINE
)(
PHYSDEV
,
INT
,
const
PIXELFORMATDESCRIPTOR
*
);
BOOL
(
*
pwglShareLists
)(
HGLRC
,
HGLRC
);
BOOL
(
*
pwglUseFontBitmapsA
)(
PHYSDEV
,
DWORD
,
DWORD
,
DWORD
);
BOOL
(
*
pwglUseFontBitmapsW
)(
PHYSDEV
,
DWORD
,
DWORD
,
DWORD
);
/* priority order for the driver on the stack */
UINT
priority
;
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 3
1
#define WINE_GDI_DRIVER_VERSION 3
2
#define GDI_PRIORITY_NULL_DRV 0
/* null driver */
#define GDI_PRIORITY_FONT_DRV 100
/* any font driver */
...
...
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