Commit Graph

2906 Commits

Author SHA1 Message Date
Chris Michael 06e014959b evas: don't use float comparison for integers
As derek pointed out, 'stride' here is an integer so does not need a
float comparison, so just use a simple integer comparison.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-21 13:18:02 -05:00
Jean-Philippe Andre 2e89702d57 evas: Fix image save with GL engine and orientation
This fixes evas_object_image_save after changing the orientation
of an image in the GL engine. In SW engine the pixel data is rotated
in memory, so things worked fine from the beginning. In GL we may
have to go through loops and hoops in order to rotate and fetch the
data from the GL texture.

This should fix ce45d44.
2016-12-21 13:56:05 +09:00
Jee-Yong Um f1ab136abc doxygen: remove reference warnings.
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4503

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-20 16:39:30 -08:00
Cedric BAIL ada014ec09 evas: fix proper operator ordering with parentheses. 2016-12-20 16:39:29 -08:00
Derek Foreman fd5a0f6ff9 headers: update copyright 2016-12-20 10:31:26 -06:00
Chris Michael 7507efc260 evas: remove float comparison warnings from evas_object_image
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:55:08 -05:00
Chris Michael 2ae4c978f9 evas: remove float comparison warnings for evas_filter_mixin
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Chris Michael f427050b61 evas: remove float comparison warnings for evas_convert_color
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Chris Michael b58057e2e7 evas: remove float comparison warnings for evas_canvas3d_primitive
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Chris Michael 239d1401db evas: remove float comparison warnings for evas_canvas3d_mesh
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Chris Michael 9a06230b8d evas: remove float comparison warnings for evas_canvas3d_scene
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Chris Michael f411616069 evas: remove float comparison warnings for evas_canvas3d_node
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Chris Michael cbc60f1dd1 evas: remove float comparison warnings for evas_cs2_client
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 2c9e46ace5 evas: remove float comparison warnings for evas_cache2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 33ad245b80 evas: remove float comparison warnings for evas_cache_image
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 656df71b96 evas: remove float comparison warnings for evas_object_textgrid
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 0b17713691 evas: remove float comparison warnings for efl_canvas_image
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael ec2238ea16 evas: remove float comparison warnings for efl_input_pointer
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 0e93d8121b evas: remove float comparison warnings for evas_map
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 879041a329 evas: remove float comparison warnings for evas_object_textblock
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael 9259f0a643 evas: remove float comparison warnings for evas_object_text
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:50 -05:00
Chris Michael a50c811ab0 evas: remove float comparison warning for evas_object_box
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:49 -05:00
Chris Michael 72b1fecbda evas: remove float comparison warning for evas_object_table
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:49 -05:00
Chris Michael 32745f91ae evas: remove float comparison warning for evas_object_main
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:49 -05:00
Chris Michael 1b9aa3f995 evas: remove float comparison warnings for evas_events
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:36 -05:00
Carsten Haitzler b9e0772533 evas - async preload - stop hang when missing wakeup of preload data
this isn't pretty and i think some stuff needs a redesign... but...
this should fix T5025

@fix
2016-12-20 22:38:21 +09:00
Jean-Philippe Andre a28cb93d0d Revert "evas: Add source_region property to proxy objects"
This reverts commit 4e110a34bf.

Urgh. I'm stupid. Conceptually I still like the idea of the
region proxy, that only renders part of the source object
in a proxy surface. The problem right now is that the proxy
subrender mechanism renders to a surface that belongs to
the **source** and not the proxy object. As a consequence,
the region would become a property of the source, rather than
the proxy, which is not at all the intention of the original
patch. In other words, everything would fall apart if an object
has more than one proxy, for whatever reason.

I realized that when trying to actually test the region proxy.
It didn't work at all. Revert for now.
2016-12-20 15:47:54 +09:00
Cedric BAIL 2ddbfb2329 evas: get rid of float comparison warning in Evas_3D. 2016-12-19 16:33:46 -08:00
Bruno Dilly ecdf56de47 evas: improve logic regarding events filtering enablement
Only the size of events_whitelist isn't enough, because in some
cases the user may be disabling the usage of a specific seat.

Considering the following scenario, the issue will easy to understand:
 - an application with two entries (one to be used by seat 1 and other
     by seat 2)
 - the first seat is announced - it is enabled for entry 1 and
     disabled for entry 2
 - the second seat is announced

Before second seat is announced, the first seat would be able
to input the entry 1, because the events_whitelist of such
object will continue empty.

So a flag will be used to identify an object with active
filter.

Reviewed By: iscaro

Differential Revision: https://phab.enlightenment.org/D4498
2016-12-19 16:47:14 -02:00
Bruno Dilly e78390c4c5 evas: remove focus when removed from filter whitelist
It doesn't make sense to remove it when a seat is added
to the list. It should be removed only when this seat
is blocked.

But when the list receives its first item, then
it also should be checked if the focused seat
is the one just added, otherwise the previous one
must be removed.
2016-12-19 16:46:57 -02:00
Bruno Dilly 2958aba23a evas: add getter for devices by name
Make it possible to get the evas device given
its name. It sounds useful for Edje since
programs will reference seats by name.
2016-12-19 14:58:35 -02:00
Jean-Philippe Andre 03eb4c6409 evas: Fix issues with masking (make check)
After a previous patch, mask_subrender worked differently, and
didn't reset the object's cache clip color. This made evas_suite
fail. But also it seems some other issues creeped in and it was
necessary to fix the test case by adding data_updates (mistake!)
and removing an invalid draw call.
2016-12-16 17:10:01 +09:00
Jean-Philippe Andre 489815457b evas: Apply clip when rendering a masked mask
This fixes a rare crash in the SW engine when a masked mask is
to be rerendered. The clip adds more safety as the lower render
draw functions assume it is properly set.
2016-12-16 15:21:01 +09:00
Jean-Philippe Andre e3b8bcc771 evas: Change int into a single bit
clean_layer is a bool
2016-12-16 14:35:52 +09:00
Jean-Philippe Andre b0c67adb10 evas: Fix masks of masks
Don't ask. This is a world of magic.
2016-12-16 14:09:00 +09:00
Jean-Philippe Andre 2bed30b398 evas: "fix" masks of masks inside a proxy
Here's the situation:

1. A container (genlist) has a mask, M0.
2. An item I0 inside this container uses a proxy P0 as render object
   rather than the item directly (eg. for zooming in/out).
3. An element E0 inside this item has another mask, M1.

Theory:
1. The proxy surface for P0 is rendered, and M1 is applied to
   the element E0.
2. The proxy P0 is rendered on the canvas, with M0 applied.

Practice:
1. The element E0 is prepared for rendering, this triggers
   a mask subrender for M1.
2. M1 is rendered with M0 as a prev mask, then kept in cache and
   not redrawn (no geometry change, etc...)
3. When P0's surface is rendered, M1's surface is the result of M1+M0.
4. When P0 is drawn on screen, we can see the effect of M1+M0 as
   P0's geometry might be different from the item's I0.

Solution:
Discard prev masks and force a mask redraw when we're inside a
proxy. Ideally we should detect if the prev mask belongs to the
insides of the proxy or not.

Problems:
_mask_apply_inside_proxy() is definitely not correct, but it's
not easy to test it. Anyway I believe that in order to properly
implement all of this, we need to rethink evas_render and
the draw context. Non-primary render surfaces (maps, proxies,
masks, filters, ...) should be rendered with a clean context
and clipping, masking, etc should be computed appropriately.
2016-12-16 11:29:47 +09:00
Jean-Philippe Andre 1c21cdfdbb evas: Remove flag use_mapped_ctx and add do_async
Always assume use_mapped_ctx as true, the caller of evas_render_mapped
must ensure that the context is suitable (so either clean or contains
the appropriate clip info).

Also pass do_async to mask_subrender. For now it will always be reset
to false as the SW engine requires sync render to convert from RGBA
to Alpha (not great). The upcoming GL async engine should be able to
render masks asynchronously without any problem.
2016-12-16 11:05:45 +09:00
Jean-Philippe Andre 3e0f3822f1 evas: Call object render in mask_subrender
This can avoid some invalid render from evas_render_mapped in
a rare case. I'm not sure about the conditions but I know for
sure that at the moment mask_subrender should be only rendering
plain old images into a dedicated surface. So no need for
evas_render_mapped here.
2016-12-16 10:53:03 +09:00
Jean-Philippe Andre 70676a4179 evas: Remove context from the evas public data
It was never used, except in dubious situations (most likely a typo).
A clean context is now used in the top-most call to
evas_render_updates_internal_loop.
2016-12-16 10:51:05 +09:00
Jean-Philippe Andre 581505791a evas: Remove context from some engine function
This is for canvas_alpha_get. context is never used.
2016-12-16 10:40:55 +09:00
Jean-Philippe Andre 260d838d22 evas: Remove context from polygon internal functions
It's not used
2016-12-16 10:37:54 +09:00
Jean-Philippe Andre 4f78aba9bf evas: Use ENFN, ENDT in evas_render
This makes code shorter and easier to read (imo).
Also introduce ENCTX for the engine context. It's used in a couple
places and I believe it's just wrong - but works because the engine
context and the current context are the same.
2016-12-16 10:31:53 +09:00
Jean-Philippe Andre ae69b10455 evas: Avoid calling efl_isa in proxy_subrender
It's not necessary.
2016-12-16 10:24:52 +09:00
Jean-Philippe Andre 4e110a34bf evas: Add source_region property to proxy objects
This will allow partially rendering a proxy in a smaller image,
limited to the specified region. At the moment, this will allow
apps to create proxies of very large objects and let them deal
with the geometry & clipping.

This is not directly solving the issues with adding a filter
to textblock or the infinite page scrollers.

@feature
2016-12-16 10:24:52 +09:00
Cedric BAIL 224ba8586b evas: fix use of signed and unsigned type in conditional expression warning. 2016-12-15 11:28:17 -08:00
Cedric BAIL e1843b2ced evas: fix potential use of unitialized variable. 2016-12-15 11:27:54 -08:00
Daniel Kolesa c813e94606 eolian: unary expr eval for floats and add a signed number mask
This adds a new mask for all signed numbers (sint + float) and
fixes unary expr evaluation for floats, as well as fixes eval
error messages.
2016-12-14 18:23:16 +01:00
Jean-Philippe Andre bcb251e6ab evas: Make evas object loop users
This makes efl_loop_get() work on evas objects, returning the
main loop as expected. Also make the loop a property of the
Loop_User class (shouldn't it be called Efl.Loop.User instead?)
2016-12-13 16:12:27 +09:00
Jean-Philippe Andre fdcd926960 evas: Fix stacked box align
I added a way to respect the object's alignment when adding them
to a stacked box, but that alignment should only be used when the
box align is set to fill, otherwise both aligns would conflict.

See 3df7b717c9
2016-12-13 16:12:27 +09:00
Guilherme Iscaro f153d4ce0f Efl.Canvas.Object: Remove the extra parementer at _evas_object_pointer_data_get()
The Evas_Pointer_Data struct already contains a Efl.Input.Device pointer.
2016-12-13 03:28:31 -02:00