winex11: Don't store a physdev pointer in the GL context.
This commit is contained in:
parent
771d61a886
commit
6cd7d06823
|
@ -109,8 +109,7 @@ typedef struct wine_glcontext {
|
||||||
WineGLPixelFormat *fmt;
|
WineGLPixelFormat *fmt;
|
||||||
GLXContext ctx;
|
GLXContext ctx;
|
||||||
BOOL do_escape;
|
BOOL do_escape;
|
||||||
X11DRV_PDEVICE *physDev;
|
HDC read_hdc;
|
||||||
X11DRV_PDEVICE *pReadDev;
|
|
||||||
Drawable drawables[2];
|
Drawable drawables[2];
|
||||||
BOOL refresh_drawables;
|
BOOL refresh_drawables;
|
||||||
struct wine_glcontext *next;
|
struct wine_glcontext *next;
|
||||||
|
@ -1498,7 +1497,6 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
|
||||||
ret = alloc_context();
|
ret = alloc_context();
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
ret->hdc = hdc;
|
ret->hdc = hdc;
|
||||||
ret->physDev = physDev;
|
|
||||||
ret->fmt = fmt;
|
ret->fmt = fmt;
|
||||||
|
|
||||||
/*ret->vis = vis;*/
|
/*ret->vis = vis;*/
|
||||||
|
@ -1553,12 +1551,10 @@ static HDC WINAPI X11DRV_wglGetCurrentReadDCARB(void)
|
||||||
{
|
{
|
||||||
HDC ret = 0;
|
HDC ret = 0;
|
||||||
Wine_GLContext *ctx = NtCurrentTeb()->glContext;
|
Wine_GLContext *ctx = NtCurrentTeb()->glContext;
|
||||||
X11DRV_PDEVICE *physDev = ctx ? ctx->pReadDev : NULL;
|
|
||||||
|
|
||||||
if(physDev)
|
if (ctx) ret = ctx->read_hdc;
|
||||||
ret = physDev->hdc;
|
|
||||||
|
|
||||||
TRACE(" returning %p (GL drawable %lu)\n", ret, physDev ? physDev->drawable : 0);
|
TRACE(" returning %p (GL drawable %lu)\n", ret, ctx ? ctx->drawables[1] : 0);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1650,8 +1646,7 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
|
||||||
if(ret)
|
if(ret)
|
||||||
{
|
{
|
||||||
ctx->hdc = hdc;
|
ctx->hdc = hdc;
|
||||||
ctx->physDev = physDev;
|
ctx->read_hdc = hdc;
|
||||||
ctx->pReadDev = physDev;
|
|
||||||
ctx->drawables[0] = drawable;
|
ctx->drawables[0] = drawable;
|
||||||
ctx->drawables[1] = drawable;
|
ctx->drawables[1] = drawable;
|
||||||
ctx->refresh_drawables = FALSE;
|
ctx->refresh_drawables = FALSE;
|
||||||
|
@ -1702,8 +1697,7 @@ BOOL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEVICE* p
|
||||||
TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx);
|
TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx);
|
||||||
}
|
}
|
||||||
ctx->hdc = pDrawDev->hdc;
|
ctx->hdc = pDrawDev->hdc;
|
||||||
ctx->physDev = pDrawDev;
|
ctx->read_hdc = pReadDev->hdc;
|
||||||
ctx->pReadDev = pReadDev;
|
|
||||||
ctx->drawables[0] = d_draw;
|
ctx->drawables[0] = d_draw;
|
||||||
ctx->drawables[1] = d_read;
|
ctx->drawables[1] = d_read;
|
||||||
ctx->refresh_drawables = FALSE;
|
ctx->refresh_drawables = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue