move intelScreenContext() to intel_swapbuffers.c and make static

This commit is contained in:
Brian 2007-11-02 13:10:31 -06:00
parent 070aad3a9d
commit 5ff1ff2b55
3 changed files with 22 additions and 26 deletions

View file

@ -256,27 +256,3 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
return GL_TRUE;
}
struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen)
{
/*
* This should probably change to have the screen allocate a dummy
* context at screen creation. For now just use the current context.
*/
GET_CURRENT_CONTEXT(ctx);
if (ctx == NULL) {
/* need a context for the first time makecurrent is called (for hw lock
when allocating priv buffers) */
if (intelScreen->dummyctxptr == NULL) {
_mesa_problem(NULL, "No current context in intelScreenContext\n");
return NULL;
}
return intelScreen->dummyctxptr;
}
return intel_context(ctx);
}

View file

@ -97,8 +97,6 @@ extern struct _DriBufferPool *driBatchPoolInit(int fd, unsigned flags,
unsigned numBufs,
unsigned checkDelayed);
extern struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen);
extern GLboolean
intelCreatePools(intelScreenPrivate *intelScreen);

View file

@ -38,6 +38,28 @@
#include "state_tracker/st_cb_fbo.h"
static struct intel_context *
intelScreenContext(intelScreenPrivate *intelScreen)
{
/*
* This should probably change to have the screen allocate a dummy
* context at screen creation. For now just use the current context.
*/
GET_CURRENT_CONTEXT(ctx);
if (ctx == NULL) {
/* need a context for the first time makecurrent is called (for hw lock
when allocating priv buffers) */
if (intelScreen->dummyctxptr == NULL) {
_mesa_problem(NULL, "No current context in intelScreenContext\n");
return NULL;
}
return intelScreen->dummyctxptr;
}
return intel_context(ctx);
}
/**
* Return the pipe_surface for the given renderbuffer.