Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/ff8d7d974c74e139f06791bef2aa85af22e0f122
...commit
http://git.netsurf-browser.org/netsurf.git/commit/ff8d7d974c74e139f06791bef2aa85af22e0f122
...tree
http://git.netsurf-browser.org/netsurf.git/tree/ff8d7d974c74e139f06791bef2aa85af22e0f122
The branch, chris/palette-mapped-plotters has been updated
via ff8d7d974c74e139f06791bef2aa85af22e0f122 (commit)
via b2514d5270ab2bdb0af3b7d976344a62c93bf213 (commit)
via 82c4ea7686747dbb202ceefd660b1a8574ed5669 (commit)
from a423eb712dc387b879f62826fd36325110470ec8 (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/ff8d7d974c74e139f06791bef2aa85af22e0f122
commit ff8d7d974c74e139f06791bef2aa85af22e0f122
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Avoid redrawing palette-mapped images during BeginRefresh/EndRefresh (ie.
SimpleRefresh damage redraw) as one of the DataTypes functions are causing an
Intuition deadlock.
diff --git a/amiga/gui.c b/amiga/gui.c
index d772105..6278f28 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3561,6 +3561,7 @@ 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) /
@@ -3593,6 +3594,7 @@ 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 5825f4c..0078f0c 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -194,6 +194,8 @@ 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)
@@ -644,7 +646,8 @@ 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 {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
+ if(glob->locked_layers == false)
+ tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
}
if(!tbm) return true;
@@ -733,7 +736,8 @@ 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 {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
+ if(glob->locked_layers == false)
+ tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
}
if(!tbm) return true;
diff --git a/amiga/plotters.h b/amiga/plotters.h
index 94dfaee..e1d2d04 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -34,7 +34,8 @@ struct gui_globals
APTR tmprasbuf;
struct Rectangle rect;
struct MinList *shared_pens;
-#ifdef NS_AMIGA_CAIRO
+ bool locked_layers;
+ #ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
#endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/b2514d5270ab2bdb0af3b7d976344a62c93bf213
commit b2514d5270ab2bdb0af3b7d976344a62c93bf213
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Free source BitMap
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 8f12a46..c82c90b 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -487,6 +487,7 @@ struct BitMap *ami_bitmap_get_palettemapped(struct bitmap
*bitmap,
PDTA_Screen, scrn,
PDTA_ScaleQuality, nsoption_bool(scale_quality),
PDTA_DitherQuality,
nsoption_int(dither_quality),
+ PDTA_FreeSourceBitMap, TRUE,
TAG_DONE);
if((bitmap->width != width) || (bitmap->height != height)) {
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/82c4ea7686747dbb202ceefd660b1a8574ed5669
commit 82c4ea7686747dbb202ceefd660b1a8574ed5669
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
add to list, and release pens
diff --git a/amiga/plotters.c b/amiga/plotters.c
index ab880db..5825f4c 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -54,6 +54,11 @@ struct bfbitmap {
APTR mask;
};
+struct ami_plot_pen {
+ struct MinNode node;
+ ULONG pen;
+};
+
bool palette_mapped = false;
#ifndef M_PI /* For some reason we don't always get this from math.h */
@@ -228,8 +233,9 @@ void ami_clearclipreg(struct gui_globals *gg)
gg->rect.MaxY = scrn->Height-1;
}
-ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
+static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
{
+ struct ami_plot_pen *node;
ULONG pen = ObtainBestPenA(scrn->ViewPort.ColorMap,
(colour & 0x000000ff) << 24,
(colour & 0x0000ff00) << 16,
@@ -237,18 +243,33 @@ ULONG ami_plot_obtain_pen(struct MinList *shared_pens,
ULONG colour)
NULL);
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);
+ }
- /* TODO: add allocated pen to list */
-
return pen;
}
void ami_plot_release_pens(struct MinList *shared_pens)
{
- /* TODO: trawl through list releasing pens */
+ struct ami_plot_pen *node;
+ struct ami_plot_pen *nnode;
+
+ if(IsMinListEmpty(shared_pens)) return;
+ node = (struct ami_plot_pen *)GetHead((struct List *)shared_pens);
+
+ do
+ {
+ nnode = (struct ami_plot_pen *)GetSucc((struct Node *)node);
+ ReleasePen(scrn->ViewPort.ColorMap, node->pen);
+ Remove((struct Node *)node);
+ FreeVec(node);
+ }while(node = nnode);
}
-void ami_plot_setapen(ULONG colour)
+static void ami_plot_setapen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_APenColor,
@@ -260,7 +281,7 @@ void ami_plot_setapen(ULONG colour)
}
}
-void ami_plot_setopen(ULONG colour)
+static void ami_plot_setopen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_OPenColor,
-----------------------------------------------------------------------
Summary of changes:
amiga/bitmap.c | 1 +
amiga/gui.c | 2 ++
amiga/plotters.c | 41 +++++++++++++++++++++++++++++++++--------
amiga/plotters.h | 3 ++-
4 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 8f12a46..c82c90b 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -487,6 +487,7 @@ struct BitMap *ami_bitmap_get_palettemapped(struct bitmap
*bitmap,
PDTA_Screen, scrn,
PDTA_ScaleQuality, nsoption_bool(scale_quality),
PDTA_DitherQuality,
nsoption_int(dither_quality),
+ PDTA_FreeSourceBitMap, TRUE,
TAG_DONE);
if((bitmap->width != width) || (bitmap->height != height)) {
diff --git a/amiga/gui.c b/amiga/gui.c
index d772105..6278f28 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3561,6 +3561,7 @@ 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) /
@@ -3593,6 +3594,7 @@ 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 ab880db..0078f0c 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -54,6 +54,11 @@ struct bfbitmap {
APTR mask;
};
+struct ami_plot_pen {
+ struct MinNode node;
+ ULONG pen;
+};
+
bool palette_mapped = false;
#ifndef M_PI /* For some reason we don't always get this from math.h */
@@ -189,6 +194,8 @@ 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)
@@ -228,8 +235,9 @@ void ami_clearclipreg(struct gui_globals *gg)
gg->rect.MaxY = scrn->Height-1;
}
-ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
+static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
{
+ struct ami_plot_pen *node;
ULONG pen = ObtainBestPenA(scrn->ViewPort.ColorMap,
(colour & 0x000000ff) << 24,
(colour & 0x0000ff00) << 16,
@@ -237,18 +245,33 @@ ULONG ami_plot_obtain_pen(struct MinList *shared_pens,
ULONG colour)
NULL);
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);
+ }
- /* TODO: add allocated pen to list */
-
return pen;
}
void ami_plot_release_pens(struct MinList *shared_pens)
{
- /* TODO: trawl through list releasing pens */
+ struct ami_plot_pen *node;
+ struct ami_plot_pen *nnode;
+
+ if(IsMinListEmpty(shared_pens)) return;
+ node = (struct ami_plot_pen *)GetHead((struct List *)shared_pens);
+
+ do
+ {
+ nnode = (struct ami_plot_pen *)GetSucc((struct Node *)node);
+ ReleasePen(scrn->ViewPort.ColorMap, node->pen);
+ Remove((struct Node *)node);
+ FreeVec(node);
+ }while(node = nnode);
}
-void ami_plot_setapen(ULONG colour)
+static void ami_plot_setapen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_APenColor,
@@ -260,7 +283,7 @@ void ami_plot_setapen(ULONG colour)
}
}
-void ami_plot_setopen(ULONG colour)
+static void ami_plot_setopen(ULONG colour)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_OPenColor,
@@ -623,7 +646,8 @@ 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 {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
+ if(glob->locked_layers == false)
+ tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
}
if(!tbm) return true;
@@ -712,7 +736,8 @@ 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 {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
+ if(glob->locked_layers == false)
+ tbm = ami_bitmap_get_palettemapped(bitmap, width,
height);
}
if(!tbm) return true;
diff --git a/amiga/plotters.h b/amiga/plotters.h
index 94dfaee..e1d2d04 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -34,7 +34,8 @@ struct gui_globals
APTR tmprasbuf;
struct Rectangle rect;
struct MinList *shared_pens;
-#ifdef NS_AMIGA_CAIRO
+ bool locked_layers;
+ #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