summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-10-14 20:17:17 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-10-14 20:17:17 +0100
commit493872389687e16dc4bb4ecf33f4951101d4ca8f (patch)
tree3918aa10715240e1d432196b9be9a02f40a854c4 /riscos
parentd88a8399371dad124136b4e12b9e7b7156ad3c69 (diff)
downloadnetsurf-493872389687e16dc4bb4ecf33f4951101d4ca8f.tar.gz
netsurf-493872389687e16dc4bb4ecf33f4951101d4ca8f.tar.bz2
Remove last notion of bitmap suspension.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/bitmap.c35
-rw-r--r--riscos/bitmap.h1
2 files changed, 1 insertions, 35 deletions
diff --git a/riscos/bitmap.c b/riscos/bitmap.c
index 6caaf3e2a..d7836822a 100644
--- a/riscos/bitmap.c
+++ b/riscos/bitmap.c
@@ -83,14 +83,6 @@ unsigned int bitmap_compressed_size;
*/
unsigned int bitmap_compressed_used = 0;
-/** Total number of suspendable bitmaps
-*/
-unsigned int bitmap_suspendable = 0;
-
-/** Total number of suspended bitmaps
-*/
-unsigned int bitmap_suspended = 0;
-
/** Compressed data header
*/
struct bitmap_compressed_header {
@@ -517,10 +509,6 @@ unsigned char *bitmap_get_buffer(void *vbitmap)
return NULL;
}
- /* reset our suspended flag */
- if (bitmap->state & BITMAP_SUSPENDED)
- bitmap->state &= ~BITMAP_SUSPENDED;
-
/* image is already decompressed, no change to image states */
if (bitmap->sprite_area)
return ((unsigned char *) (bitmap->sprite_area)) + 16 + 44;
@@ -788,7 +776,6 @@ void bitmap_maintain(void)
{
unsigned int memory = 0;
unsigned int compressed_memory = 0;
- unsigned int suspended = 0;
struct bitmap *bitmap = bitmap_head;
struct bitmap_compressed_header *header;
unsigned int maintain_direct_size;
@@ -819,8 +806,7 @@ void bitmap_maintain(void)
header = (void *) bitmap->compressed;
compressed_memory += header->input_size +
sizeof(struct bitmap_compressed_header);
- } else if (bitmap->state & BITMAP_SUSPENDED)
- suspended++;
+ }
}
if (!bitmap) {
@@ -829,25 +815,6 @@ void bitmap_maintain(void)
return;
}
- /* the fastest and easiest way to release memory is by suspending
- * images. as such, we try to do this first for as many images as
- * possible, potentially freeing up large amounts of memory */
- if (suspended <= (bitmap_suspendable - bitmap_suspended)) {
- for (; bitmap; bitmap = bitmap->next) {
- if (bitmap->invalidate) {
- bitmap->invalidate(bitmap, bitmap->private_word);
- free(bitmap->sprite_area);
- bitmap->sprite_area = NULL;
- bitmap->state |= BITMAP_SUSPENDED;
- bitmap->state &= ~BITMAP_READY;
- bitmap_direct_used -= 16 + 44 +
- bitmap->width * bitmap->height * 4;
- bitmap_suspended++;
- }
- }
- return;
- }
-
/* under heavy loads, we ignore compression */
if (!bitmap_maintenance_priority) {
/* for the next section, up until bitmap_COMPRESSED we
diff --git a/riscos/bitmap.h b/riscos/bitmap.h
index 84c82ced9..b6fd3ae45 100644
--- a/riscos/bitmap.h
+++ b/riscos/bitmap.h
@@ -32,7 +32,6 @@ struct bitmap {
unsigned int state;
void *private_word;
- void (*invalidate)(void *bitmap, void *private_word);
osspriteop_area *sprite_area; /** Uncompressed data, or NULL */
char *compressed; /** Compressed data, or NULL */