Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/34154ebb99c9ce199e6c9c9ed5993e017023c697
...commit
http://git.netsurf-browser.org/netsurf.git/commit/34154ebb99c9ce199e6c9c9ed5993e017023c697
...tree
http://git.netsurf-browser.org/netsurf.git/tree/34154ebb99c9ce199e6c9c9ed5993e017023c697
The branch, chris/palette-mapped-plotters has been updated
via 34154ebb99c9ce199e6c9c9ed5993e017023c697 (commit)
via 1ceced6e673cd9e573bd1a0475fa8357296b3289 (commit)
from 5a055e3b05925a4b482ff2fc1e4d18d57825df59 (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/34154ebb99c9ce199e6c9c9ed5993e017023c697
commit 34154ebb99c9ce199e6c9c9ed5993e017023c697
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Disable anti-aliasing for palette-mapped modes
diff --git a/amiga/font.c b/amiga/font.c
index 19d6dd1..ffecf85 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -79,7 +79,7 @@ ULONG ami_devicedpi;
ULONG ami_xdpi;
int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp,
- uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth);
+ uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth,
bool aa);
int32 ami_font_width_glyph(struct OutlineFont *ofont,
uint16 char1, uint16 char2, uint32 emwidth);
struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle,
@@ -108,7 +108,7 @@ bool nsfont_width(const plot_font_style_t *fstyle,
const char *string, size_t length,
int *width)
{
- *width = ami_unicode_text(NULL,string,length,fstyle,0,0);
+ *width = ami_unicode_text(NULL, string, length, fstyle, 0, 0, false);
if(*width <= 0) *width == length; // fudge
@@ -517,20 +517,27 @@ struct OutlineFont *ami_open_outline_font(const
plot_font_style_t *fstyle,
}
int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp,
- uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth)
+ uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth,
bool aa)
{
struct GlyphMap *glyph;
UBYTE *glyphbm;
int32 char_advance = 0;
FIXED kern = 0;
-
+ ULONG glyphmaptag = OT_GlyphMap8Bit;
+ ULONG template_type = BLITT_ALPHATEMPLATE;
+
+ if(aa == false) {
+ glyphmaptag = OT_GlyphMap;
+ template_type = BLITT_TEMPLATE;
+ }
+
if(ESetInfo(&ofont->olf_EEngine,
OT_GlyphCode, char1,
OT_GlyphCode2, char2,
TAG_END) == OTERR_Success)
{
if(EObtainInfo(&ofont->olf_EEngine,
- OT_GlyphMap8Bit,&glyph,
+ glyphmaptag, &glyph,
TAG_END) == 0)
{
glyphbm = glyph->glm_BitMap;
@@ -545,7 +552,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct
RastPort *rp,
BLITA_Width, glyph->glm_BlackWidth,
BLITA_Height, glyph->glm_BlackHeight,
BLITA_Source, glyphbm,
- BLITA_SrcType, BLITT_ALPHATEMPLATE,
+ BLITA_SrcType, template_type,
BLITA_Dest, rp,
BLITA_DestType, BLITT_RASTPORT,
BLITA_SrcBytesPerRow,
glyph->glm_BMModulo,
@@ -561,7 +568,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct
RastPort *rp,
char_advance = (ULONG)(((glyph->glm_Width - kern) *
emwidth) / 65536);
EReleaseInfo(&ofont->olf_EEngine,
- OT_GlyphMap8Bit,glyph,
+ glyphmaptag, glyph,
TAG_END);
}
}
@@ -691,7 +698,8 @@ uint16 ami_font_translate_smallcaps(uint16 utf16char)
return utf16char;
}
-ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG
length,const plot_font_style_t *fstyle,ULONG dx, ULONG dy)
+ULONG ami_unicode_text(struct RastPort *rp, const char *string, ULONG length,
+ const plot_font_style_t *fstyle, ULONG dx, ULONG dy,
bool aa)
{
uint16 *utf16 = NULL, *outf16 = NULL;
uint16 utf16charsc = 0, utf16nextsc = 0;
@@ -727,7 +735,8 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
utf16nextsc = ami_font_translate_smallcaps(utf16next);
if(rp) {
- tempx = ami_font_plot_glyph(ofont, rp,
utf16charsc, utf16nextsc, dx + x, dy, emwidth);
+ tempx = ami_font_plot_glyph(ofont, rp,
utf16charsc, utf16nextsc,
+ dx + x, dy,
emwidth, aa);
} else {
tempx = ami_font_width_glyph(ofont,
utf16charsc, utf16nextsc, emwidth);
}
@@ -736,7 +745,8 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
if(tempx == 0) {
if(rp) {
- tempx = ami_font_plot_glyph(ofont, rp, *utf16,
utf16next, dx + x, dy, emwidth);
+ tempx = ami_font_plot_glyph(ofont, rp, *utf16,
utf16next,
+ dx + x, dy,
emwidth, aa);
} else {
tempx = ami_font_width_glyph(ofont, *utf16,
utf16next, emwidth);
}
@@ -753,7 +763,7 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
{
if(rp) {
tempx = ami_font_plot_glyph(ufont, rp,
*utf16, utf16next,
-
dx + x, dy, emwidth);
+
dx + x, dy, emwidth, aa);
} else {
tempx = ami_font_width_glyph(ufont,
*utf16, utf16next, emwidth);
}
@@ -763,7 +773,7 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
{
if(rp) {
tempx = ami_font_plot_glyph(ofont, rp,
0xfffd, utf16next,
-
dx + x, dy, emwidth);
+
dx + x, dy, emwidth, aa);
} else {
tempx = ami_font_width_glyph(ofont,
0xfffd, utf16next, emwidth);
}
diff --git a/amiga/font.h b/amiga/font.h
index 36bdbf9..10137f7 100755
--- a/amiga/font.h
+++ b/amiga/font.h
@@ -26,7 +26,7 @@
struct ami_font_node;
ULONG ami_unicode_text(struct RastPort *rp, const char *string,
- ULONG length, const plot_font_style_t *fstyle, ULONG x, ULONG y);
+ ULONG length, const plot_font_style_t *fstyle, ULONG x, ULONG y, bool
aa);
void ami_font_setdevicedpi(int id);
void ami_init_fonts(void);
void ami_close_fonts(void);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index e69e056..c581711 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -521,7 +521,7 @@ bool ami_text(int x, int y, const char *text, size_t length,
#endif
ami_plot_setapen(fstyle->foreground);
- ami_unicode_text(glob->rp,text,length,fstyle,x,y);
+ ami_unicode_text(glob->rp, text, length, fstyle, x, y, !palette_mapped);
return true;
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/1ceced6e673cd9e573bd1a0475fa8357296b3289
commit 1ceced6e673cd9e573bd1a0475fa8357296b3289
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Free bitmap using correct function
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 239b442..e69e056 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -207,7 +207,11 @@ void ami_free_layers(struct gui_globals *gg)
FreeVec(gg->tmprasbuf);
FreeVec(gg->areabuf);
DisposeLayerInfo(gg->layerinfo);
- p96FreeBitMap(gg->bm);
+ if(palette_mapped == false) {
+ p96FreeBitMap(gg->bm);
+ } else {
+ FreeBitMap(gg->bm);
+ }
}
void ami_clearclipreg(struct gui_globals *gg)
-----------------------------------------------------------------------
Summary of changes:
amiga/font.c | 34 ++++++++++++++++++++++------------
amiga/font.h | 2 +-
amiga/plotters.c | 8 ++++++--
3 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/amiga/font.c b/amiga/font.c
index 19d6dd1..ffecf85 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -79,7 +79,7 @@ ULONG ami_devicedpi;
ULONG ami_xdpi;
int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp,
- uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth);
+ uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth,
bool aa);
int32 ami_font_width_glyph(struct OutlineFont *ofont,
uint16 char1, uint16 char2, uint32 emwidth);
struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle,
@@ -108,7 +108,7 @@ bool nsfont_width(const plot_font_style_t *fstyle,
const char *string, size_t length,
int *width)
{
- *width = ami_unicode_text(NULL,string,length,fstyle,0,0);
+ *width = ami_unicode_text(NULL, string, length, fstyle, 0, 0, false);
if(*width <= 0) *width == length; // fudge
@@ -517,20 +517,27 @@ struct OutlineFont *ami_open_outline_font(const
plot_font_style_t *fstyle,
}
int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp,
- uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth)
+ uint16 char1, uint16 char2, uint32 x, uint32 y, uint32 emwidth,
bool aa)
{
struct GlyphMap *glyph;
UBYTE *glyphbm;
int32 char_advance = 0;
FIXED kern = 0;
-
+ ULONG glyphmaptag = OT_GlyphMap8Bit;
+ ULONG template_type = BLITT_ALPHATEMPLATE;
+
+ if(aa == false) {
+ glyphmaptag = OT_GlyphMap;
+ template_type = BLITT_TEMPLATE;
+ }
+
if(ESetInfo(&ofont->olf_EEngine,
OT_GlyphCode, char1,
OT_GlyphCode2, char2,
TAG_END) == OTERR_Success)
{
if(EObtainInfo(&ofont->olf_EEngine,
- OT_GlyphMap8Bit,&glyph,
+ glyphmaptag, &glyph,
TAG_END) == 0)
{
glyphbm = glyph->glm_BitMap;
@@ -545,7 +552,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct
RastPort *rp,
BLITA_Width, glyph->glm_BlackWidth,
BLITA_Height, glyph->glm_BlackHeight,
BLITA_Source, glyphbm,
- BLITA_SrcType, BLITT_ALPHATEMPLATE,
+ BLITA_SrcType, template_type,
BLITA_Dest, rp,
BLITA_DestType, BLITT_RASTPORT,
BLITA_SrcBytesPerRow,
glyph->glm_BMModulo,
@@ -561,7 +568,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct
RastPort *rp,
char_advance = (ULONG)(((glyph->glm_Width - kern) *
emwidth) / 65536);
EReleaseInfo(&ofont->olf_EEngine,
- OT_GlyphMap8Bit,glyph,
+ glyphmaptag, glyph,
TAG_END);
}
}
@@ -691,7 +698,8 @@ uint16 ami_font_translate_smallcaps(uint16 utf16char)
return utf16char;
}
-ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG
length,const plot_font_style_t *fstyle,ULONG dx, ULONG dy)
+ULONG ami_unicode_text(struct RastPort *rp, const char *string, ULONG length,
+ const plot_font_style_t *fstyle, ULONG dx, ULONG dy,
bool aa)
{
uint16 *utf16 = NULL, *outf16 = NULL;
uint16 utf16charsc = 0, utf16nextsc = 0;
@@ -727,7 +735,8 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
utf16nextsc = ami_font_translate_smallcaps(utf16next);
if(rp) {
- tempx = ami_font_plot_glyph(ofont, rp,
utf16charsc, utf16nextsc, dx + x, dy, emwidth);
+ tempx = ami_font_plot_glyph(ofont, rp,
utf16charsc, utf16nextsc,
+ dx + x, dy,
emwidth, aa);
} else {
tempx = ami_font_width_glyph(ofont,
utf16charsc, utf16nextsc, emwidth);
}
@@ -736,7 +745,8 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
if(tempx == 0) {
if(rp) {
- tempx = ami_font_plot_glyph(ofont, rp, *utf16,
utf16next, dx + x, dy, emwidth);
+ tempx = ami_font_plot_glyph(ofont, rp, *utf16,
utf16next,
+ dx + x, dy,
emwidth, aa);
} else {
tempx = ami_font_width_glyph(ofont, *utf16,
utf16next, emwidth);
}
@@ -753,7 +763,7 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
{
if(rp) {
tempx = ami_font_plot_glyph(ufont, rp,
*utf16, utf16next,
-
dx + x, dy, emwidth);
+
dx + x, dy, emwidth, aa);
} else {
tempx = ami_font_width_glyph(ufont,
*utf16, utf16next, emwidth);
}
@@ -763,7 +773,7 @@ ULONG ami_unicode_text(struct RastPort *rp,const char
*string,ULONG length,const
{
if(rp) {
tempx = ami_font_plot_glyph(ofont, rp,
0xfffd, utf16next,
-
dx + x, dy, emwidth);
+
dx + x, dy, emwidth, aa);
} else {
tempx = ami_font_width_glyph(ofont,
0xfffd, utf16next, emwidth);
}
diff --git a/amiga/font.h b/amiga/font.h
index 36bdbf9..10137f7 100755
--- a/amiga/font.h
+++ b/amiga/font.h
@@ -26,7 +26,7 @@
struct ami_font_node;
ULONG ami_unicode_text(struct RastPort *rp, const char *string,
- ULONG length, const plot_font_style_t *fstyle, ULONG x, ULONG y);
+ ULONG length, const plot_font_style_t *fstyle, ULONG x, ULONG y, bool
aa);
void ami_font_setdevicedpi(int id);
void ami_init_fonts(void);
void ami_close_fonts(void);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 239b442..c581711 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -207,7 +207,11 @@ void ami_free_layers(struct gui_globals *gg)
FreeVec(gg->tmprasbuf);
FreeVec(gg->areabuf);
DisposeLayerInfo(gg->layerinfo);
- p96FreeBitMap(gg->bm);
+ if(palette_mapped == false) {
+ p96FreeBitMap(gg->bm);
+ } else {
+ FreeBitMap(gg->bm);
+ }
}
void ami_clearclipreg(struct gui_globals *gg)
@@ -517,7 +521,7 @@ bool ami_text(int x, int y, const char *text, size_t length,
#endif
ami_plot_setapen(fstyle->foreground);
- ami_unicode_text(glob->rp,text,length,fstyle,x,y);
+ ami_unicode_text(glob->rp, text, length, fstyle, x, y, !palette_mapped);
return true;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org