gdi32: Pass OpenGL calls through to the display driver from the DIB engine.

This commit is contained in:
Alexandre Julliard 2012-05-09 17:07:15 +02:00
parent b082b3acba
commit 1392bfce3c
2 changed files with 19 additions and 173 deletions

View File

@ -414,33 +414,6 @@ static UINT dibdrv_SetBoundsRect( PHYSDEV dev, RECT *rect, UINT flags )
return DCB_RESET; /* we don't have device-specific bounds */ return DCB_RESET; /* we don't have device-specific bounds */
} }
/***********************************************************************
* dibdrv_ChoosePixelFormat
*/
static INT dibdrv_ChoosePixelFormat( PHYSDEV dev, const PIXELFORMATDESCRIPTOR *pfd )
{
FIXME( "Not supported on DIB section\n" );
return 0;
}
/***********************************************************************
* dibdrv_DescribePixelFormat
*/
static INT dibdrv_DescribePixelFormat( PHYSDEV dev, INT fmt, UINT size, PIXELFORMATDESCRIPTOR *pfd )
{
FIXME( "Not supported on DIB section\n" );
return 0;
}
/***********************************************************************
* dibdrv_ExtEscape
*/
static INT dibdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_size, const void *in_data,
INT out_size, void *out_data )
{
return 0;
}
/*********************************************************************** /***********************************************************************
* dibdrv_GetDeviceGammaRamp * dibdrv_GetDeviceGammaRamp
*/ */
@ -450,15 +423,6 @@ static BOOL dibdrv_GetDeviceGammaRamp( PHYSDEV dev, void *ramp )
return FALSE; return FALSE;
} }
/***********************************************************************
* dibdrv_GetPixelFormat
*/
static INT dibdrv_GetPixelFormat( PHYSDEV dev )
{
FIXME( "Not supported on DIB section\n" );
return 0;
}
/*********************************************************************** /***********************************************************************
* dibdrv_SetDeviceGammaRamp * dibdrv_SetDeviceGammaRamp
*/ */
@ -468,123 +432,6 @@ static BOOL dibdrv_SetDeviceGammaRamp( PHYSDEV dev, void *ramp )
return FALSE; return FALSE;
} }
/***********************************************************************
* dibdrv_SetPixelFormat
*/
static BOOL dibdrv_SetPixelFormat( PHYSDEV dev, INT fmt, const PIXELFORMATDESCRIPTOR *pfd )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_SwapBuffers
*/
static BOOL dibdrv_SwapBuffers( PHYSDEV dev )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglCopyContext
*/
static BOOL dibdrv_wglCopyContext( HGLRC src, HGLRC dst, UINT mask )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglCreateContext
*/
static HGLRC dibdrv_wglCreateContext( PHYSDEV dev )
{
FIXME( "Not supported on DIB section\n" );
return 0;
}
/***********************************************************************
* dibdrv_wglCreateContextAttribsARB
*/
static HGLRC dibdrv_wglCreateContextAttribsARB( PHYSDEV dev, HGLRC ctx, const int *attribs )
{
FIXME( "Not supported on DIB section\n" );
return 0;
}
/***********************************************************************
* dibdrv_wglDeleteContext
*/
static BOOL dibdrv_wglDeleteContext( HGLRC ctx )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglGetProcAddress
*/
static PROC dibdrv_wglGetProcAddress( LPCSTR name )
{
FIXME( "Not supported on DIB section\n" );
return NULL;
}
/***********************************************************************
* dibdrv_wglMakeContextCurrentARB
*/
static BOOL dibdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, HGLRC ctx )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglMakeCurrent
*/
static BOOL dibdrv_wglMakeCurrent( PHYSDEV dev, HGLRC ctx )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglSetPixelFormatWINE
*/
static BOOL dibdrv_wglSetPixelFormatWINE( PHYSDEV dev, INT fmt, const PIXELFORMATDESCRIPTOR *pfd )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglShareLists
*/
static BOOL dibdrv_wglShareLists( HGLRC ctx1, HGLRC ctx2 )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglUseFontBitmapsA
*/
static BOOL dibdrv_wglUseFontBitmapsA( PHYSDEV dev, DWORD first, DWORD count, DWORD base )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
/***********************************************************************
* dibdrv_wglUseFontBitmapsW
*/
static BOOL dibdrv_wglUseFontBitmapsW( PHYSDEV dev, DWORD first, DWORD count, DWORD base )
{
FIXME( "Not supported on DIB section\n" );
return FALSE;
}
const struct gdi_dc_funcs dib_driver = const struct gdi_dc_funcs dib_driver =
{ {
NULL, /* pAbortDoc */ NULL, /* pAbortDoc */
@ -595,7 +442,7 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_ArcTo, /* pArcTo */ dibdrv_ArcTo, /* pArcTo */
NULL, /* pBeginPath */ NULL, /* pBeginPath */
dibdrv_BlendImage, /* pBlendImage */ dibdrv_BlendImage, /* pBlendImage */
dibdrv_ChoosePixelFormat, /* pChoosePixelFormat */ NULL, /* pChoosePixelFormat */
dibdrv_Chord, /* pChord */ dibdrv_Chord, /* pChord */
NULL, /* pCloseFigure */ NULL, /* pCloseFigure */
dibdrv_CopyBitmap, /* pCopyBitmap */ dibdrv_CopyBitmap, /* pCopyBitmap */
@ -605,7 +452,7 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_DeleteBitmap, /* pDeleteBitmap */ dibdrv_DeleteBitmap, /* pDeleteBitmap */
dibdrv_DeleteDC, /* pDeleteDC */ dibdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
dibdrv_DescribePixelFormat, /* pDescribePixelFormat */ NULL, /* pDescribePixelFormat */
NULL, /* pDeviceCapabilities */ NULL, /* pDeviceCapabilities */
dibdrv_Ellipse, /* pEllipse */ dibdrv_Ellipse, /* pEllipse */
NULL, /* pEndDoc */ NULL, /* pEndDoc */
@ -615,7 +462,7 @@ const struct gdi_dc_funcs dib_driver =
NULL, /* pEnumICMProfiles */ NULL, /* pEnumICMProfiles */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
NULL, /* pExtDeviceMode */ NULL, /* pExtDeviceMode */
dibdrv_ExtEscape, /* pExtEscape */ NULL, /* pExtEscape */
dibdrv_ExtFloodFill, /* pExtFloodFill */ dibdrv_ExtFloodFill, /* pExtFloodFill */
NULL, /* pExtSelectClipRgn */ NULL, /* pExtSelectClipRgn */
dibdrv_ExtTextOut, /* pExtTextOut */ dibdrv_ExtTextOut, /* pExtTextOut */
@ -642,7 +489,7 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_GetNearestColor, /* pGetNearestColor */ dibdrv_GetNearestColor, /* pGetNearestColor */
NULL, /* pGetOutlineTextMetrics */ NULL, /* pGetOutlineTextMetrics */
dibdrv_GetPixel, /* pGetPixel */ dibdrv_GetPixel, /* pGetPixel */
dibdrv_GetPixelFormat, /* pGetPixelFormat */ NULL, /* pGetPixelFormat */
NULL, /* pGetSystemPaletteEntries */ NULL, /* pGetSystemPaletteEntries */
NULL, /* pGetTextCharsetInfo */ NULL, /* pGetTextCharsetInfo */
NULL, /* pGetTextExtentExPoint */ NULL, /* pGetTextExtentExPoint */
@ -698,7 +545,7 @@ const struct gdi_dc_funcs dib_driver =
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
dibdrv_SetPixel, /* pSetPixel */ dibdrv_SetPixel, /* pSetPixel */
dibdrv_SetPixelFormat, /* pSetPixelFormat */ NULL, /* pSetPixelFormat */
NULL, /* pSetPolyFillMode */ NULL, /* pSetPolyFillMode */
NULL, /* pSetROP2 */ NULL, /* pSetROP2 */
NULL, /* pSetRelAbs */ NULL, /* pSetRelAbs */
@ -718,20 +565,19 @@ const struct gdi_dc_funcs dib_driver =
NULL, /* pStretchDIBits */ NULL, /* pStretchDIBits */
NULL, /* pStrokeAndFillPath */ NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */ NULL, /* pStrokePath */
dibdrv_SwapBuffers, /* pSwapBuffers */ NULL, /* pSwapBuffers */
NULL, /* pUnrealizePalette */ NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */ NULL, /* pWidenPath */
dibdrv_wglCopyContext, /* pwglCopyContext */ NULL, /* pwglCopyContext */
dibdrv_wglCreateContext, /* pwglCreateContext */ NULL, /* pwglCreateContext */
dibdrv_wglCreateContextAttribsARB, /* pwglCreateContextAttribsARB */ NULL, /* pwglCreateContextAttribsARB */
dibdrv_wglDeleteContext, /* pwglDeleteContext */ NULL, /* pwglDeleteContext */
dibdrv_wglGetProcAddress, /* pwglGetProcAddress */ NULL, /* pwglGetProcAddress */
dibdrv_wglMakeContextCurrentARB, /* pwglMakeContextCurrentARB */ NULL, /* pwglMakeContextCurrentARB */
dibdrv_wglMakeCurrent, /* pwglMakeCurrent */ NULL, /* pwglMakeCurrent */
dibdrv_wglSetPixelFormatWINE, /* pwglSetPixelFormatWINE */ NULL, /* pwglSetPixelFormatWINE */
dibdrv_wglShareLists, /* pwglShareLists */ NULL, /* pwglShareLists */
dibdrv_wglUseFontBitmapsA, /* pwglUseFontBitmapsA */ NULL, /* pwglUseFontBitmapsA */
dibdrv_wglUseFontBitmapsW, /* pwglUseFontBitmapsW */ NULL, /* pwglUseFontBitmapsW */
GDI_PRIORITY_DIB_DRV /* priority */ GDI_PRIORITY_DIB_DRV /* priority */
}; };

View File

@ -571,7 +571,7 @@ static void test_bitmap_rendering(void)
{ {
SetPixelFormat(hdcDst, iPixelFormat, &pfd); SetPixelFormat(hdcDst, iPixelFormat, &pfd);
hglrc = wglCreateContext(hdcDst); hglrc = wglCreateContext(hdcDst);
todo_wine ok(hglrc != NULL, "Unable to create a context\n"); ok(hglrc != NULL, "Unable to create a context\n");
if(hglrc) if(hglrc)
{ {
@ -583,7 +583,7 @@ static void test_bitmap_rendering(void)
glFinish(); glFinish();
/* Note apparently the alpha channel is not supported by the software renderer (bitmap only works using software) */ /* Note apparently the alpha channel is not supported by the software renderer (bitmap only works using software) */
ok(dstBuffer[0] == 0x223344, "Expected color=0x223344, received color=%x\n", dstBuffer[0]); ok(dstBuffer[0] == 0x223344 || dstBuffer[0] == 0x11223344, "Received color=%x\n", dstBuffer[0]);
wglMakeCurrent(NULL, NULL); wglMakeCurrent(NULL, NULL);
wglDeleteContext(hglrc); wglDeleteContext(hglrc);