Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/9879cbbfae1ab5135b463...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/9879cbbfae1ab5135b46336...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/9879cbbfae1ab5135b46336da...
The branch, master has been updated
via 9879cbbfae1ab5135b46336daeac0655af021693 (commit)
via 893df2ccf12b14b74f7fefebf6e635836fde3513 (commit)
via 6eb0bd45799853d039d3e3ca8f61f7d4f428ce67 (commit)
via 1ea29c6aec03e0d6e9325910998e16910170fafa (commit)
via 5c8dccd5f6353524173542762154473f4006383f (commit)
via beb6cebf1e25cd95f7b2e5acbcb35defcf1496b5 (commit)
via 09ac17955ba4e96cef087619eb6b9c61429ea28e (commit)
via 8d71c0ae9e48695b14f24a62d3655f11858bba95 (commit)
from 6847fad65368bab3418eb716af4f9d485dfe30b1 (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=9879cbbfae1ab5135b4...
commit 9879cbbfae1ab5135b46336daeac0655af021693
Merge: 6847fad 893df2c
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Merge branch 'chris/fix-palmap-crash'
Fixes a problem with OS4 freezing up when running NetSurf on a palette mapped screen.
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=893df2ccf12b14b74f7...
commit 893df2ccf12b14b74f7fefebf6e635836fde3513
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Revert "Plot local history background white instead of wholly transparent"
On second thoughts this was correct initially.
This reverts commit 1ea29c6aec03e0d6e9325910998e16910170fafa.
diff --git a/amiga/history_local.c b/amiga/history_local.c
index e2d1b35..f11c784 100755
--- a/amiga/history_local.c
+++ b/amiga/history_local.c
@@ -82,7 +82,7 @@ static void ami_history_redraw(struct history_window *hw)
glob = &hw->gg;
- SetRPAttrs(glob->rp, RPTAG_APenColor, 0x00ffffff, TAG_DONE);
+ SetRPAttrs(glob->rp, RPTAG_APenColor, 0xffffffff, TAG_DONE);
RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1);
browser_window_history_redraw_rectangle(hw->gw->bw, xs, ys,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=6eb0bd45799853d039d...
commit 6eb0bd45799853d039d3e3ca8f61f7d4f428ce67
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Remove unneeded pen list
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index c57fb8f..b98d95f 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -558,8 +558,6 @@ struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
-// if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
-
struct redraw_context ctx = {
.interactive = false,
.background_images = true,
@@ -570,14 +568,13 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
int plot_height;
struct gui_globals bm_globals;
struct gui_globals *temp_gg = glob;
-// struct MinList *shared_pens = ami_AllocMinList();
plot_width = MIN(content_get_width(content), bitmap->width);
plot_height = ((plot_width * bitmap->height) + (bitmap->width / 2)) /
bitmap->width;
ami_init_layers(&bm_globals, bitmap->width, bitmap->height, true);
-// bm_globals.shared_pens = shared_pens;
+ bm_globals.shared_pens = NULL;
glob = &bm_globals;
ami_clearclipreg(&bm_globals);
@@ -600,15 +597,13 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
ami_bitmap_argb_to_rgba(bitmap);
#else
-#warning FIXME for OS3
+#warning FIXME for OS3 (in current state none of bitmap_render can work!)
#endif
/**\todo In theory we should be able to move the bitmap to our native area
to try to avoid re-conversion (at the expense of memory) */
ami_free_layers(&bm_globals);
-// ami_plot_release_pens(shared_pens);
-// FreeVec(shared_pens);
amiga_bitmap_set_opaque(bitmap, true);
/* Restore previous render area. This is set when plotting starts,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=1ea29c6aec03e0d6e93...
commit 1ea29c6aec03e0d6e9325910998e16910170fafa
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Plot local history background white instead of wholly transparent
diff --git a/amiga/history_local.c b/amiga/history_local.c
index f11c784..e2d1b35 100755
--- a/amiga/history_local.c
+++ b/amiga/history_local.c
@@ -82,7 +82,7 @@ static void ami_history_redraw(struct history_window *hw)
glob = &hw->gg;
- SetRPAttrs(glob->rp, RPTAG_APenColor, 0xffffffff, TAG_DONE);
+ SetRPAttrs(glob->rp, RPTAG_APenColor, 0x00ffffff, TAG_DONE);
RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1);
browser_window_history_redraw_rectangle(hw->gw->bw, xs, ys,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=5c8dccd5f6353524173...
commit 5c8dccd5f6353524173542762154473f4006383f
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
When forcing 32-bit render mode, don't create the BitMaps as friends of the screen
BitMap.
This fixes a system freeze on OS4
diff --git a/amiga/bitmap.h b/amiga/bitmap.h
index 20e6315..aba3597 100755
--- a/amiga/bitmap.h
+++ b/amiga/bitmap.h
@@ -35,6 +35,7 @@ struct bitmap {
int height;
UBYTE *pixdata;
bool opaque;
+ int native;
struct BitMap *nativebm;
int nativebmwidth;
int nativebmheight;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index bb69dce..c6c546b 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -142,7 +142,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height, bool for
} else {
/* Force friend BitMaps on for obvious RTG screens under OS3.
* If we get a bit smarter about this we can lose the user option. */
- if(depth >= 16) friend = scrn->RastPort.BitMap;
+ if((depth >= 16) && (force32bit == false)) friend =
scrn->RastPort.BitMap;
}
#endif
@@ -154,7 +154,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height, bool for
* We get freezes and other problems on OS4 if we befriend at any
* other depths, hence this check.
*/
- if(depth >= 24) friend = scrn->RastPort.BitMap;
+ if((depth >= 24) && (force32bit == false)) friend =
scrn->RastPort.BitMap;
#endif
gg->bm = ami_rtg_allocbitmap(width, height, 32, 0, friend, RGBFB_A8R8G8B8);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=beb6cebf1e25cd95f7b...
commit beb6cebf1e25cd95f7b2e5acbcb35defcf1496b5
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
conflict
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 73cb4e3..c57fb8f 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -558,11 +558,7 @@ struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
-<<<<<<< HEAD
// if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
-=======
- if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
->>>>>>> 6847fad65368bab3418eb716af4f9d485dfe30b1
struct redraw_context ctx = {
.interactive = false,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=09ac17955ba4e96cef0...
commit 09ac17955ba4e96cef087619eb6b9c61429ea28e
Merge: 8d71c0a 6847fad
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Merge branch 'master' of
git://git.netsurf-browser.org/netsurf into
chris/fix-palmap-crash
Conflicts:
amiga/bitmap.c
diff --cc amiga/bitmap.c
index c57fb8f,dd6a91b..73cb4e3
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@@ -558,7 -534,7 +558,11 @@@ struct BitMap *ami_bitmap_get_native(st
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
++<<<<<<< HEAD
+// if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
++=======
+ if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
++>>>>>>> 6847fad65368bab3418eb716af4f9d485dfe30b1
struct redraw_context ctx = {
.interactive = false,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=8d71c0ae9e48695b14f...
commit 8d71c0ae9e48695b14f24a62d3655f11858bba95
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
track type of native bitmap
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index ae9479d..c57fb8f 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -46,6 +46,13 @@
#include "amiga/misc.h"
#include "amiga/rtg.h"
+enum {
+ AMI_NSBM_NONE = 0,
+ AMI_NSBM_TRUECOLOUR,
+ AMI_NSBM_PALETTEMAPPED
+};
+
+
/* exported function documented in amiga/bitmap.h */
void *amiga_bitmap_create(int width, int height, unsigned int state)
{
@@ -69,6 +76,7 @@ void *amiga_bitmap_create(int width, int height, unsigned int state)
bitmap->url = NULL;
bitmap->title = NULL;
bitmap->icondata = NULL;
+ bitmap->native = AMI_NSBM_NONE;
return bitmap;
}
@@ -163,6 +171,7 @@ void amiga_bitmap_modified(void *bitmap)
bm->nativebm = NULL;
bm->dto = NULL;
bm->native_mask = NULL;
+ bm->native = AMI_NSBM_NONE;
}
@@ -353,6 +362,10 @@ static inline struct BitMap *ami_bitmap_get_truecolour(struct bitmap
*bitmap,int
if(!bitmap) return NULL;
+ if((bitmap->native != AMI_NSBM_NONE) && (bitmap->native !=
AMI_NSBM_TRUECOLOUR)) {
+ amiga_bitmap_modified(bitmap);
+ }
+
if(bitmap->nativebm)
{
if((bitmap->nativebmwidth == width) && (bitmap->nativebmheight==height))
@@ -384,6 +397,7 @@ static inline struct BitMap *ami_bitmap_get_truecolour(struct bitmap
*bitmap,int
bitmap->nativebm = tbm;
bitmap->nativebmwidth = bitmap->width;
bitmap->nativebmheight = bitmap->height;
+ bitmap->native = AMI_NSBM_TRUECOLOUR;
}
}
@@ -436,12 +450,14 @@ static inline struct BitMap *ami_bitmap_get_truecolour(struct bitmap
*bitmap,int
ami_rtg_freebitmap(tbm);
tbm = scaledbm;
bitmap->nativebm = NULL;
+ bitmap->native = AMI_NSBM_NONE;
if(nsoption_int(cache_bitmaps) >= 1)
{
bitmap->nativebm = tbm;
bitmap->nativebmwidth = width;
bitmap->nativebmheight = height;
+ bitmap->native = AMI_NSBM_TRUECOLOUR;
}
}
@@ -482,7 +498,11 @@ static inline struct BitMap *ami_bitmap_get_palettemapped(struct
bitmap *bitmap,
int width, int height)
{
struct BitMap *dtbm;
-
+
+ if((bitmap->native != AMI_NSBM_NONE) && (bitmap->native !=
AMI_NSBM_PALETTEMAPPED)) {
+ amiga_bitmap_modified(bitmap);
+ }
+
/* Dispose the DataTypes object if we've performed a layout already,
and we need to scale, as scaling can only be performed before
the first GM_LAYOUT */
@@ -519,6 +539,10 @@ static inline struct BitMap *ami_bitmap_get_palettemapped(struct
bitmap *bitmap,
bitmap->nativebmwidth = width;
bitmap->nativebmheight = height;
+ /**\todo Native bitmaps are stored as DataTypes Objects here?
+ This is sub-optimal and they should be cached as BitMaps according to user
+ preferences */
+ bitmap->native = AMI_NSBM_PALETTEMAPPED;
return dtbm;
}
@@ -534,11 +558,7 @@ struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
- int plot_width;
- int plot_height;
- struct MinList shared_pens;
- struct gui_globals bm_globals;
- struct gui_globals *temp_gg = glob;
+// if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
struct redraw_context ctx = {
.interactive = false,
@@ -546,13 +566,18 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
.plot = &amiplot
};
+ int plot_width;
+ int plot_height;
+ struct gui_globals bm_globals;
+ struct gui_globals *temp_gg = glob;
+// struct MinList *shared_pens = ami_AllocMinList();
+
plot_width = MIN(content_get_width(content), bitmap->width);
plot_height = ((plot_width * bitmap->height) + (bitmap->width / 2)) /
bitmap->width;
- ami_init_layers(&bm_globals, bitmap->width, bitmap->height);
- ami_NewMinList(&shared_pens);
- bm_globals.shared_pens = &shared_pens;
+ ami_init_layers(&bm_globals, bitmap->width, bitmap->height, true);
+// bm_globals.shared_pens = shared_pens;
glob = &bm_globals;
ami_clearclipreg(&bm_globals);
@@ -582,7 +607,8 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
to try to avoid re-conversion (at the expense of memory) */
ami_free_layers(&bm_globals);
- ami_plot_release_pens(&shared_pens);
+// ami_plot_release_pens(shared_pens);
+// FreeVec(shared_pens);
amiga_bitmap_set_opaque(bitmap, true);
/* Restore previous render area. This is set when plotting starts,
-----------------------------------------------------------------------
Summary of changes:
amiga/bitmap.c | 35 +++++++++++++++++++++++++++--------
amiga/bitmap.h | 1 +
amiga/plotters.c | 4 ++--
3 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index dd6a91b..b98d95f 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -46,6 +46,13 @@
#include "amiga/misc.h"
#include "amiga/rtg.h"
+enum {
+ AMI_NSBM_NONE = 0,
+ AMI_NSBM_TRUECOLOUR,
+ AMI_NSBM_PALETTEMAPPED
+};
+
+
/* exported function documented in amiga/bitmap.h */
void *amiga_bitmap_create(int width, int height, unsigned int state)
{
@@ -69,6 +76,7 @@ void *amiga_bitmap_create(int width, int height, unsigned int state)
bitmap->url = NULL;
bitmap->title = NULL;
bitmap->icondata = NULL;
+ bitmap->native = AMI_NSBM_NONE;
return bitmap;
}
@@ -163,6 +171,7 @@ void amiga_bitmap_modified(void *bitmap)
bm->nativebm = NULL;
bm->dto = NULL;
bm->native_mask = NULL;
+ bm->native = AMI_NSBM_NONE;
}
@@ -353,6 +362,10 @@ static inline struct BitMap *ami_bitmap_get_truecolour(struct bitmap
*bitmap,int
if(!bitmap) return NULL;
+ if((bitmap->native != AMI_NSBM_NONE) && (bitmap->native !=
AMI_NSBM_TRUECOLOUR)) {
+ amiga_bitmap_modified(bitmap);
+ }
+
if(bitmap->nativebm)
{
if((bitmap->nativebmwidth == width) && (bitmap->nativebmheight==height))
@@ -384,6 +397,7 @@ static inline struct BitMap *ami_bitmap_get_truecolour(struct bitmap
*bitmap,int
bitmap->nativebm = tbm;
bitmap->nativebmwidth = bitmap->width;
bitmap->nativebmheight = bitmap->height;
+ bitmap->native = AMI_NSBM_TRUECOLOUR;
}
}
@@ -436,12 +450,14 @@ static inline struct BitMap *ami_bitmap_get_truecolour(struct bitmap
*bitmap,int
ami_rtg_freebitmap(tbm);
tbm = scaledbm;
bitmap->nativebm = NULL;
+ bitmap->native = AMI_NSBM_NONE;
if(nsoption_int(cache_bitmaps) >= 1)
{
bitmap->nativebm = tbm;
bitmap->nativebmwidth = width;
bitmap->nativebmheight = height;
+ bitmap->native = AMI_NSBM_TRUECOLOUR;
}
}
@@ -482,7 +498,11 @@ static inline struct BitMap *ami_bitmap_get_palettemapped(struct
bitmap *bitmap,
int width, int height)
{
struct BitMap *dtbm;
-
+
+ if((bitmap->native != AMI_NSBM_NONE) && (bitmap->native !=
AMI_NSBM_PALETTEMAPPED)) {
+ amiga_bitmap_modified(bitmap);
+ }
+
/* Dispose the DataTypes object if we've performed a layout already,
and we need to scale, as scaling can only be performed before
the first GM_LAYOUT */
@@ -519,6 +539,10 @@ static inline struct BitMap *ami_bitmap_get_palettemapped(struct
bitmap *bitmap,
bitmap->nativebmwidth = width;
bitmap->nativebmheight = height;
+ /**\todo Native bitmaps are stored as DataTypes Objects here?
+ This is sub-optimal and they should be cached as BitMaps according to user
+ preferences */
+ bitmap->native = AMI_NSBM_PALETTEMAPPED;
return dtbm;
}
@@ -534,8 +558,6 @@ struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content)
{
- if(ami_plot_screen_is_palettemapped() == true) return NSERROR_OK;
-
struct redraw_context ctx = {
.interactive = false,
.background_images = true,
@@ -546,14 +568,13 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
int plot_height;
struct gui_globals bm_globals;
struct gui_globals *temp_gg = glob;
-// struct MinList *shared_pens = ami_AllocMinList();
plot_width = MIN(content_get_width(content), bitmap->width);
plot_height = ((plot_width * bitmap->height) + (bitmap->width / 2)) /
bitmap->width;
ami_init_layers(&bm_globals, bitmap->width, bitmap->height, true);
-// bm_globals.shared_pens = shared_pens;
+ bm_globals.shared_pens = NULL;
glob = &bm_globals;
ami_clearclipreg(&bm_globals);
@@ -576,15 +597,13 @@ static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle
*content)
ami_bitmap_argb_to_rgba(bitmap);
#else
-#warning FIXME for OS3
+#warning FIXME for OS3 (in current state none of bitmap_render can work!)
#endif
/**\todo In theory we should be able to move the bitmap to our native area
to try to avoid re-conversion (at the expense of memory) */
ami_free_layers(&bm_globals);
-// ami_plot_release_pens(shared_pens);
-// FreeVec(shared_pens);
amiga_bitmap_set_opaque(bitmap, true);
/* Restore previous render area. This is set when plotting starts,
diff --git a/amiga/bitmap.h b/amiga/bitmap.h
index 20e6315..aba3597 100755
--- a/amiga/bitmap.h
+++ b/amiga/bitmap.h
@@ -35,6 +35,7 @@ struct bitmap {
int height;
UBYTE *pixdata;
bool opaque;
+ int native;
struct BitMap *nativebm;
int nativebmwidth;
int nativebmheight;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index bb69dce..c6c546b 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -142,7 +142,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height, bool for
} else {
/* Force friend BitMaps on for obvious RTG screens under OS3.
* If we get a bit smarter about this we can lose the user option. */
- if(depth >= 16) friend = scrn->RastPort.BitMap;
+ if((depth >= 16) && (force32bit == false)) friend =
scrn->RastPort.BitMap;
}
#endif
@@ -154,7 +154,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG
height, bool for
* We get freezes and other problems on OS4 if we befriend at any
* other depths, hence this check.
*/
- if(depth >= 24) friend = scrn->RastPort.BitMap;
+ if((depth >= 24) && (force32bit == false)) friend =
scrn->RastPort.BitMap;
#endif
gg->bm = ami_rtg_allocbitmap(width, height, 32, 0, friend, RGBFB_A8R8G8B8);
}
--
NetSurf Browser