src/video/SDL_rect.c
changeset 5156 307ccc9c135e
parent 5154 fb424691cfc7
child 5262 b530ef003506
     1.1 --- a/src/video/SDL_rect.c	Wed Feb 02 22:55:12 2011 -0800
     1.2 +++ b/src/video/SDL_rect.c	Thu Feb 03 00:19:40 2011 -0800
     1.3 @@ -339,66 +339,4 @@
     1.4      return SDL_TRUE;
     1.5  }
     1.6  
     1.7 -void
     1.8 -SDL_AddDirtyRect(SDL_DirtyRectList * list, const SDL_Rect * rect)
     1.9 -{
    1.10 -    SDL_DirtyRect *dirty;
    1.11 -
    1.12 -    /* FIXME: At what point is this optimization too expensive? */
    1.13 -    for (dirty = list->list; dirty; dirty = dirty->next) {
    1.14 -        if (SDL_HasIntersection(&dirty->rect, rect)) {
    1.15 -            SDL_UnionRect(&dirty->rect, rect, &dirty->rect);
    1.16 -            return;
    1.17 -        }
    1.18 -    }
    1.19 -
    1.20 -    if (list->free) {
    1.21 -        dirty = list->free;
    1.22 -        list->free = dirty->next;
    1.23 -    } else {
    1.24 -        dirty = (SDL_DirtyRect *) SDL_malloc(sizeof(*dirty));
    1.25 -        if (!dirty) {
    1.26 -            return;
    1.27 -        }
    1.28 -    }
    1.29 -    dirty->rect = *rect;
    1.30 -    dirty->next = list->list;
    1.31 -    list->list = dirty;
    1.32 -}
    1.33 -
    1.34 -void
    1.35 -SDL_ClearDirtyRects(SDL_DirtyRectList * list)
    1.36 -{
    1.37 -    SDL_DirtyRect *prev, *curr;
    1.38 -
    1.39 -    /* Skip to the end of the free list */
    1.40 -    prev = NULL;
    1.41 -    for (curr = list->free; curr; curr = curr->next) {
    1.42 -        prev = curr;
    1.43 -    }
    1.44 -
    1.45 -    /* Add the list entries to the end */
    1.46 -    if (prev) {
    1.47 -        prev->next = list->list;
    1.48 -    } else {
    1.49 -        list->free = list->list;
    1.50 -    }
    1.51 -    list->list = NULL;
    1.52 -}
    1.53 -
    1.54 -void
    1.55 -SDL_FreeDirtyRects(SDL_DirtyRectList * list)
    1.56 -{
    1.57 -    while (list->list) {
    1.58 -        SDL_DirtyRect *elem = list->list;
    1.59 -        list->list = elem->next;
    1.60 -        SDL_free(elem);
    1.61 -    }
    1.62 -    while (list->free) {
    1.63 -        SDL_DirtyRect *elem = list->free;
    1.64 -        list->free = elem->next;
    1.65 -        SDL_free(elem);
    1.66 -    }
    1.67 -}
    1.68 -
    1.69  /* vi: set ts=4 sw=4 expandtab: */