diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-10-28 16:49:44 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-11-02 11:16:03 -0400 |
commit | c467db4cc765965bd347cf5b91aec39b831273ec (patch) | |
tree | 04e039682ef80f5b9db28a444105f4bd2be2014f /src/mesa | |
parent | 90de3b9d96394809e2574c6c5b459a9cf745d9dd (diff) |
dri: Move driUpdateFramebufferSize to dri_util.c
drirenderbuffer.[ch] is going bye-bye.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 19 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/drirenderbuffer.c | 20 |
3 files changed, 21 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 7ffa86091bd..da4e39f9c01 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -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); + } +} diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 38394a7fefa..7a3b0a9b2f5 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.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_ */ diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index 7ac1ab169ef..ccc39e4a8de 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -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); - } -} |