diff options
author | Brian Paul <[email protected]> | 2009-02-03 09:21:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-02-03 15:36:38 -0700 |
commit | b5d549e3514af1d299b27d80bd157a65f397fe15 (patch) | |
tree | c29ba0fd649ac0aa4bc1247cdc66ebb7643ca1a9 /src/mesa/main/depthstencil.c | |
parent | dd22f6f7956ac5800adb62b26b1effa43f2b70aa (diff) |
mesa: simplify delete_wrapper()
Diffstat (limited to 'src/mesa/main/depthstencil.c')
-rw-r--r-- | src/mesa/main/depthstencil.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c index 9d208e2997d..7be2aacaf2c 100644 --- a/src/mesa/main/depthstencil.c +++ b/src/mesa/main/depthstencil.c @@ -62,15 +62,9 @@ nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) static void delete_wrapper(struct gl_renderbuffer *rb) { - struct gl_renderbuffer *dsrb = rb->Wrapped; - ASSERT(dsrb); ASSERT(rb->_ActualFormat == GL_DEPTH_COMPONENT24 || rb->_ActualFormat == GL_STENCIL_INDEX8_EXT); - /* decrement refcount on the wrapped buffer and delete it if necessary */ - dsrb->RefCount--; - if (dsrb->RefCount <= 0) { - dsrb->Delete(dsrb); - } + _mesa_reference_renderbuffer(&rb->Wrapped, NULL); _mesa_free(rb); } |