Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
28721d69
Commit
28721d69
authored
12 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
winex11: Get rid of the OpenGL GDI driver.
parent
05fe1e4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/winex11.drv/init.c
+16
-5
16 additions, 5 deletions
dlls/winex11.drv/init.c
dlls/winex11.drv/opengl.c
+9
-207
9 additions, 207 deletions
dlls/winex11.drv/opengl.c
dlls/winex11.drv/x11drv.h
+1
-1
1 addition, 1 deletion
dlls/winex11.drv/x11drv.h
with
26 additions
and
213 deletions
dlls/winex11.drv/init.c
+
16
−
5
View file @
28721d69
...
...
@@ -123,7 +123,6 @@ static X11DRV_PDEVICE *create_x11_physdev( Drawable drawable )
static
BOOL
X11DRV_CreateDC
(
PHYSDEV
*
pdev
,
LPCWSTR
driver
,
LPCWSTR
device
,
LPCWSTR
output
,
const
DEVMODEW
*
initData
)
{
const
struct
gdi_dc_funcs
*
glx_funcs
=
get_glx_driver
();
X11DRV_PDEVICE
*
physDev
=
create_x11_physdev
(
root_window
);
if
(
!
physDev
)
return
FALSE
;
...
...
@@ -134,7 +133,6 @@ static BOOL X11DRV_CreateDC( PHYSDEV *pdev, LPCWSTR driver, LPCWSTR device,
virtual_screen_rect
.
bottom
-
virtual_screen_rect
.
top
);
push_dc_driver
(
pdev
,
&
physDev
->
dev
,
&
x11drv_funcs
);
if
(
xrender_funcs
&&
!
xrender_funcs
->
pCreateDC
(
pdev
,
driver
,
device
,
output
,
initData
))
return
FALSE
;
if
(
glx_funcs
&&
!
glx_funcs
->
pCreateDC
(
pdev
,
driver
,
device
,
output
,
initData
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -144,7 +142,6 @@ static BOOL X11DRV_CreateDC( PHYSDEV *pdev, LPCWSTR driver, LPCWSTR device,
*/
static
BOOL
X11DRV_CreateCompatibleDC
(
PHYSDEV
orig
,
PHYSDEV
*
pdev
)
{
const
struct
gdi_dc_funcs
*
glx_funcs
=
get_glx_driver
();
X11DRV_PDEVICE
*
physDev
=
create_x11_physdev
(
stock_bitmap_pixmap
);
if
(
!
physDev
)
return
FALSE
;
...
...
@@ -154,7 +151,6 @@ static BOOL X11DRV_CreateCompatibleDC( PHYSDEV orig, PHYSDEV *pdev )
push_dc_driver
(
pdev
,
&
physDev
->
dev
,
&
x11drv_funcs
);
if
(
orig
)
return
TRUE
;
/* we already went through Xrender if we have an orig device */
if
(
xrender_funcs
&&
!
xrender_funcs
->
pCreateCompatibleDC
(
NULL
,
pdev
))
return
FALSE
;
if
(
glx_funcs
&&
!
glx_funcs
->
pCreateCompatibleDC
(
NULL
,
pdev
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -432,6 +428,21 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
return
0
;
}
/**********************************************************************
* X11DRV_wine_get_wgl_driver
*/
static
struct
opengl_funcs
*
X11DRV_wine_get_wgl_driver
(
PHYSDEV
dev
,
UINT
version
)
{
struct
opengl_funcs
*
ret
;
if
(
!
(
ret
=
get_glx_driver
(
version
)))
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
wine_get_wgl_driver
);
ret
=
dev
->
funcs
->
wine_get_wgl_driver
(
dev
,
version
);
}
return
ret
;
}
static
const
struct
gdi_dc_funcs
x11drv_funcs
=
{
...
...
@@ -561,7 +572,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL
,
/* pStrokePath */
X11DRV_UnrealizePalette
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* wine_get_wgl_driver */
X11DRV_wine_get_wgl_driver
,
/* wine_get_wgl_driver */
GDI_PRIORITY_GRAPHICS_DRV
/* priority */
};
...
...
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/opengl.c
+
9
−
207
View file @
28721d69
...
...
@@ -181,16 +181,6 @@ enum dc_gl_type
DC_GL_PBUFFER
/* pseudo memory DC using a PBuffer */
};
struct
glx_physdev
{
struct
gdi_physdev
dev
;
X11DRV_PDEVICE
*
x11dev
;
enum
dc_gl_type
type
;
/* type of GL device context */
const
struct
wgl_pixel_format
*
format
;
Drawable
drawable
;
Pixmap
pixmap
;
/* pixmap for a DL_GL_PIXMAP_WIN drawable */
};
struct
gl_drawable
{
enum
dc_gl_type
type
;
/* type of GL surface */
...
...
@@ -3078,200 +3068,6 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc )
return
TRUE
;
}
static
BOOL
create_glx_dc
(
PHYSDEV
*
pdev
)
{
/* assume that only the main x11 device implements GetDeviceCaps */
X11DRV_PDEVICE
*
x11dev
=
get_x11drv_dev
(
GET_NEXT_PHYSDEV
(
*
pdev
,
pGetDeviceCaps
));
struct
glx_physdev
*
physdev
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
physdev
)
);
if
(
!
physdev
)
return
FALSE
;
physdev
->
x11dev
=
x11dev
;
push_dc_driver
(
pdev
,
&
physdev
->
dev
,
&
glxdrv_funcs
);
return
TRUE
;
}
/**********************************************************************
* glxdrv_CreateDC
*/
static
BOOL
glxdrv_CreateDC
(
PHYSDEV
*
pdev
,
LPCWSTR
driver
,
LPCWSTR
device
,
LPCWSTR
output
,
const
DEVMODEW
*
initData
)
{
return
create_glx_dc
(
pdev
);
}
/**********************************************************************
* glxdrv_CreateCompatibleDC
*/
static
BOOL
glxdrv_CreateCompatibleDC
(
PHYSDEV
orig
,
PHYSDEV
*
pdev
)
{
if
(
orig
)
/* chain to next driver first */
{
orig
=
GET_NEXT_PHYSDEV
(
orig
,
pCreateCompatibleDC
);
if
(
!
orig
->
funcs
->
pCreateCompatibleDC
(
orig
,
pdev
))
return
FALSE
;
}
/* otherwise we have been called by x11drv */
return
create_glx_dc
(
pdev
);
}
/**********************************************************************
* glxdrv_DeleteDC
*/
static
BOOL
glxdrv_DeleteDC
(
PHYSDEV
dev
)
{
struct
glx_physdev
*
physdev
=
get_glxdrv_dev
(
dev
);
HeapFree
(
GetProcessHeap
(),
0
,
physdev
);
return
TRUE
;
}
/**********************************************************************
* glxdrv_wine_get_wgl_driver
*/
static
struct
opengl_funcs
*
glxdrv_wine_get_wgl_driver
(
PHYSDEV
dev
,
UINT
version
)
{
if
(
version
!=
WINE_WGL_DRIVER_VERSION
)
{
ERR
(
"version mismatch, opengl32 wants %u but driver has %u
\n
"
,
version
,
WINE_WGL_DRIVER_VERSION
);
return
NULL
;
}
if
(
has_opengl
())
return
&
opengl_funcs
;
dev
=
GET_NEXT_PHYSDEV
(
dev
,
wine_get_wgl_driver
);
return
dev
->
funcs
->
wine_get_wgl_driver
(
dev
,
version
);
}
static
const
struct
gdi_dc_funcs
glxdrv_funcs
=
{
NULL
,
/* pAbortDoc */
NULL
,
/* pAbortPath */
NULL
,
/* pAlphaBlend */
NULL
,
/* pAngleArc */
NULL
,
/* pArc */
NULL
,
/* pArcTo */
NULL
,
/* pBeginPath */
NULL
,
/* pBlendImage */
NULL
,
/* pChord */
NULL
,
/* pCloseFigure */
glxdrv_CreateCompatibleDC
,
/* pCreateCompatibleDC */
glxdrv_CreateDC
,
/* pCreateDC */
glxdrv_DeleteDC
,
/* pDeleteDC */
NULL
,
/* pDeleteObject */
NULL
,
/* pDeviceCapabilities */
NULL
,
/* pEllipse */
NULL
,
/* pEndDoc */
NULL
,
/* pEndPage */
NULL
,
/* pEndPath */
NULL
,
/* pEnumFonts */
NULL
,
/* pEnumICMProfiles */
NULL
,
/* pExcludeClipRect */
NULL
,
/* pExtDeviceMode */
NULL
,
/* pExtEscape */
NULL
,
/* pExtFloodFill */
NULL
,
/* pExtSelectClipRgn */
NULL
,
/* pExtTextOut */
NULL
,
/* pFillPath */
NULL
,
/* pFillRgn */
NULL
,
/* pFlattenPath */
NULL
,
/* pFontIsLinked */
NULL
,
/* pFrameRgn */
NULL
,
/* pGdiComment */
NULL
,
/* pGdiRealizationInfo */
NULL
,
/* pGetBoundsRect */
NULL
,
/* pGetCharABCWidths */
NULL
,
/* pGetCharABCWidthsI */
NULL
,
/* pGetCharWidth */
NULL
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetFontData */
NULL
,
/* pGetFontUnicodeRanges */
NULL
,
/* pGetGlyphIndices */
NULL
,
/* pGetGlyphOutline */
NULL
,
/* pGetICMProfile */
NULL
,
/* pGetImage */
NULL
,
/* pGetKerningPairs */
NULL
,
/* pGetNearestColor */
NULL
,
/* pGetOutlineTextMetrics */
NULL
,
/* pGetPixel */
NULL
,
/* pGetSystemPaletteEntries */
NULL
,
/* pGetTextCharsetInfo */
NULL
,
/* pGetTextExtentExPoint */
NULL
,
/* pGetTextExtentExPointI */
NULL
,
/* pGetTextFace */
NULL
,
/* pGetTextMetrics */
NULL
,
/* pGradientFill */
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
NULL
,
/* pLineTo */
NULL
,
/* pModifyWorldTransform */
NULL
,
/* pMoveTo */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg */
NULL
,
/* pOffsetWindowOrg */
NULL
,
/* pPaintRgn */
NULL
,
/* pPatBlt */
NULL
,
/* pPie */
NULL
,
/* pPolyBezier */
NULL
,
/* pPolyBezierTo */
NULL
,
/* pPolyDraw */
NULL
,
/* pPolyPolygon */
NULL
,
/* pPolyPolyline */
NULL
,
/* pPolygon */
NULL
,
/* pPolyline */
NULL
,
/* pPolylineTo */
NULL
,
/* pPutImage */
NULL
,
/* pRealizeDefaultPalette */
NULL
,
/* pRealizePalette */
NULL
,
/* pRectangle */
NULL
,
/* pResetDC */
NULL
,
/* pRestoreDC */
NULL
,
/* pRoundRect */
NULL
,
/* pSaveDC */
NULL
,
/* pScaleViewportExt */
NULL
,
/* pScaleWindowExt */
NULL
,
/* pSelectBitmap */
NULL
,
/* pSelectBrush */
NULL
,
/* pSelectClipPath */
NULL
,
/* pSelectFont */
NULL
,
/* pSelectPalette */
NULL
,
/* pSelectPen */
NULL
,
/* pSetArcDirection */
NULL
,
/* pSetBkColor */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetBoundsRect */
NULL
,
/* pSetDCBrushColor */
NULL
,
/* pSetDCPenColor */
NULL
,
/* pSetDIBitsToDevice */
NULL
,
/* pSetDeviceClipping */
NULL
,
/* pSetDeviceGammaRamp */
NULL
,
/* pSetLayout */
NULL
,
/* pSetMapMode */
NULL
,
/* pSetMapperFlags */
NULL
,
/* pSetPixel */
NULL
,
/* pSetPolyFillMode */
NULL
,
/* pSetROP2 */
NULL
,
/* pSetRelAbs */
NULL
,
/* pSetStretchBltMode */
NULL
,
/* pSetTextAlign */
NULL
,
/* pSetTextCharacterExtra */
NULL
,
/* pSetTextColor */
NULL
,
/* pSetTextJustification */
NULL
,
/* pSetViewportExt */
NULL
,
/* pSetViewportOrg */
NULL
,
/* pSetWindowExt */
NULL
,
/* pSetWindowOrg */
NULL
,
/* pSetWorldTransform */
NULL
,
/* pStartDoc */
NULL
,
/* pStartPage */
NULL
,
/* pStretchBlt */
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
glxdrv_wine_get_wgl_driver
,
/* wine_get_wgl_driver */
GDI_PRIORITY_GRAPHICS_DRV
+
20
/* priority */
};
static
struct
opengl_funcs
opengl_funcs
=
{
{
...
...
@@ -3288,14 +3084,20 @@ static struct opengl_funcs opengl_funcs =
}
};
const
struct
gdi_dc
_funcs
*
get_glx_driver
(
void
)
struct
opengl
_funcs
*
get_glx_driver
(
UINT
version
)
{
return
&
glxdrv_funcs
;
if
(
version
!=
WINE_WGL_DRIVER_VERSION
)
{
ERR
(
"version mismatch, opengl32 wants %u but driver has %u
\n
"
,
version
,
WINE_WGL_DRIVER_VERSION
);
return
NULL
;
}
if
(
has_opengl
())
return
&
opengl_funcs
;
return
NULL
;
}
#else
/* no OpenGL includes */
const
struct
gdi_dc
_funcs
*
get_glx_driver
(
void
)
struct
opengl
_funcs
*
get_glx_driver
(
UINT
version
)
{
return
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/x11drv.h
+
1
−
1
View file @
28721d69
...
...
@@ -214,7 +214,7 @@ extern int client_side_antialias_with_core DECLSPEC_HIDDEN;
extern
int
client_side_antialias_with_render
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
*
X11DRV_XRender_Init
(
void
)
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc
_funcs
*
get_glx_driver
(
void
)
DECLSPEC_HIDDEN
;
extern
struct
opengl
_funcs
*
get_glx_driver
(
UINT
)
DECLSPEC_HIDDEN
;
/* IME support */
extern
void
IME_SetOpenStatus
(
BOOL
fOpen
)
DECLSPEC_HIDDEN
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment