Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/0ce133099b7b4eff3b77cdabb164de0d406f5a62
...commit
http://git.netsurf-browser.org/netsurf.git/commit/0ce133099b7b4eff3b77cdabb164de0d406f5a62
...tree
http://git.netsurf-browser.org/netsurf.git/tree/0ce133099b7b4eff3b77cdabb164de0d406f5a62
The branch, chris/palette-mapped-plotters has been updated
via 0ce133099b7b4eff3b77cdabb164de0d406f5a62 (commit)
via 6ceb8ca9ebacc16a39e4ce93843df62e40e79bbf (commit)
via 8c6dab520d92b4149fd74c01f883bdc87245fd5c (commit)
via 1ef7336f22c5751f8dd35c60d2e34fe0f49af455 (commit)
via 6d602b103e317a2e69618681ae0216d541b7b7af (commit)
via b777549cc2ed940d65934eb34d4aedb0652037fa (commit)
from ff8d7d974c74e139f06791bef2aa85af22e0f122 (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/commitdiff/0ce133099b7b4eff3b77cdabb164de0d406f5a62
commit 0ce133099b7b4eff3b77cdabb164de0d406f5a62
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
fix true colour mode
diff --git a/amiga/plotters.c b/amiga/plotters.c
index ff7aa09..6ca3120 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -274,7 +274,7 @@ static void ami_plot_setapen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_APenColor,
- p96EncodeColor(RGBFF_A8B8G8R8, colour),
+ p96EncodeColor(RGBFB_A8B8G8R8, colour),
TAG_DONE);
} else {
ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
@@ -286,7 +286,7 @@ static void ami_plot_setopen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_OPenColor,
- p96EncodeColor(RGBFF_A8B8G8R8, colour),
+ p96EncodeColor(RGBFB_A8B8G8R8, colour),
TAG_DONE);
} else {
ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/6ceb8ca9ebacc16a39e4ce93843df62e40e79bbf
commit 6ceb8ca9ebacc16a39e4ce93843df62e40e79bbf
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
fix depth detection
diff --git a/amiga/plotters.c b/amiga/plotters.c
index e784e5c..ff7aa09 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -136,15 +136,12 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
struct DrawInfo *dri;
struct BitMap *friend = NULL; /* Required to be NULL for Cairo and ARGB
bitmaps */
- if(dri = GetScreenDrawInfo(scrn)) {
- if((dri->dri_Depth < 16) || (nsoption_int(cairo_renderer) ==
-1)) {
- palette_mapped = true;
- depth = dri->dri_Depth; /* this is always wrong */
- // friend = scrn->RastPort.BitMap;
- } else {
- palette_mapped = false;
- }
- FreeScreenDrawInfo(scrn, dri);
+ depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH);
+ if((depth < 16) || (nsoption_int(cairo_renderer) == -1)) {
+ palette_mapped = true;
+ // friend = scrn->RastPort.BitMap;
+ } else {
+ palette_mapped = false;
}
if(nsoption_int(redraw_tile_size_x) <= 0)
nsoption_set_int(redraw_tile_size_x, scrn->Width);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/8c6dab520d92b4149fd74c01f883bdc87245fd5c
commit 8c6dab520d92b4149fd74c01f883bdc87245fd5c
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
misc
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index c82c90b..0190ed0 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -117,10 +117,15 @@ void bitmap_destroy(void *bitmap)
if(bm)
{
- if((bm->nativebm) && (bm->dto == NULL))
+ if((bm->nativebm) && (bm->dto == NULL)) {
p96FreeBitMap(bm->nativebm);
+ bm->nativebm = NULL;
+ }
- if(bm->dto) DisposeDTObject(bm->dto);
+ if(bm->dto) {
+ DisposeDTObject(bm->dto);
+ bm->dto = NULL;
+ }
FreeVec(bm->pixdata);
bm->pixdata = NULL;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index cdd5aac..e784e5c 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -686,7 +686,7 @@ static bool ami_bitmap(int x, int y, int width, int height,
struct bitmap *bitma
} else {
tag = BLITA_MaskPlane;
tag_data = (ULONG)bitmap->native_mask;
- minterm = 0xc0; /* Should be (ABC|ABNC|ANBC) */
+ minterm = 0xc0; /* should be (ABC|ABNC|ANBC); */
}
BltBitMapTags(BLITA_Width,width,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/1ef7336f22c5751f8dd35c60d2e34fe0f49af455
commit 1ef7336f22c5751f8dd35c60d2e34fe0f49af455
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
revert begin/endrefresh image avoidance - this isn't the cause of the
simplerefresh damage region deadlock
diff --git a/amiga/gui.c b/amiga/gui.c
index 03ca8a9..5d14521 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3562,7 +3562,6 @@ void ami_refresh_window(struct gui_window_2 *gwin)
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER], (ULONG
*)&bbox);
- browserglob.locked_layers = true;
BeginRefresh(gwin->win);
x0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinX - bbox->Left) /
@@ -3595,7 +3594,6 @@ void ami_refresh_window(struct gui_window_2 *gwin)
}
EndRefresh(gwin->win, TRUE);
- browserglob.locked_layers = false;
}
void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 3aef043..cdd5aac 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -194,8 +194,6 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
gg->surface = cairo_amigaos_surface_create(gg->rp->BitMap);
gg->cr = cairo_create(gg->surface);
#endif
-
- gg->locked_layers = false;
}
void ami_free_layers(struct gui_globals *gg)
@@ -650,8 +648,7 @@ static bool ami_bitmap(int x, int y, int width, int height,
struct bitmap *bitma
if(palette_mapped == false) {
tbm = ami_getcachenativebm(bitmap, width, height,
glob->rp->BitMap);
} else {
- if(glob->locked_layers == false)
- tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
+ tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
}
if(!tbm) return true;
@@ -740,8 +737,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
if(palette_mapped == false) {
tbm =
ami_getcachenativebm(bitmap,width,height,glob->rp->BitMap);
} else {
- if(glob->locked_layers == false)
- tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
+ tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
}
if(!tbm) return true;
diff --git a/amiga/plotters.h b/amiga/plotters.h
index b51aad2..94dfaee 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -34,7 +34,6 @@ struct gui_globals
APTR tmprasbuf;
struct Rectangle rect;
struct MinList *shared_pens;
- bool locked_layers;
#ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/6d602b103e317a2e69618681ae0216d541b7b7af
commit 6d602b103e317a2e69618681ae0216d541b7b7af
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
release the pen if it couldn't be added to a list.
diff --git a/amiga/plotters.c b/amiga/plotters.c
index c5020da..3aef043 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -251,7 +251,10 @@ static ULONG ami_plot_obtain_pen(struct MinList
*shared_pens, ULONG colour)
MEMF_PRIVATE | MEMF_CLEAR)) {
AddTail((struct List *)shared_pens, (struct Node
*)node);
}
- }
+ } else {
+ /* Immediately release the pen if we can't keep track of it. */
+ ReleasePen(scrn->ViewPort.ColorMap, pen);
+ }
return pen;
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/b777549cc2ed940d65934eb34d4aedb0652037fa
commit b777549cc2ed940d65934eb34d4aedb0652037fa
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
avoid crash if pen list is not set
diff --git a/amiga/gui.c b/amiga/gui.c
index 6278f28..03ca8a9 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3523,6 +3523,7 @@ void ami_do_redraw(struct gui_window_2 *g)
}
else
{
+ browserglob.shared_pens = &g->shared_pens;
temprp = browserglob.rp;
browserglob.rp = g->win->RPort;
clip.x0 = bbox->Left;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 0078f0c..c5020da 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -246,11 +246,12 @@ static ULONG ami_plot_obtain_pen(struct MinList
*shared_pens, ULONG colour)
if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx",
colour));
- if(node = (struct ami_plot_pen *)AllocVec(sizeof(struct ami_plot_pen),
- MEMF_PRIVATE | MEMF_CLEAR)) {
- AddTail((struct List *)shared_pens, (struct Node *)node);
- }
-
+ if(shared_pens != NULL) {
+ if(node = (struct ami_plot_pen *)AllocVec(sizeof(struct
ami_plot_pen),
+ MEMF_PRIVATE | MEMF_CLEAR)) {
+ AddTail((struct List *)shared_pens, (struct Node
*)node);
+ }
+ }
return pen;
}
diff --git a/amiga/plotters.h b/amiga/plotters.h
index e1d2d04..b51aad2 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -35,7 +35,7 @@ struct gui_globals
struct Rectangle rect;
struct MinList *shared_pens;
bool locked_layers;
- #ifdef NS_AMIGA_CAIRO
+#ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
#endif
-----------------------------------------------------------------------
Summary of changes:
amiga/bitmap.c | 9 +++++++--
amiga/gui.c | 3 +--
amiga/plotters.c | 41 +++++++++++++++++++----------------------
amiga/plotters.h | 3 +--
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index c82c90b..0190ed0 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -117,10 +117,15 @@ void bitmap_destroy(void *bitmap)
if(bm)
{
- if((bm->nativebm) && (bm->dto == NULL))
+ if((bm->nativebm) && (bm->dto == NULL)) {
p96FreeBitMap(bm->nativebm);
+ bm->nativebm = NULL;
+ }
- if(bm->dto) DisposeDTObject(bm->dto);
+ if(bm->dto) {
+ DisposeDTObject(bm->dto);
+ bm->dto = NULL;
+ }
FreeVec(bm->pixdata);
bm->pixdata = NULL;
diff --git a/amiga/gui.c b/amiga/gui.c
index 6278f28..5d14521 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3523,6 +3523,7 @@ void ami_do_redraw(struct gui_window_2 *g)
}
else
{
+ browserglob.shared_pens = &g->shared_pens;
temprp = browserglob.rp;
browserglob.rp = g->win->RPort;
clip.x0 = bbox->Left;
@@ -3561,7 +3562,6 @@ void ami_refresh_window(struct gui_window_2 *gwin)
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER], (ULONG
*)&bbox);
- browserglob.locked_layers = true;
BeginRefresh(gwin->win);
x0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinX - bbox->Left) /
@@ -3594,7 +3594,6 @@ void ami_refresh_window(struct gui_window_2 *gwin)
}
EndRefresh(gwin->win, TRUE);
- browserglob.locked_layers = false;
}
void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 0078f0c..6ca3120 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -136,15 +136,12 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
struct DrawInfo *dri;
struct BitMap *friend = NULL; /* Required to be NULL for Cairo and ARGB
bitmaps */
- if(dri = GetScreenDrawInfo(scrn)) {
- if((dri->dri_Depth < 16) || (nsoption_int(cairo_renderer) ==
-1)) {
- palette_mapped = true;
- depth = dri->dri_Depth; /* this is always wrong */
- // friend = scrn->RastPort.BitMap;
- } else {
- palette_mapped = false;
- }
- FreeScreenDrawInfo(scrn, dri);
+ depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH);
+ if((depth < 16) || (nsoption_int(cairo_renderer) == -1)) {
+ palette_mapped = true;
+ // friend = scrn->RastPort.BitMap;
+ } else {
+ palette_mapped = false;
}
if(nsoption_int(redraw_tile_size_x) <= 0)
nsoption_set_int(redraw_tile_size_x, scrn->Width);
@@ -194,8 +191,6 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
gg->surface = cairo_amigaos_surface_create(gg->rp->BitMap);
gg->cr = cairo_create(gg->surface);
#endif
-
- gg->locked_layers = false;
}
void ami_free_layers(struct gui_globals *gg)
@@ -246,11 +241,15 @@ static ULONG ami_plot_obtain_pen(struct MinList
*shared_pens, ULONG colour)
if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx",
colour));
- if(node = (struct ami_plot_pen *)AllocVec(sizeof(struct ami_plot_pen),
- MEMF_PRIVATE | MEMF_CLEAR)) {
- AddTail((struct List *)shared_pens, (struct Node *)node);
+ if(shared_pens != NULL) {
+ if(node = (struct ami_plot_pen *)AllocVec(sizeof(struct
ami_plot_pen),
+ MEMF_PRIVATE | MEMF_CLEAR)) {
+ AddTail((struct List *)shared_pens, (struct Node
*)node);
+ }
+ } else {
+ /* Immediately release the pen if we can't keep track of it. */
+ ReleasePen(scrn->ViewPort.ColorMap, pen);
}
-
return pen;
}
@@ -275,7 +274,7 @@ static void ami_plot_setapen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_APenColor,
- p96EncodeColor(RGBFF_A8B8G8R8, colour),
+ p96EncodeColor(RGBFB_A8B8G8R8, colour),
TAG_DONE);
} else {
ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
@@ -287,7 +286,7 @@ static void ami_plot_setopen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_OPenColor,
- p96EncodeColor(RGBFF_A8B8G8R8, colour),
+ p96EncodeColor(RGBFB_A8B8G8R8, colour),
TAG_DONE);
} else {
ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
@@ -646,8 +645,7 @@ static bool ami_bitmap(int x, int y, int width, int height,
struct bitmap *bitma
if(palette_mapped == false) {
tbm = ami_getcachenativebm(bitmap, width, height,
glob->rp->BitMap);
} else {
- if(glob->locked_layers == false)
- tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
+ tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
}
if(!tbm) return true;
@@ -685,7 +683,7 @@ static bool ami_bitmap(int x, int y, int width, int height,
struct bitmap *bitma
} else {
tag = BLITA_MaskPlane;
tag_data = (ULONG)bitmap->native_mask;
- minterm = 0xc0; /* Should be (ABC|ABNC|ANBC) */
+ minterm = 0xc0; /* should be (ABC|ABNC|ANBC); */
}
BltBitMapTags(BLITA_Width,width,
@@ -736,8 +734,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
if(palette_mapped == false) {
tbm =
ami_getcachenativebm(bitmap,width,height,glob->rp->BitMap);
} else {
- if(glob->locked_layers == false)
- tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
+ tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
}
if(!tbm) return true;
diff --git a/amiga/plotters.h b/amiga/plotters.h
index e1d2d04..94dfaee 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -34,8 +34,7 @@ struct gui_globals
APTR tmprasbuf;
struct Rectangle rect;
struct MinList *shared_pens;
- bool locked_layers;
- #ifdef NS_AMIGA_CAIRO
+#ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
#endif
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org