diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-02-13 00:18:32 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-02-13 00:18:32 +0000 |
commit | edaa9c29f22a550ddc7c8e1f02ff6d9dedf9a5b1 (patch) | |
tree | b5e5c8acfc567da678cf7ffd85b11e030942d221 /frontends/amiga/bitmap.c | |
parent | 7b9fa8d7eb60950401065a81efffebd10d84309a (diff) | |
download | netsurf-edaa9c29f22a550ddc7c8e1f02ff6d9dedf9a5b1.tar.gz netsurf-edaa9c29f22a550ddc7c8e1f02ff6d9dedf9a5b1.tar.bz2 |
Remove use of global context data from Amiga frontend
Diffstat (limited to 'frontends/amiga/bitmap.c')
-rw-r--r-- | frontends/amiga/bitmap.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c index 5fc772ba3..95e99aa5b 100644 --- a/frontends/amiga/bitmap.c +++ b/frontends/amiga/bitmap.c @@ -725,25 +725,22 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte #ifdef __amigaos4__ LOG("Entering bitmap_render"); + int plot_width; + int plot_height; + struct gui_globals bm_globals; + struct redraw_context ctx = { .interactive = false, .background_images = true, - .plot = &amiplot + .plot = &amiplot, + .priv = &bm_globals }; - int plot_width; - int plot_height; - struct gui_globals bm_globals; - struct gui_globals *temp_gg = glob; - 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 = NULL; - - glob = &bm_globals; ami_clearclipreg(&bm_globals); content_scaled_redraw(content, plot_width, plot_height, &ctx); @@ -768,12 +765,6 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte ami_free_layers(&bm_globals); amiga_bitmap_set_opaque(bitmap, true); - - /* 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. - */ - glob = temp_gg; #else #warning FIXME for OS3 (in current state none of bitmap_render can work!) #endif |