Well... actually this is not exactly a fix.
It just restores the previous behaviour, and allows AA to
work. As in, it won't draw ugly black lines but properly
blend to transparent.
But there is still a problem:
The image map render function changes the alpha flag on the source
image if AA is enabled or if the map has an alpha color. This is
actually wrong as images forcefully set to not have any alpha
(with evas_object_image_alpha_set(0)) will then not be opaque
anymore.
Right now I can't think of a solution (also I don't quite follow
the entire pipeline in evas map...). Changing the flag will
make some opaque areas transparent. Not changing the flag will
produce ugly artifacts where AA blending should happen. Fix one
bug and the other appears, and vice versa.
This can be tested with the example evas-map-aa and adding an
alpha channel to cube1.png (with gimp for instance) but manually
setting alpha to 0 in the code. Weird stuff will happen (try
playing with the map and pressing I to switch to/from image mode).
Here are only 3 very basic test cases.
One is a dumb set/get to check that image objects can
be passed as clippers.
The other one is a pixel verification test with extremely
basic data (NEAREST scaling and just rectangles). It also
compares text clipping and masking.
The last one performs a very basic verification that masks
of masks work.
The selected op func was not performing the correct operation,
thus producing rendering artifacts. These functions should not
be used anywhere except in case of masking... which was not an
available option earlier.
It was doing (wrong):
dst = interp(mask, src, dst)
Instead of (correct):
dst = dst + (1 - mask) * src
NOTE:
This commit also disables MMX, SSE3 & NEON implementations of
pixel_mask blend operations, since they are also broken.
In case the clipper is a mask object, we should use precise
event masking. By default precise_is_inside is not enabled
because it is expensive, but it should probably be set by
the application when they use masks as clippers.
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
This implements supports for masking inside evas_render, which
means:
- Render the mask itself into a surface (ALPHA if possible)
- Pass this mask surface to the draw context
- Apply mask recursively in case a masked object is contained
by another masked object.
@feature
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>
Summary: The dbus calls to TakeControl and ReleaseControl of a session
are actual Methods that need to be setup and called in order to
operate properly. As such, this commit fixes that issue by using the
proper eldbus method calls, and fixes an issue where shutting down
Enlightenment would lead to "cannot release control" error messages.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: We need to clean tty handlers and close the tty Before we can
call logind_disconnect as that function ends up shuttting down our
dbus connection.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This fixes an incorrect order with shutdown of drm library.
Sprites are created (during init) before inputs, so they should be
shutdown After inputs are.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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.