Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/d4cba8e4f7513f8757073347268c1dc8dffb33d4
...commit
http://git.netsurf-browser.org/netsurf.git/commit/d4cba8e4f7513f8757073347268c1dc8dffb33d4
...tree
http://git.netsurf-browser.org/netsurf.git/tree/d4cba8e4f7513f8757073347268c1dc8dffb33d4
The branch, chris/extmem has been updated
via d4cba8e4f7513f8757073347268c1dc8dffb33d4 (commit)
via a46338a6488fb7b14060c59035e350cb21dafbbe (commit)
via d448d44a95a7905953fdc766744dc90f6f9e0391 (commit)
via 38bf24325504cb5375455d49bfada27fc0d37384 (commit)
via 16a56a451d095483bc4e081da3eb5b40bdc04254 (commit)
from 4db40c3f27d0ade8fc76f57cd383e5ff52ad7c93 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=d4cba8e4f7513f8757073347268c1dc8dffb33d4
commit d4cba8e4f7513f8757073347268c1dc8dffb33d4
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
More logging
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 62a86d5..5108fad 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -648,6 +648,7 @@ struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
int width, int height, struct BitMap *friendbm)
{
if(bitmap == NULL) return NULL;
+ LOG("Getting native BitMap for %p", bitmap);
if(__builtin_expect(ami_plot_screen_is_palettemapped() == true, 0)) {
return ami_bitmap_get_palettemapped(bitmap, width, height,
friendbm);
@@ -665,6 +666,8 @@ void ami_bitmap_fini(void)
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
#ifdef __amigaos4__
+ LOG("Entering bitmap_render");
+
struct redraw_context ctx = {
.interactive = false,
.background_images = true,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=a46338a6488fb7b14060c59035e350cb21dafbbe
commit a46338a6488fb7b14060c59035e350cb21dafbbe
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Revert "Disable ExtMem in palette-mapped modes"
This reverts commit 4db40c3f27d0ade8fc76f57cd383e5ff52ad7c93.
diff --git a/amiga/gui.c b/amiga/gui.c
index 33f4435..9c89084 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -510,10 +510,6 @@ static void ami_set_screen_defaults(struct Screen *screen)
nsoption_default_set_int(redraw_tile_size_x, screen->Width);
nsoption_default_set_int(redraw_tile_size_y, screen->Height);
- if((screen != NULL) && (GetBitMapAttr(screen->RastPort.BitMap,
BMA_DEPTH) < 24)) {
- nsoption_set_bool(use_extmem, false);
- }
-
/* set system colours for amiga ui */
colour_option_from_pen(FILLPEN, NSOPTION_sys_colour_ActiveBorder,
screen, 0x00000000);
colour_option_from_pen(FILLPEN, NSOPTION_sys_colour_ActiveCaption,
screen, 0x00dddddd);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=d448d44a95a7905953fdc766744dc90f6f9e0391
commit d448d44a95a7905953fdc766744dc90f6f9e0391
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Debug logging
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 8d9924c..62a86d5 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -143,6 +143,7 @@ static void amiga_bitmap_unmap_buffer(void *p)
struct bitmap *bm = p;
if((nsoption_bool(use_extmem) == true) && (bm->pixdata != NULL)) {
+ LOG("Unmapping ExtMem object %p for bitmap %p", bm->iextmem,
bm);
bm->iextmem->Unmap(bm->pixdata, bm->size);
bm->pixdata = NULL;
}
@@ -156,6 +157,7 @@ unsigned char *amiga_bitmap_get_buffer(void *bitmap)
#ifdef __amigaos4__
if((nsoption_bool(use_extmem) == true) && (bm->pixdata == NULL)) {
+ LOG("Mapping ExtMem object %p for bitmap %p", bm->iextmem, bm);
bm->pixdata = bm->iextmem->Map(NULL, bm->size, 0LL, 0);
/* unmap the buffer after one second */
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=38bf24325504cb5375455d49bfada27fc0d37384
commit 38bf24325504cb5375455d49bfada27fc0d37384
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Schedule unmapping the extmem object to ensure it releases main memory
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index b977bc4..8d9924c 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -58,6 +58,7 @@
#include "amiga/download.h"
#include "amiga/misc.h"
#include "amiga/rtg.h"
+#include "amiga/schedule.h"
struct bitmap {
int width;
@@ -136,9 +137,11 @@ void *amiga_bitmap_create(int width, int height, unsigned
int state)
return bitmap;
}
-static inline void amiga_bitmap_unmap_buffer(struct bitmap *bm)
+static void amiga_bitmap_unmap_buffer(void *p)
{
#ifdef __amigaos4__
+ struct bitmap *bm = p;
+
if((nsoption_bool(use_extmem) == true) && (bm->pixdata != NULL)) {
bm->iextmem->Unmap(bm->pixdata, bm->size);
bm->pixdata = NULL;
@@ -154,6 +157,9 @@ unsigned char *amiga_bitmap_get_buffer(void *bitmap)
#ifdef __amigaos4__
if((nsoption_bool(use_extmem) == true) && (bm->pixdata == NULL)) {
bm->pixdata = bm->iextmem->Map(NULL, bm->size, 0LL, 0);
+
+ /* unmap the buffer after one second */
+ ami_schedule(1000, amiga_bitmap_unmap_buffer, bm);
}
#endif
@@ -191,6 +197,7 @@ void amiga_bitmap_destroy(void *bitmap)
#ifdef __amigaos4__
if(nsoption_bool(use_extmem) == true) {
+ ami_schedule(-1, amiga_bitmap_unmap_buffer, bm);
amiga_bitmap_unmap_buffer(bm);
FreeSysObject(ASOT_EXTMEM, bm->iextmem);
} else
@@ -248,10 +255,6 @@ void amiga_bitmap_modified(void *bitmap)
{
struct bitmap *bm = bitmap;
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bm);
-#endif
-
if(bm->nativebm) ami_rtg_freebitmap(bm->nativebm);
if(bm->drawhandle) ReleaseDrawHandle(bm->drawhandle);
if(bm->psm) DeletePenShareMap(bm->psm);
@@ -421,10 +424,6 @@ Object *ami_datatype_object_from_bitmap(struct bitmap
*bitmap)
bitmap_get_width(bitmap),
bitmap_get_height(bitmap));
}
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bitmap);
-#endif
-
return dto;
}
@@ -454,10 +453,6 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
DisposeDTObject(dto);
}
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bm);
-#endif
-
return bm;
}
@@ -594,10 +589,6 @@ static inline struct BitMap *ami_bitmap_get_generic(struct
bitmap *bitmap, int w
}
}
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bitmap);
-#endif
-
return tbm;
}
@@ -716,10 +707,6 @@ static nserror bitmap_render(struct bitmap *bitmap,
hlcache_handle *content)
ami_free_layers(&bm_globals);
amiga_bitmap_set_opaque(bitmap, true);
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bitmap);
-#endif
-
/* Restore previous render area. This is set when plotting starts,
* but if bitmap_render is called *during* a browser render then
* having an invalid pointer here causes NetSurf to crash.
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=16a56a451d095483bc4e081da3eb5b40bdc04254
commit 16a56a451d095483bc4e081da3eb5b40bdc04254
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Documentation
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index a1c3941..58eb917 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -143,7 +143,7 @@ There are a couple of Amiga-specific options which can only
be changed directly
@{b}reformat_delay@{ub} Sets a delay on performing content reformats (eg. if
the window has been resized). Set to a higher value to make "resize with
contents" more responsive. Defaults to 0 (immediate).
@{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of
the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0
disables tiling (will use a bitmap at least the size of the screen NetSurf is
running on)
@{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size
of the web search gadget next to the URL bar.
-
+@{b}use_extmem@{ub} Defaults to 0 (disabled). Setting to 1 will make NetSurf
use Extended Memory to store uncompressed images. OS4 only; does not work on
Pegasus 2.
@{b}mask_alpha@{ub} Threshold to use when determining which alpha values to
convert to full transparency (0 - 255, where 255 will convert even opaque
pixels to transparent). Defaults to 50 (0x32). This is only used in
palette-mapped modes where alpha blending is not currently supported.
@{b}url_file@{ub} Path to URL database file
-----------------------------------------------------------------------
Summary of changes:
amiga/bitmap.c | 34 +++++++++++++---------------------
amiga/dist/NetSurf.guide | 2 +-
amiga/gui.c | 4 ----
3 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index b977bc4..5108fad 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -58,6 +58,7 @@
#include "amiga/download.h"
#include "amiga/misc.h"
#include "amiga/rtg.h"
+#include "amiga/schedule.h"
struct bitmap {
int width;
@@ -136,10 +137,13 @@ void *amiga_bitmap_create(int width, int height, unsigned
int state)
return bitmap;
}
-static inline void amiga_bitmap_unmap_buffer(struct bitmap *bm)
+static void amiga_bitmap_unmap_buffer(void *p)
{
#ifdef __amigaos4__
+ struct bitmap *bm = p;
+
if((nsoption_bool(use_extmem) == true) && (bm->pixdata != NULL)) {
+ LOG("Unmapping ExtMem object %p for bitmap %p", bm->iextmem,
bm);
bm->iextmem->Unmap(bm->pixdata, bm->size);
bm->pixdata = NULL;
}
@@ -153,7 +157,11 @@ unsigned char *amiga_bitmap_get_buffer(void *bitmap)
#ifdef __amigaos4__
if((nsoption_bool(use_extmem) == true) && (bm->pixdata == NULL)) {
+ LOG("Mapping ExtMem object %p for bitmap %p", bm->iextmem, bm);
bm->pixdata = bm->iextmem->Map(NULL, bm->size, 0LL, 0);
+
+ /* unmap the buffer after one second */
+ ami_schedule(1000, amiga_bitmap_unmap_buffer, bm);
}
#endif
@@ -191,6 +199,7 @@ void amiga_bitmap_destroy(void *bitmap)
#ifdef __amigaos4__
if(nsoption_bool(use_extmem) == true) {
+ ami_schedule(-1, amiga_bitmap_unmap_buffer, bm);
amiga_bitmap_unmap_buffer(bm);
FreeSysObject(ASOT_EXTMEM, bm->iextmem);
} else
@@ -248,10 +257,6 @@ void amiga_bitmap_modified(void *bitmap)
{
struct bitmap *bm = bitmap;
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bm);
-#endif
-
if(bm->nativebm) ami_rtg_freebitmap(bm->nativebm);
if(bm->drawhandle) ReleaseDrawHandle(bm->drawhandle);
if(bm->psm) DeletePenShareMap(bm->psm);
@@ -421,10 +426,6 @@ Object *ami_datatype_object_from_bitmap(struct bitmap
*bitmap)
bitmap_get_width(bitmap),
bitmap_get_height(bitmap));
}
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bitmap);
-#endif
-
return dto;
}
@@ -454,10 +455,6 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
DisposeDTObject(dto);
}
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bm);
-#endif
-
return bm;
}
@@ -594,10 +591,6 @@ static inline struct BitMap *ami_bitmap_get_generic(struct
bitmap *bitmap, int w
}
}
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bitmap);
-#endif
-
return tbm;
}
@@ -655,6 +648,7 @@ struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
int width, int height, struct BitMap *friendbm)
{
if(bitmap == NULL) return NULL;
+ LOG("Getting native BitMap for %p", bitmap);
if(__builtin_expect(ami_plot_screen_is_palettemapped() == true, 0)) {
return ami_bitmap_get_palettemapped(bitmap, width, height,
friendbm);
@@ -672,6 +666,8 @@ void ami_bitmap_fini(void)
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
#ifdef __amigaos4__
+ LOG("Entering bitmap_render");
+
struct redraw_context ctx = {
.interactive = false,
.background_images = true,
@@ -716,10 +712,6 @@ static nserror bitmap_render(struct bitmap *bitmap,
hlcache_handle *content)
ami_free_layers(&bm_globals);
amiga_bitmap_set_opaque(bitmap, true);
-#ifdef __amigaos4__
- amiga_bitmap_unmap_buffer(bitmap);
-#endif
-
/* Restore previous render area. This is set when plotting starts,
* but if bitmap_render is called *during* a browser render then
* having an invalid pointer here causes NetSurf to crash.
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index a1c3941..58eb917 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -143,7 +143,7 @@ There are a couple of Amiga-specific options which can only
be changed directly
@{b}reformat_delay@{ub} Sets a delay on performing content reformats (eg. if
the window has been resized). Set to a higher value to make "resize with
contents" more responsive. Defaults to 0 (immediate).
@{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of
the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0
disables tiling (will use a bitmap at least the size of the screen NetSurf is
running on)
@{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size
of the web search gadget next to the URL bar.
-
+@{b}use_extmem@{ub} Defaults to 0 (disabled). Setting to 1 will make NetSurf
use Extended Memory to store uncompressed images. OS4 only; does not work on
Pegasus 2.
@{b}mask_alpha@{ub} Threshold to use when determining which alpha values to
convert to full transparency (0 - 255, where 255 will convert even opaque
pixels to transparent). Defaults to 50 (0x32). This is only used in
palette-mapped modes where alpha blending is not currently supported.
@{b}url_file@{ub} Path to URL database file
diff --git a/amiga/gui.c b/amiga/gui.c
index 33f4435..9c89084 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -510,10 +510,6 @@ static void ami_set_screen_defaults(struct Screen *screen)
nsoption_default_set_int(redraw_tile_size_x, screen->Width);
nsoption_default_set_int(redraw_tile_size_y, screen->Height);
- if((screen != NULL) && (GetBitMapAttr(screen->RastPort.BitMap,
BMA_DEPTH) < 24)) {
- nsoption_set_bool(use_extmem, false);
- }
-
/* set system colours for amiga ui */
colour_option_from_pen(FILLPEN, NSOPTION_sys_colour_ActiveBorder,
screen, 0x00000000);
colour_option_from_pen(FILLPEN, NSOPTION_sys_colour_ActiveCaption,
screen, 0x00dddddd);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org