From db9144230426e9dfa0203ddd4f98568f48160fd6 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 1 Mar 2015 11:48:21 +0000 Subject: Remove branches that can't be taken under OS3 Micro-optimise these for OS4.1 Remove dummy compositing defines from os3support.h --- amiga/plotters.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'amiga/plotters.c') diff --git a/amiga/plotters.c b/amiga/plotters.c index 660dea74d..256f47747 100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -501,10 +501,9 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma LOG(("[ami_plotter] ami_bitmap() got native bitmap")); #endif - if((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false) && - (nsoption_bool(direct_render) == false)) - { #ifdef __amigaos4__ + if(__builtin_expect((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false) && + (nsoption_bool(direct_render) == false), 1)) { uint32 comptype = COMPOSITE_Src_Over_Dest; uint32 compflags = COMPFLAG_IgnoreDestAlpha; if(bitmap_get_opaque(bitmap)) { @@ -524,9 +523,9 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma COMPTAG_OffsetY,y, COMPTAG_FriendBitMap, scrn->RastPort.BitMap, TAG_DONE); -#endif } else +#endif { ULONG tag, tag_data, minterm = 0xc0; @@ -710,10 +709,9 @@ static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct Ba /* tile down and across to extents (bfmsg->Bounds.MinX)*/ for (xf = -bfbm->offsetx; xf < bfmsg->Bounds.MaxX; xf += bfbm->width) { for (yf = -bfbm->offsety; yf < bfmsg->Bounds.MaxY; yf += bfbm->height) { - - if((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false)) - { #ifdef __amigaos4__ + if(__builtin_expect((GfxBase->LibNode.lib_Version >= 53) && + (palette_mapped == false), 1)) { CompositeTags(COMPOSITE_Src_Over_Dest, bfbm->bm, rp->BitMap, COMPTAG_Flags, COMPFLAG_IgnoreDestAlpha, COMPTAG_DestX,bfmsg->Bounds.MinX, @@ -726,9 +724,9 @@ static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct Ba COMPTAG_OffsetY,yf, COMPTAG_FriendBitMap, scrn->RastPort.BitMap, TAG_DONE); -#endif } else +#endif { ULONG tag, tag_data, minterm = 0xc0; -- cgit v1.2.3