summaryrefslogtreecommitdiff
path: root/debug/debug_bitmap.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-02-22 01:58:19 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-02-22 01:58:19 +0000
commit3d9a1198db571973e2760d6f27c771cbe31c844b (patch)
tree5a306a7fdf135f63fa1bd031924fb18edc5ecc2b /debug/debug_bitmap.c
parent01cc7987c7af26c70269c81e9d344fd2e91a8793 (diff)
downloadnetsurf-3d9a1198db571973e2760d6f27c771cbe31c844b.tar.gz
netsurf-3d9a1198db571973e2760d6f27c771cbe31c844b.tar.bz2
[project @ 2006-02-22 01:58:19 by rjw]
Reduce constant bitmap overhead per reference by moving to a flag word. Allow bitmaps to be reduced back to their raw data to free extra memory in a highly efficient manner. svn path=/import/netsurf/; revision=2089
Diffstat (limited to 'debug/debug_bitmap.c')
-rw-r--r--debug/debug_bitmap.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/debug/debug_bitmap.c b/debug/debug_bitmap.c
index 6d7cd3f44..9c8942f7d 100644
--- a/debug/debug_bitmap.c
+++ b/debug/debug_bitmap.c
@@ -29,10 +29,11 @@ struct bitmap {
*
* \param width width of image in pixels
* \param height width of image in pixels
+ * \param state a flag word indicating the initial state
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-struct bitmap *bitmap_create(int width, int height, bitmap_state state)
+struct bitmap *bitmap_create(int width, int height, unsigned int state)
{
struct bitmap *bitmap;
bitmap = calloc(sizeof *bitmap + width * height * 4, 1);
@@ -120,3 +121,16 @@ bool bitmap_save(struct bitmap *bitmap, const char *path)
*/
void bitmap_modified(struct bitmap *bitmap) {
}
+
+
+/**
+ * The bitmap image can be suspended.
+ *
+ * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param private_word a private word to be returned later
+ * \param suspend the function to be called upon suspension
+ * \param resume the function to be called when resuming
+ */
+void bitmap_set_suspendable(struct bitmap *bitmap, void *private_word,
+ void (*invalidate)(struct bitmap *bitmap, void *private_word)) {
+}