summaryrefslogtreecommitdiff
path: root/frontends/amiga/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/amiga/bitmap.c')
-rw-r--r--frontends/amiga/bitmap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 95e99aa5b..31448d6cc 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -727,29 +727,29 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte
int plot_width;
int plot_height;
- struct gui_globals bm_globals;
+ struct gui_globals *bm_globals;
+
+ plot_width = MIN(content_get_width(content), bitmap->width);
+ plot_height = ((plot_width * bitmap->height) + (bitmap->width / 2)) /
+ bitmap->width;
+
+ bm_globals = ami_plot_ra_alloc(bitmap->width, bitmap->height, true);
+ ami_clearclipreg(bm_globals);
struct redraw_context ctx = {
.interactive = false,
.background_images = true,
.plot = &amiplot,
- .priv = &bm_globals
+ .priv = bm_globals
};
- 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);
- ami_clearclipreg(&bm_globals);
-
content_scaled_redraw(content, plot_width, plot_height, &ctx);
BltBitMapTags( BLITA_SrcX, 0,
BLITA_SrcY, 0,
BLITA_Width, bitmap->width,
BLITA_Height, bitmap->height,
- BLITA_Source, bm_globals.bm,
+ BLITA_Source, ami_plot_ra_get_bitmap(bm_globals),
BLITA_SrcType, BLITT_BITMAP,
BLITA_Dest, amiga_bitmap_get_buffer(bitmap),
BLITA_DestType, BLITT_ARGB32,
@@ -763,7 +763,7 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte
/**\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_ra_free(bm_globals);
amiga_bitmap_set_opaque(bitmap, true);
#else
#warning FIXME for OS3 (in current state none of bitmap_render can work!)