dri: Move driUpdateFramebufferSize to dri_util.c
drirenderbuffer.[ch] is going bye-bye.
This commit is contained in:
parent
90de3b9d96
commit
c467db4cc7
|
@ -498,4 +498,21 @@ dri2InvalidateDrawable(__DRIdrawable *drawable)
|
|||
drawable->dri2.stamp++;
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
/**
|
||||
* Check that the gl_framebuffer associated with dPriv is the right size.
|
||||
* Resize the gl_framebuffer if needed.
|
||||
* It's expected that the dPriv->driverPrivate member points to a
|
||||
* gl_framebuffer object.
|
||||
*/
|
||||
void
|
||||
driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv)
|
||||
{
|
||||
struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate;
|
||||
if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) {
|
||||
ctx->Driver.ResizeBuffers(ctx, fb, dPriv->w, dPriv->h);
|
||||
/* if the driver needs the hw lock for ResizeBuffers, the drawable
|
||||
might have changed again by now */
|
||||
assert(fb->Width == dPriv->w);
|
||||
assert(fb->Height == dPriv->h);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -282,4 +282,7 @@ struct __DRIscreenRec {
|
|||
extern void
|
||||
dri2InvalidateDrawable(__DRIdrawable *drawable);
|
||||
|
||||
extern void
|
||||
driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv);
|
||||
|
||||
#endif /* _DRI_UTIL_H_ */
|
||||
|
|
|
@ -178,23 +178,3 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check that the gl_framebuffer associated with dPriv is the right size.
|
||||
* Resize the gl_framebuffer if needed.
|
||||
* It's expected that the dPriv->driverPrivate member points to a
|
||||
* gl_framebuffer object.
|
||||
*/
|
||||
void
|
||||
driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv)
|
||||
{
|
||||
struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate;
|
||||
if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) {
|
||||
ctx->Driver.ResizeBuffers(ctx, fb, dPriv->w, dPriv->h);
|
||||
/* if the driver needs the hw lock for ResizeBuffers, the drawable
|
||||
might have changed again by now */
|
||||
assert(fb->Width == dPriv->w);
|
||||
assert(fb->Height == dPriv->h);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue