Ah thanks for backporting, cedric. I should definitely have tagged this as @fix and backported :-/
On Tue, Jan 6, 2015 at 9:10 PM, Jean-Philippe ANDRÉ <[email protected]> wrote: > cedric pushed a commit to branch efl-1.9. > > > http://git.enlightenment.org/core/efl.git/commit/?id=864c137471a45846764bc570067023a1d242d52c > > commit 864c137471a45846764bc570067023a1d242d52c > Author: Jean-Philippe Andre <[email protected]> > Date: Tue Jan 6 19:15:07 2015 +0900 > > Evas fonts: Fix minor deviation in RLE font render > > So I've discovered some weird output values after drawing > some text. The destination alpha would become 0xFE even > when the back buffer had a background with 0xFF alpha. > > Example: > Dest is 0xff00ff00 (green). > Color is 0xffffffff (white). > Current font alpha is 170 (0xaa). > --> Output was 0xFEaaFEaa instead of 0xFFaaFFaa. > > This is because of some slightly invalid calculation > when doing the font masking (mtab[v] = 0x55 above). > > Indeed, MUL_256 takes alpha values in the range [1-256] > and not [0-256] as was assumed. > --- > src/lib/evas/common/evas_font_compress.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/src/lib/evas/common/evas_font_compress.c > b/src/lib/evas/common/evas_font_compress.c > index 1c615f9..448716b 100644 > --- a/src/lib/evas/common/evas_font_compress.c > +++ b/src/lib/evas/common/evas_font_compress.c > @@ -475,7 +475,6 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg, > DATA32 *dst = dst_image->image.data; > DATA32 coltab[16], col; > DATA16 mtab[16], v; > - DATA8 tmp; > > w = fgo->bitmap.width; h = fgo->bitmap.rows; > // skip if totally clipped out > @@ -520,8 +519,7 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg, > { > v = (i << 4) | i; > coltab[i] = MUL_SYM(v, col); > - tmp = (coltab[i] >> 24); > - mtab[i] = 256 - (tmp + (tmp >> 7)); > + mtab[i] = 256 - (coltab[i] >> 24); > } > #ifdef BUILD_MMX > if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) > > -- > > > -- Jean-Philippe André ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
