intel: Avoid dri_bo_flink() in intel_update_renderbuffers()
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 11 Feb 2010 22:19:34 +0000 (17:19 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 12 Feb 2010 21:30:39 +0000 (16:30 -0500)
Now that we track the global name in struct intel_region, we can just
look it up there.

src/mesa/drivers/dri/intel/intel_context.c

index e9315a50fe75b469a1b74737b6b2311a10b94a66..f62f75c5cba37e377f7fca1f6f542fbbbea55ee7 100644 (file)
@@ -324,11 +324,8 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
        if (rb == NULL)
          continue;
 
-       if (rb->region) {
-         dri_bo_flink(rb->region->buffer, &name);
-         if (name == buffers[i].name)
+       if (rb->region && rb->region->name == buffers[i].name)
             continue;
-       }
 
        if (INTEL_DEBUG & DEBUG_DRI)
          fprintf(stderr,
@@ -360,11 +357,8 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
          if (rb != NULL) {
             struct intel_region *stencil_region = NULL;
 
-            if (rb->region) {
-               dri_bo_flink(rb->region->buffer, &name);
-               if (name == buffers[i].name)
+            if (rb->region && rb->region->name == buffers[i].name)
                   continue;
-            }
 
             intel_region_reference(&stencil_region, region);
             intel_renderbuffer_set_region(rb, stencil_region);