st/mesa: remove useless checking in reset_cache
authorMarek Olšák <maraeo@gmail.com>
Mon, 8 Oct 2012 00:27:35 +0000 (02:27 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 11 Oct 2012 19:12:03 +0000 (21:12 +0200)
It's always NULL here.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_bitmap.c

index 62e5712351225deb2f268ddfa684ed12ef320c53..e4d6c4a85bf2adec01f57e5bee504e687c69fe07 100644 (file)
@@ -555,7 +555,6 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
 static void
 reset_cache(struct st_context *st)
 {
-   struct pipe_context *pipe = st->pipe;
    struct bitmap_cache *cache = st->bitmap.cache;
 
    /*memset(cache->buffer, 0xff, sizeof(cache->buffer));*/
@@ -566,11 +565,6 @@ reset_cache(struct st_context *st)
    cache->ymin = 1000000;
    cache->ymax = -1000000;
 
-   if (cache->trans) {
-      pipe->transfer_destroy(pipe, cache->trans);
-      cache->trans = NULL;
-   }
-
    assert(!cache->texture);
 
    /* allocate a new texture */