[Mesa-dev] [PATCH 6/6] mesa: simplify _mesa_remove_renderbuffer()

Brian Paul brianp at vmware.com
Sun Dec 4 19:38:30 PST 2011


---
 src/mesa/main/renderbuffer.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 22df88c..d82b19a 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -156,17 +156,9 @@ void
 _mesa_remove_renderbuffer(struct gl_framebuffer *fb,
                           gl_buffer_index bufferName)
 {
-   struct gl_renderbuffer *rb;
-
    assert(bufferName < BUFFER_COUNT);
-
-   rb = fb->Attachment[bufferName].Renderbuffer;
-   if (!rb)
-      return;
-
-   _mesa_reference_renderbuffer(&rb, NULL);
-
-   fb->Attachment[bufferName].Renderbuffer = NULL;
+   _mesa_reference_renderbuffer(&fb->Attachment[bufferName].Renderbuffer,
+                                NULL);
 }
 
 
-- 
1.7.3.4



More information about the mesa-dev mailing list