The previous commit modifies the concept of direct rendering
vs. indirect rendering, so some runtime checks (in debug mode
only) will fail.
This commit introduces two new engine functions:
- gl_get_pixels_pre
- gl_get_pixels_post
The latter will be used in a later patch for optimization.
not changed.
Automatically fallback to indirect rendering on FBO or X11 Pixmap
if the Evas Object Image is not marked as dirty. This should
improve the performance and/or power consumption in those
rare cases where this area of the canvas needs to be redrawn
but the GL content has not changed.
@feature
The function image_scaled_update() frees() the old scaled image
passed as input if it doesn't match the old dimensions. This commit
will avoid double frees.
Edje may not set the filled flag on an image even if its fill
properties make it fill the whole object. For masking, it can
then be considered as a filled image.
If the image is not "filled", then we can't assume its image
source geometry is the same as its texture geometry.
Note: Implementing a fast path for non-filled images would
require a hell of a lot more work (need to cut the render
into a lot more triangles) for little real-life use.
Call object's function to get the private engine_data (here, the
image object). Thanks Dongyeon for your patch which inspired me to
do that instead of forcing pre_render.
This will currently optimize most of the masks when using the
GL engine[1].
This is a very special case that adds a highly optimized path
for masking in GL. It works by creating a virtual image, containing
a pointer to the original image and a new geometry[2].
Instead of creating a new FBO-based surface (image_map_surface),
we refer to the original image and adjust the mask geometry on
the fly.
KNOWN BUGS:
- masking a map with such a scaled image is now broken.
[1] Right now all masks are simple Evas Object Image, so that means
all cases of masking, except masks of masks, or masks of maps,
will be optimized with this new method.
[2] This virtual image mechanism is still quite hackish and may
be improved (for memory usage, refcounting, etc...)
Those 2 new values are here to avoid using environment variables
that have side effects on the whole application.
I'm actually wondering if we shouldn't just kill off the env
vars altogether. Also, direct override is a terrible option that
should never be used.
Memory optimization can make sense (needs more testing tho).
Summary:
Add class and type Evas_3D_Callback like wrapper under smart object
Incapsulate Evas_3D_Callback in Evas_3D_Object
Add virtual function register and unregister in Evas_3D_Object
Add function evas_3d_callback_call
Add callbacks clicked and collision for Evas_3D_Node
@feature
Reviewers: raster, Hermet, cedric
Reviewed By: cedric
Subscribers: artem.popov, cedric
Differential Revision: https://phab.enlightenment.org/D1914
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
this fixes a lot of noise for filled image objects that set fill to
0x0 if objetc is 0x0. this clamps minimum fill at 1x1 and thus keeps
things silent and sensible. also just silently ignore 0x0 filled image
objects. noise is not that useful.
this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
Summary:
See first part https://phab.enlightenment.org/D1811 (backend, gl)
Add get/set for color pick mode at evas_3d_mesh and evas_3d_scene
Add evas_3d_node_color_node_mesh_collect function to collect data at force rendering
Add state flag for scene to avoid useless force rendering in case scene wasn't changed
Add functionality for color pick in evas_3d_scene_pick method
Reviewers: Hermet, raster, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1956
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
When getting ellipsis value from evas text object fails,
the most reasonable return value is -1.0.
Currently, evas_object_text_ellipsis_get API with NULL returns 0.0.
It means ellipsis is not off. It must return -1.0 when API fails.
@fix
Comments by Tom: until now, this was inconsistent. With this change, it
now returns -1.0 consistently. Also, fixed commit summary.
Reviewers: woohyun, Hermet, seoz, tasn
Reviewed By: tasn
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1944
Summary:
The order of tranformation changed to scale, orientation, position as
in some cases it can lead to incorrect value for the bounding box.
@fix
Reviewers: cedric, Hermet, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1942
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
During filling evas pick public data by API evas_3d_scene_pick
segfault can occur if mesh was created without texcoords.
See functions - _pick_data_mesh_add, _pick_data_texcoord_update
@fix
Reviewers: cedric, Hermet, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1941
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Fixes rendering in the following case:
- Object with a map has a mask
- Object is child of smart object which also has a map (eg. transit)
--> Masking did not apply to the children before this patch.
NOTE: This works fine in SW but still didn't work in GL, see the
following commit...
I know. This title does not explain anything. Whatever.
This fixes the following issue:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
small icons with masks.
Note: Once again this patch only affects code paths where an
object is a mask.
Yeah, mixing maps and masks of masks in a genlist leads
to tons of amazing bugs :)
This commit removes x,y from the "mask" field in an object,
as they are duplicates of cur->geometry.{x,y} but were not
properly kept in sync.
This patch fixes a situation of:
- A genlist in a map
- Each item has an icon masked
- Scrolling the genlist
--> The masked items would not render properly before this
patch.
Remaining known problem:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
small icons with masks.
Note: These changes look scary just before the release
but I would have to backport them to 1.13.x as they
definitely are bug fixes. Also, they only concern
code paths used exclusively by masking.
All those masking bug fixes become harder to explain. But here goes:
- Take a genlist, apply a mask to it (for example put everything
in an elm_layout). Also play with various objects in the genlist.
- Also apply a map to it (for instance, elm_transit zoom).
--> Now some elements will be masked, some others will not,
and some may even not render at all.
This patch restores a mask in the current drawing context, instead
of just unsetting it.
In a situation where an object with mask of mask is in a map
(Yes! It can happen!) the masks would not get properly "multiplied".
Now the problem is that some objects still seem to bypass some
masks... Hmm...
This is a left-over from a previous fix a few weeks ago.
The point of this "if" is just to avoid writing the COW value
if not needed.
For reference:
commit f876cf31f8
Author: Jean-Philippe Andre <jp.andre@samsung.com>
Date: Tue Dec 23 18:57:45 2014 +0900
Evas masking: Fix invalid geometry after mask redraw
Summary:
This is an attempt at fixing:
- T1767: The ultimate evil map & clip bug
Force recalculation and re-propagation of clipper geometry
after or just before a map is applied (only when transiting
between map enabled and map disabled).
I realized that doing clip_unset+clip_set in the E widget
code would fix the issue, but this is not a solution that
makes a lot of sense.
Unfortunately I have no idea about the side effects of this
patch, especially in terms of performance.
Fixes T1767 and maybe T1630.
Test Plan:
Open PackageKit popup in E, check the animations
and that clipping works fine both during, before and after
the animations.
Reviewers: raster, cedric
Reviewed By: cedric
Subscribers: cedric, Hermet
Maniphest Tasks: T1767
Differential Revision: https://phab.enlightenment.org/D1897
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
While invesigating some clip & map issues, I found some very
strange piece of code:
{
tmp = a;
a = c;
a = tmp;
}
This actually comes from a very old code refactoring where a
line in-between was removed:
tobj = obj->cur.map_parent;
obj->cur.map_parent = obj->cur.clipper->cur.map_parent;
- evas_object_clip_recalc(obj);
obj->cur.map_parent = tobj;
Adding this line back there doesn't seem to do anything anyways.
So, let's just remove useless code.
For the record (legacy evas):
commit e1f6f3c5f239dfd95a307949acd5f98831c0c3c0
Date: Fri Aug 17 06:16:04 2012 +0000
evas/render - code refactoring.
SVN revision: 75351
Some complex examples of masking with mapped smart objects
would fail miserably, rendering the object without any mask,
and/or showing the mask itself somewhere in white color...
The memory usage graph was going up and to the right!
I was told this is always a good thing!
... maybe not this time :)
Hopefully I didn't forget a case. An intense session of
genlist scrolling with masks all over the place and masks
of masks didn't show any glitch, crash or memory leak.
The main difference between 1.12 and 1.13 memory foot print is actually
related to this two pointer to mask. I am wondering if there is not an
issue here also has we do have a duplicated pointer. We have prev_mask
and mask in both cur and prev state of an Evas_Object, but only mask
and prev_mask from the cur state seems to be accessed.
If we can remove two pointers from those state, we should have a decent
win in expedite benchmark. Hopefully 300KB to win there (Close to half
the additional cost in memory).
The flag should be set on the mask itself.
Checking for (x,y) being inside the mask can be an expensive operation,
so further optimization will be required.