summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-02-02 18:28:21 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-02-02 18:28:21 +0000
commit2d157857e182d1e3bbea2afcf7b547e600b4bf54 (patch)
tree0f2133c7316aaf273ec3364c3bcd4ad61fbce21b /amiga
parent7d41e04b61162d3cb1f0032100d29ef7897b2d83 (diff)
downloadnetsurf-2d157857e182d1e3bbea2afcf7b547e600b4bf54.tar.gz
netsurf-2d157857e182d1e3bbea2afcf7b547e600b4bf54.tar.bz2
Revert shared pens support to previously-working state
Diffstat (limited to 'amiga')
-rw-r--r--amiga/gui.c6
-rw-r--r--amiga/plotters.c46
-rw-r--r--amiga/plotters.h4
3 files changed, 16 insertions, 40 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 52fb0ffa8..f13b5672c 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2877,7 +2877,7 @@ void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
return;
}
- ami_plot_release_pens(&browserglob.shared_pens);
+ ami_plot_release_pens(&gwin->shared_pens);
ami_update_buttons(gwin);
ami_menu_update_disabled(gwin->gw, browser_window_get_content(gwin->gw->bw));
@@ -4193,7 +4193,7 @@ static void gui_window_destroy(struct gui_window *g)
return;
}
- ami_plot_release_pens(&browserglob.shared_pens);
+ ami_plot_release_pens(&g->shared->shared_pens);
ami_schedule_redraw_remove(g->shared);
ami_schedule(-1, ami_gui_refresh_favicon, g->shared);
@@ -5072,7 +5072,7 @@ static void gui_window_new_content(struct gui_window *g)
g->shared->oldh = 0;
g->shared->oldv = 0;
g->favicon = NULL;
- ami_plot_release_pens(&browserglob.shared_pens);
+ ami_plot_release_pens(&g->shared->shared_pens);
ami_menu_update_disabled(g, c);
ami_gui_update_hotlist_button(g->shared);
ami_gui_scroller_update(g->shared);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 81bee058a..d6dd6f910 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -216,6 +216,7 @@ void ami_plot_release_pens(struct MinList *shared_pens)
struct ami_plot_pen *node;
struct ami_plot_pen *nnode;
+ if(shared_pens == NULL) return;
if(IsMinListEmpty(shared_pens)) return;
node = (struct ami_plot_pen *)GetHead((struct List *)shared_pens);
@@ -265,7 +266,7 @@ void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox)
}
-bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style)
+static bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_rectangle()"));
@@ -310,7 +311,7 @@ bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style)
return true;
}
-bool ami_line(int x0, int y0, int x1, int y1, const plot_style_t *style)
+static bool ami_line(int x0, int y0, int x1, int y1, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_line()"));
@@ -345,7 +346,7 @@ bool ami_line(int x0, int y0, int x1, int y1, const plot_style_t *style)
return true;
}
-bool ami_polygon(const int *p, unsigned int n, const plot_style_t *style)
+static bool ami_polygon(const int *p, unsigned int n, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_polygon()"));
@@ -368,7 +369,7 @@ bool ami_polygon(const int *p, unsigned int n, const plot_style_t *style)
}
-bool ami_clip(const struct rect *clip)
+static bool ami_clip(const struct rect *clip)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_clip()"));
@@ -395,7 +396,7 @@ bool ami_clip(const struct rect *clip)
return true;
}
-bool ami_text(int x, int y, const char *text, size_t length,
+static bool ami_text(int x, int y, const char *text, size_t length,
const plot_font_style_t *fstyle)
{
#ifdef AMI_PLOTTER_DEBUG
@@ -413,7 +414,7 @@ bool ami_text(int x, int y, const char *text, size_t length,
return true;
}
-bool ami_disc(int x, int y, int radius, const plot_style_t *style)
+static bool ami_disc(int x, int y, int radius, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_disc()"));
@@ -458,7 +459,7 @@ static void ami_arc_gfxlib(int x, int y, int radius, int angle1, int angle2)
}
}
-bool ami_arc(int x, int y, int radius, int angle1, int angle2, const plot_style_t *style)
+static bool ami_arc(int x, int y, int radius, int angle1, int angle2, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_arc()"));
@@ -561,7 +562,7 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma
return true;
}
-bool ami_bitmap_tile(int x, int y, int width, int height,
+static bool ami_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
bitmap_flags_t flags)
{
@@ -723,40 +724,13 @@ static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct Ba
}
#endif
-bool ami_group_start(const char *name)
-{
- /** optional */
- #ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_group_start()"));
- #endif
-
- return false;
-}
-
-bool ami_group_end(void)
-{
- /** optional */
- #ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_group_end()"));
- #endif
- return false;
-}
-
-bool ami_flush(void)
-{
- #ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_flush()"));
- #endif
- return true;
-}
-
static void ami_bezier(struct bez_point *a, struct bez_point *b, struct bez_point *c,
struct bez_point *d, double t, struct bez_point *p) {
p->x = pow((1 - t), 3) * a->x + 3 * t * pow((1 -t), 2) * b->x + 3 * (1-t) * pow(t, 2)* c->x + pow (t, 3)* d->x;
p->y = pow((1 - t), 3) * a->y + 3 * t * pow((1 -t), 2) * b->y + 3 * (1-t) * pow(t, 2)* c->y + pow (t, 3)* d->y;
}
-bool ami_path(const float *p, unsigned int n, colour fill, float width,
+static bool ami_path(const float *p, unsigned int n, colour fill, float width,
colour c, const float transform[6])
{
unsigned int i;
diff --git a/amiga/plotters.h b/amiga/plotters.h
index a6087d1e1..f286b98c5 100644
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -22,6 +22,8 @@
#include <proto/layers.h>
#include <proto/graphics.h>
+struct IBox;
+
struct gui_globals
{
struct BitMap *bm;
@@ -30,7 +32,7 @@ struct gui_globals
APTR areabuf;
APTR tmprasbuf;
struct Rectangle rect;
- struct MinList *shared_pens; /**\todo move this to gui_window_2 */
+ struct MinList *shared_pens;
};
extern const struct plotter_table amiplot;