Commit Graph

16 Commits

Author SHA1 Message Date
Chris Michael 3862b304b0 evas-common: Remove cserve2 support
ref T7226

Depends on D6934
2018-08-30 13:47:27 +09:00
subhransu mohanty b038d7df25 Remove evas internal dependency from the evas_font module
Summary:
dev branch : devs/subhransu/font

The Final goal is to move the evas_font module to ector so that both ector and evas can reuse the code.
make the api simple so that sam eapi can be used by evas_textblock and ector text.

This is the 1st stage to achive that gola, first remove the evas internal dependancy as much as possible before moving to ector library.

Reviewers: jpeg, raster, herdsman, cedric, id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5419
2017-11-07 11:34:53 +09:00
Youngbok Shin 1750410650 evas: Add scale feature for embedded bitmap fonts.
Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

Differential Revision: https://phab.enlightenment.org/D2713
2017-09-26 11:31:31 +09:00
Jean-Philippe Andre 0740010a06 evas filters: Move blend to software_generic (1/8)
This is an attempt at refactoring the filters code so I can
later implement GL support. This patch adds a few extra changes
to remove avoid calling functions of libevas from the software
engine: use the draw functions from static_libs/draw rather
than evas_common APIs.
2017-04-14 11:26:42 +09:00
Jean-Philippe Andre f3c9500a6d evas filters: Fix a rare crash in text render (SW)
There are reports of crashes when y < 0. This case seems
abnormal in case of filters, as I don't know how to reproduce it,
but it's happened.

Thanks Youngbok Shin for the report.

@fix
2017-04-10 16:56:14 +09:00
Jean-Philippe Andre b5500a8644 Evas: Move alpha functions to static_libs/draw
This is a pretty simple code refactor, moving pixel handling
to the new draw lib.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 464e6ca987 Evas masking: Avoid potential crashes (SW)
Make sure not to sample the mask image outside its boundaries.
This is a series of last resort checks. I can not reproduce the
crashes but know they have happened.

I used EINA_UNLIKELY more for clarity than for compiler optimizations.
2015-04-08 18:17:34 +09:00
Jaeun Choi 9af60b1b04 Evas masking: Use alpha mask in SW engine draw functions
Work done by Jaeun Choi, rebased & squashed by jpeg.

This commit introduces changes to the low-level draw functions
of the SW engine considering the existence of an alpha mask image.

Features:
- Font masking (TEXT, TEXTBLOCK),
- Rectangle masking,
- Image masking (all image scaling functions should be handled).

The mask image itself is not yet set in the draw context (see
following commits).

@feature

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre a90876c337 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.
2015-01-06 19:41:10 +09:00
Jean-Philippe Andre 624787c42a Evas font: Improve RLE rounding alpha8 to alpha44
This should ensure that the difference between the original
pixel value and the rle4 encoded one is <= 8.

The previous fix was a bit stupid as it was not taking into
account the conversion a4 to a8 (which is a8 = (a4 << 4) | a4).
2014-12-09 11:02:01 +09:00
Jean-Philippe Andre 52d117c905 Evas font: Compress font algo should round instead of floor
This is an attempt at having higher quality font rendering
while still using RLE-based font compression.
2014-12-08 18:02:44 +09:00
Jean-Philippe Andre f62b612797 Evas: Remove invalid cast and fix warning/bug on windows
On Windows, long is 32 even on Win64.
Thanks Vincent for spotting this.

@fix
2014-05-29 17:31:16 +09:00
Jean-Philippe Andre ac8140ccd1 Evas filters: Rename RGBA_Image::mask.data into image.data8
The structure should not be changed, despite the union modification.

I am renaming for consistency with older branches that had a mask
field in RGBA_Image. Also, the mask.data or data8 is really just
a way to avoid casting between DATA8 and DATA32 (and it shows
clearly what kind of data you are dealing with).
2014-03-04 12:10:29 +09:00
Jean-Philippe Andre 4c4b44a575 Evas fitlers: Implement SLOW font draw to alpha targets
Well, raster did some great job at optimizing font draw... but only
to RGBA32 targets. In this font effects case, we also want to render
text on ALPHA buffers.

For now, reuse the existing alpha blending & glyph decompress
functions. It's MUCH easier, and works. Definitely slower than
decompressing on-the-fly and optimizing everything. But for now,
this will not even be the performance bottleneck in an effect
(blur will be a lot slower).
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 9adbbe0bd1 Evas fonts: Pass RGBA_Image instead of DATA32 buffer
Since we want to be able to draw to alpha buffers, it's
easier if we pass the whole image struct instead of just
the data pointer.
2014-02-07 15:38:43 +09:00
Carsten Haitzler 86a97efeea evas - fonts - move to using 4bit and rel 4 bit compressed font glyphs
this changes the internal encoding of font glyphs in evas to use 4bit
uncompressed if small, or 4bit rle (run length encoded) if larger.
this caves at least 50% of memory on fonts - and more if bigger. with
large fonts (40-80pixel size) we can save in the region of 80% of
memory used for glyphs. this also happesn to allow speedups in
rendering too.
2014-01-13 05:15:32 +09:00