platform/upstream/efl.git
7 years agomakefile: Fix make dist (with filters)
Jean-Philippe Andre [Fri, 14 Apr 2017 03:04:27 +0000 (12:04 +0900)]
makefile: Fix make dist (with filters)

7 years agoevas filters: Fix rare crash with async render
Jean-Philippe Andre [Fri, 14 Apr 2017 02:07:04 +0000 (11:07 +0900)]
evas filters: Fix rare crash with async render

Reported by bu5hm4n

@fix (backport will look slightly different)

7 years agoevas filters: Fix async RW rendering
Jean-Philippe Andre [Thu, 13 Apr 2017 03:08:31 +0000 (12:08 +0900)]
evas filters: Fix async RW rendering

This fixes a crash (when deleting the output image), and rearranges
the code a bit.

7 years agoevas filters: Cleanup unused buffers
Jean-Philippe Andre [Wed, 5 Apr 2017 10:19:36 +0000 (19:19 +0900)]
evas filters: Cleanup unused buffers

This might not be used as over two consecutive runs all the
same buffers should be used. But it could happen if some
parameters in the filter change (eg. blur radius).

Fixes major (GPU) memory leaks. Reuse mode is still leaking.

7 years agoevas filters: Adjust downscale coordinates to avoid artifacts
Jean-Philippe Andre [Wed, 5 Apr 2017 06:32:07 +0000 (15:32 +0900)]
evas filters: Adjust downscale coordinates to avoid artifacts

This avoids sampling artifacts when moving or resizing a
snapshot object over a region with sharp content (eg. text).

7 years agoevas filters: Fix artifacts when scaling up & down
Jean-Philippe Andre [Tue, 4 Apr 2017 09:51:34 +0000 (18:51 +0900)]
evas filters: Fix artifacts when scaling up & down

An odd-sized image scaled down by 2 was losing 1 pixel during the
downscale, and it was not restored after scaling up. The same
happened with downscaling by 4 except the effect was even more
visible.

This meant that a moving snapshot with a large blur would trigger
some really ugly sampling issues if the content below was precise
(such a text).

7 years agoevas filters: Fix maps with filtered snapshots
Jean-Philippe Andre [Tue, 4 Apr 2017 05:28:29 +0000 (14:28 +0900)]
evas filters: Fix maps with filtered snapshots

Another wonder of evas render... maps, clips, snapshots, filters...
This fixes animations with windows that have a snapshot decoration.

7 years agoevas filters: Prevent redraws when obscure changed
Jean-Philippe Andre [Tue, 4 Apr 2017 01:25:05 +0000 (10:25 +0900)]
evas filters: Prevent redraws when obscure changed

If the obscured area in a snapshot object changes a lot, do
not try to keep track of it forever. Instead, redraw the filter
over the entire object region, without obscure.

This fixes a performance issue when an opaque window is moved
above a fixed transparent window (the latter has a snapshot with
blur filter).

7 years agoevas filters: Enable down scaling with GL blur
Jean-Philippe Andre [Mon, 3 Apr 2017 12:24:07 +0000 (21:24 +0900)]
evas filters: Enable down scaling with GL blur

This dramatically improves the performance and now seems
to give acceptable results. Eventually we need a quality flag
in order to enable this or not. Alternatively, "gaussian" blur
mode would skip this optimization, while "default" would trigger
it.

7 years agoevas filters: Avoid creating input buffer for images
Jean-Philippe Andre [Mon, 3 Apr 2017 06:34:10 +0000 (15:34 +0900)]
evas filters: Avoid creating input buffer for images

When the filtered object is an image, without borders, map,
fill info or anything of this sort, then the filter input
buffer is really just a copy of the original image. We can
skip that to save on memory usage and pixel fetches.

7 years agoevas filters: Implement obscure support for gl blur
Jean-Philippe Andre [Fri, 31 Mar 2017 04:10:41 +0000 (13:10 +0900)]
evas filters: Implement obscure support for gl blur

This can help with performance when a large region of the
filtered image (eg. snapshot) is fully hidden by an opaque
object. For instance the window border is hidden by the
opaque window content.

7 years agoevas: Fix cutout handling for snapshot objects
Jean-Philippe Andre [Thu, 30 Mar 2017 04:52:48 +0000 (13:52 +0900)]
evas: Fix cutout handling for snapshot objects

This improves over the previous code for handling
snapshot objects and cutouts. Basically any opaque object
above a snapshot should be obscuring it. That is true
unless a crazy filter is applied, or the snapshot object
is itself the source of a map or proxy.

This also uses eina_tiler instead of a custom (and really
bad) algorithm to compute the obscure regions.

7 years agoevas: Make save() work on snapshots
Jean-Philippe Andre [Tue, 28 Mar 2017 07:09:34 +0000 (16:09 +0900)]
evas: Make save() work on snapshots

This make save() work on snapshot objects, provided the call
is done from inside render_post.

Also, this saves the filtered output of an image, rather than
its source pixels. Any call to save() on a filtered image must
be done from post-render as well.

Fixes T2102

@feature

7 years agoevas gl: Make sure a deleted image can't be the target
Jean-Philippe Andre [Thu, 30 Mar 2017 01:26:24 +0000 (10:26 +0900)]
evas gl: Make sure a deleted image can't be the target

If we delete the image that was the target surface for gl
rendering, a crash would occur on the next render cycle.
Unlikely but not impossible to trigger from app side.

@fix

7 years agoevas filters: Switch to uniforms in GL blur
Jean-Philippe Andre [Tue, 28 Mar 2017 05:44:17 +0000 (14:44 +0900)]
evas filters: Switch to uniforms in GL blur

This was a poor attempt at improving the performance but
obviously the root cause isn't fixed (too many texel fetches).

Uniform should (theoretically) work better than an attribute
the for loop. Just a guess here.

This also makes GL blur use a float value as radius, allowing
future extension to non-integer blur radii, as well as using
linear scaling as a fast blur approximation.

7 years agoevas image: Factorize some code for render
Jean-Philippe Andre [Tue, 28 Mar 2017 05:40:29 +0000 (14:40 +0900)]
evas image: Factorize some code for render

This factorizes some of the common code for image render
and resolving is_inside (verifying alpha value of a pixel).
This should also be used by save(), as well as buffer_map().

This patch introduces lots of whitespace changes by using return
instead of long if() {} or else {} blocks.

7 years agoevas filters: Force redraw of snapshot if cutout shrank
Jean-Philippe Andre [Thu, 23 Mar 2017 06:55:41 +0000 (15:55 +0900)]
evas filters: Force redraw of snapshot if cutout shrank

The situation is clearly visible in the Snapshot test case:
increase the radius and a red glow would appear. This is because
the snapshot object was not marked as needing redraw and so had
no pixels under the opaque rectangle.

7 years agoevas filters: Move private data out of evas headers
Jean-Philippe Andre [Thu, 23 Mar 2017 07:22:43 +0000 (16:22 +0900)]
evas filters: Move private data out of evas headers

This moves the filter internal data back to the filters
implementation, rather than inside evas common headers.

7 years agoevas: Fix excessive redraws of snapshot objects
Jean-Philippe Andre [Wed, 22 Mar 2017 11:51:53 +0000 (20:51 +0900)]
evas: Fix excessive redraws of snapshot objects

7 years agoevas filters: Refactor to support reuse of buffers
Jean-Philippe Andre [Wed, 22 Mar 2017 07:55:26 +0000 (16:55 +0900)]
evas filters: Refactor to support reuse of buffers

This will reuse existing buffers by resetting only the minimum
required in the filter context (also reused). Work in progress,
as the actual reuse is disabled for now.

7 years agoevas filters: Reduce one log level
Jean-Philippe Andre [Wed, 22 Mar 2017 10:21:24 +0000 (19:21 +0900)]
evas filters: Reduce one log level

7 years agoevas filters: Remove warning about OpenGL
Jean-Philippe Andre [Wed, 22 Mar 2017 10:18:41 +0000 (19:18 +0900)]
evas filters: Remove warning about OpenGL

Well... I'm working on making all this work, so the log
is a bit irrelevant now.

7 years agoevas filters: Avoid unnecessary draw
Jean-Philippe Andre [Wed, 22 Mar 2017 07:16:22 +0000 (16:16 +0900)]
evas filters: Avoid unnecessary draw

This avoids creating one more FBO and doing one more draw,
by rendering the image input data directly into the input
buffer. This also makes the code common between SW and GL.

7 years agoevas filters: Optimize GL blur with interpolation
Jean-Philippe Andre [Tue, 21 Mar 2017 10:06:05 +0000 (19:06 +0900)]
evas filters: Optimize GL blur with interpolation

This optimizes the GL blur algorithm by reducing the number of
texel fetches (roughly half the number of before this patch). This
works by exploiting GL's interpolation capabilities.

7 years agoevas filters: Pass gaussian values to GL blur shader
Jean-Philippe Andre [Mon, 20 Mar 2017 14:25:05 +0000 (23:25 +0900)]
evas filters: Pass gaussian values to GL blur shader

7 years agoevas filters: Use GL downscaling for blur
Jean-Philippe Andre [Mon, 20 Mar 2017 11:20:21 +0000 (20:20 +0900)]
evas filters: Use GL downscaling for blur

This will improve the performance a lot. Now remains to figure
out the best values for downscaling and improve the actual blur
shader as well.

7 years agoevas filters: Recompile filter after data_set
Jean-Philippe Andre [Mon, 20 Mar 2017 11:16:19 +0000 (20:16 +0900)]
evas filters: Recompile filter after data_set

7 years agoelm_test: Add slider to control blur radius
Jean-Philippe Andre [Mon, 20 Mar 2017 10:57:56 +0000 (19:57 +0900)]
elm_test: Add slider to control blur radius

7 years agoevas: Consider objects in copy mode as opaque
Jean-Philippe Andre [Fri, 17 Mar 2017 05:54:40 +0000 (14:54 +0900)]
evas: Consider objects in copy mode as opaque

This skips extra tests with image objects that have the
is_opaque() function. That way, if an object is marked as COPY,
rendering of all objects below it will be skipped.

This can dramatically help with performance when flagging a
snapshot object as COPY. This should not be done if a filter is
applied and is meant to blend with the underlying UI.

7 years agoevas filters: Expand snapshot regions by blur radius
Jean-Philippe Andre [Fri, 17 Mar 2017 02:24:10 +0000 (11:24 +0900)]
evas filters: Expand snapshot regions by blur radius

When using a snapshot object we have access to exactly all
the pixels below it inside the snapshot surface. So, in order
to produce a nice blur, it is necessary to expand this snapshot
and then clip it otherwise the edges will look a bit ugly.

Unfortunately, there are still places where blurs didn't look
so good, as objects below an opaque region would never get
rendered into the snapshot object. So the edges, inside a
snapshot object, around an opaque region would have blur
artifacts.

This fixes that by shrinking the cutout regions by the radius
of the filter. Eg for blur this is the blur radius.

The test case in elm_test can exhibit this fix very clearly:
a red glow would be visible around the opaque rectangle, but with
these changes we instead see the blurry edges of the objects
below the rectangle.

7 years agoevas filters: Use obscured region in box blur (SW)
Jean-Philippe Andre [Wed, 15 Mar 2017 05:51:51 +0000 (14:51 +0900)]
evas filters: Use obscured region in box blur (SW)

Box blur is used by the default blur (in 2 or 3 passes) so it
is one of the most important and cpu-consuming filters in the
software engine.

7 years agoelm_test: Add obscuring rectangle in snapshot test
Jean-Philippe Andre [Wed, 15 Mar 2017 07:37:31 +0000 (16:37 +0900)]
elm_test: Add obscuring rectangle in snapshot test

This will test the obscured region optimization for the
filters.

7 years agoevas: Pass obscuring region to the filters
Jean-Philippe Andre [Wed, 15 Mar 2017 05:49:50 +0000 (14:49 +0900)]
evas: Pass obscuring region to the filters

This will be most useful in a special case, where a filter is
used in a window decoration, applied to a snapshot object.

Another optimization that might be wanted is passing a list
of update regions (from the proxy or snapshot).

The filters don't support the obscuring region yet, only some
of the high-level logic is implemented.

7 years agoevas: Optimize redraws of snapshot objects
Jean-Philippe Andre [Fri, 10 Feb 2017 07:08:58 +0000 (16:08 +0900)]
evas: Optimize redraws of snapshot objects

If anything in the canvas needs redraw and a snapshot object
happens to intersect with the update region then it was redrawn,
even if all objects below it hadn't changed. This has an insane
performance impact when you apply a blur filter on the snapshot
object. Walking the object list will always be cheaper than
rendering the snapshot!

Note: Added a FIXME comment and forced clean_them to be true
because some odd behaviour happens when breaking with GDB and
the array snapshot_objects keeps growing at each frame (I guess
only if we miss a frame or something like that).

7 years agoelm_test: Add a test case for evas snapshot
Jean-Philippe Andre [Fri, 10 Feb 2017 06:26:53 +0000 (15:26 +0900)]
elm_test: Add a test case for evas snapshot

This showcases the object (not a widget) and will be the basis
for a necessary optimization patch.

7 years agoevas: Improve blur filter perf by using 2 passes
Jean-Philippe Andre [Tue, 7 Feb 2017 09:48:46 +0000 (18:48 +0900)]
evas: Improve blur filter perf by using 2 passes

By simply splitting X and Y blurs in two passes we can improve
the performance of the blur filter a lot.

There is still much to be done to make it really fast and nice
looking:
- implement true gaussian blur (not sine-based approximation,
  right now the actual blurs look different in SW and GL)
- exploit linear interpolation for R tap instead of R*2+1 taps
  (a tap being a texel fetch)
- downscale & upscale large images with large blur radii

7 years agoevas filter: Implement blur filter in pure GL
Jean-Philippe Andre [Wed, 25 Jan 2017 09:06:29 +0000 (18:06 +0900)]
evas filter: Implement blur filter in pure GL

Wait a second though, this implementation is not only incomplete
(no support for box vs. gaussian blur), it's also insanely bad in
terms of performance. Small radii may work fine, but at least blurs
render properly in GL with this patch (no more glReadPixels!).

The shader needs a lot of love, including in particular:
- support for 1D box blur single pass
- support for 1D gaussian (or sine) blur
- use linear interpolation and N-tap filters
- separation of 2D blur in two passes (high-level logic)
- potentially separation of large 1D blurs in 2 or more passes
  knowing that 2sigma == sigma + sigma when it comes to the gaussian
  bell curve.

7 years agoevas filters: Implement displace filter in pure GL
Jean-Philippe Andre [Tue, 24 Jan 2017 06:28:18 +0000 (15:28 +0900)]
evas filters: Implement displace filter in pure GL

This one was a bit more... "fun". I had to add a new vertex
attribute and obviously using a VertexAttribPointer led to
incomprehensible crashes. But a simple glVertexAttrib2fv makes
it work like a charm!

A rare option is not handled yet.

7 years agoevas filters: Implement fill filter in pure GL
Jean-Philippe Andre [Tue, 24 Jan 2017 06:39:29 +0000 (15:39 +0900)]
evas filters: Implement fill filter in pure GL

Now that one was trivial. Could also be done with glClear and
glScissor instead, but the rectangle infrastructure works well
enough.

7 years agoevas filters: Implement mask filter in pure GL
Jean-Philippe Andre [Tue, 24 Jan 2017 05:23:03 +0000 (14:23 +0900)]
evas filters: Implement mask filter in pure GL

This reuses the existing mask infrastructure, but adds a color
flag to use the whole RGBA range, rather than just the Alpha
channel.

Filters are still very slow (glReadPixels and non-optimized use of
GL buffers...), but this is progress :)

7 years agoevas filters: Fix blur logic and GL buffer handling
Jean-Philippe Andre [Mon, 23 Jan 2017 08:55:17 +0000 (17:55 +0900)]
evas filters: Fix blur logic and GL buffer handling

This corrects two things:
- the blur filter high-level logic, that lead to reusing some
  temporary buffers which contained garbage;
- the versatile gl buffer implementation so that it now properly
  switches between the RGBA_Image and the FBO content (yes, this
  is insanely slow and inefficient... but it works and that was
  the only point).

7 years agoevas filters: Refactor ector and gfx filters A LOT
Jean-Philippe Andre [Wed, 18 Jan 2017 02:47:25 +0000 (11:47 +0900)]
evas filters: Refactor ector and gfx filters A LOT

Alright, so this is a massive patch that is the result of
trying to get rid of unused or poorly implemented classes in
ector. Originally ector was meant to support VG but extend to
things like filters as well. At the moment, ector's design
makes it quite hard to plug in the filters.

For now I think it's easier to implement the GL support for
the filters directly in the engine, where I hope to interfere
as little as possible.

This massive patch keeps only the required minimum to support
a versatile gl buffer that can be mapped, drawn or rendered to (FBO).
It's extremely inefficient as it relies on glReadPixels and lots
of texture uploads, as well as conversions between ARGB and Alpha.

Another type of GL buffer is a wrap around an existing GL image,
but that one is read-only (map or draw: no write map, no FBO).

No, all the filters run fine, and the high-level implementation
(evas_filters.c) does not need to know whether the underlying engine
is SW or GL. One problem though appears with the blending or blurring
of some Alpha buffers, the colors are wrong.

This patch removes more lines than it adds so it must be good ;)

7 years agoevas filters: Prepare GL support for blend operation
Jean-Philippe Andre [Tue, 17 Jan 2017 12:34:48 +0000 (21:34 +0900)]
evas filters: Prepare GL support for blend operation

No implementation yet, this is just the skeletton!

7 years agoevas: Rename software filter function type
Jean-Philippe Andre [Tue, 17 Jan 2017 13:15:09 +0000 (22:15 +0900)]
evas: Rename software filter function type

From Evas_Filter_Apply_Func to Software_Filter_Func.
Also fix include dir for out-of-tree builds of non-static sw generic.

7 years agoevas filters: Move blur to software generic (8/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 12:18:46 +0000 (21:18 +0900)]
evas filters: Move blur to software generic (8/8)

This completes the series of refactoring patches, where only the
filter implementation is moved to the engine rather than inside
evas itself.

7 years agoevas filters: Move transform to software generic (7/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 12:09:18 +0000 (21:09 +0900)]
evas filters: Move transform to software generic (7/8)

7 years agoevas filters: Move bump to software generic (6/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 12:00:36 +0000 (21:00 +0900)]
evas filters: Move bump to software generic (6/8)

7 years agoevas filters: Move displace to software generic (5/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 11:56:33 +0000 (20:56 +0900)]
evas filters: Move displace to software generic (5/8)

7 years agoevas filters: Move fill to software generic (4/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 11:48:31 +0000 (20:48 +0900)]
evas filters: Move fill to software generic (4/8)

This also moves the header evas_engine_filter.h to its subdir.

7 years agoevas filters: Move curve to software generic (3/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 11:34:16 +0000 (20:34 +0900)]
evas filters: Move curve to software generic (3/8)

This moves the RGBA premul/unpremul functions to static_libs/draw.

7 years agoevas filters: Move mask to software generic (2/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 10:33:50 +0000 (19:33 +0900)]
evas filters: Move mask to software generic (2/8)

7 years agoevas filters: Move blend to software_generic (1/8)
Jean-Philippe Andre [Tue, 17 Jan 2017 07:13:35 +0000 (16:13 +0900)]
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.

7 years agoEfl.Gfx.Path: Fix wrong condition check in _find_ellipsis_coords
Jeeyong Um [Fri, 14 Apr 2017 01:16:48 +0000 (10:16 +0900)]
Efl.Gfx.Path: Fix wrong condition check in _find_ellipsis_coords

Summary:
In previous patch, !w should be replaced with EINA_FLT_EQ(w, 0.0), but it was
replaced with !EINA_FLT_EQ(w, 0.0). This breaks rounded rectangle.

T5291

Test Plan: compile and run attached file

Reviewers: cedric, jpeg, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

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

7 years agoevas: move Efl_Canvas_Output to be an internal only API.
Cedric BAIL [Thu, 13 Apr 2017 22:25:29 +0000 (15:25 -0700)]
evas: move Efl_Canvas_Output to be an internal only API.

7 years agoevas: this symbol actually don't exist.
Cedric BAIL [Thu, 13 Apr 2017 21:39:46 +0000 (14:39 -0700)]
evas: this symbol actually don't exist.

7 years agoRevert "efl: terrible kludge so avoid termination crash on osx"
Stefan Schmidt [Thu, 13 Apr 2017 12:32:07 +0000 (14:32 +0200)]
Revert "efl: terrible kludge so avoid termination crash on osx"

The only purpose of this commit was to allow efl 1.19 to be
released on macOS wothout crashing on termination. Time to revert
it and see that we can find a real fix for the next release.

This reverts commit cd5e755951c0126f136b6e7cfded14056d8336fa.

ref T5245

7 years agoeolian: allow extending eolian-generated classes from within C
Daniel Kolesa [Thu, 13 Apr 2017 13:56:15 +0000 (15:56 +0200)]
eolian: allow extending eolian-generated classes from within C

If you define either the macro MY_CLASS_EXTRA_OPS for normal
methods/properties or MY_CLASS_EXTRA_CLASS_OPS for class methods
or properties, which contains a comma-delimited list of ops defs
(i.e. EFL_OBJECT_OP_FUNC(...), ...) right before including the
generated my_class.eo.c file, the definitions from these will
be included in the actual class. This can be used to override
certain things in a class internally without exposing it to
Eolian, or for testing/debugging.

7 years agoefl vpath: Check and terminate execution if set*uid() calls fail
Bryce Harrington [Thu, 13 Apr 2017 07:41:02 +0000 (16:41 +0900)]
efl vpath: Check and terminate execution if set*uid() calls fail

Summary:
Quells warnings:
    lib/efl/interfaces/efl_vpath_core.c:117:9: warning: ignoring return
    value of â€˜setuid’, declared with attribute warn_unused_result
    [-Wunused-result]
         setuid(geteuid());
         ^
    lib/efl/interfaces/efl_vpath_core.c:169:9: warning: ignoring return
    value of â€˜setreuid’, declared with attribute warn_unused_result
    [-Wunused-result]
         setreuid(uid, geteuid());
         ^

Reviewers: raster, jpeg

Reviewed By: raster

Subscribers: cedric, jpeg

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

7 years agoGenlist: Performance optimization for genlist in non-filter cases
Godly T.Alias [Thu, 13 Apr 2017 07:40:28 +0000 (16:40 +0900)]
Genlist: Performance optimization for genlist in non-filter cases

Summary:
When _item_filtered_get is called, block and pan re-calculations
happen, When there is no filter applied, we can skip item filtering to
avoid some unwanted calculations

Reviewers: cedric, raster, SanghyeonLee

Reviewed By: raster

Subscribers: rajeshps, Princekrdubey, cedric, jpeg

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

7 years agoecore_input: add API to get name of joystick.
Shinwoo Kim [Thu, 13 Apr 2017 05:53:47 +0000 (14:53 +0900)]
ecore_input: add API to get name of joystick.

Summary:
The Ecore_Event_Joystick would be not enough information on user side.
Because the button index such as ECORE_EVENT_JOYSTICK_BUTTON_SELECT/START/META,
etc could be mapped to different button for different named joystick.

Test Plan: Using example

Reviewers: raster, cedric, jpeg

Reviewed By: raster

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

7 years agoevas: engine_info set/get should never show up in Eo API.
Cedric BAIL [Fri, 7 Apr 2017 21:05:16 +0000 (14:05 -0700)]
evas: engine_info set/get should never show up in Eo API.

Eo API are for something we want to expose to third party application
and bindings. engine_info is exactly what we don't want to expose.

7 years agoecore_evas: fix use of new VNC API in example.
Cedric BAIL [Wed, 22 Mar 2017 21:39:58 +0000 (14:39 -0700)]
ecore_evas: fix use of new VNC API in example.

7 years agoevas: remove pixels hook from x11 backend now that we don't use it anymore
Cedric BAIL [Wed, 22 Mar 2017 19:56:28 +0000 (12:56 -0700)]
evas: remove pixels hook from x11 backend now that we don't use it anymore

7 years agoevas: remove pixels hook from fb now that we don't use it anymore.
Cedric BAIL [Wed, 22 Mar 2017 19:56:08 +0000 (12:56 -0700)]
evas: remove pixels hook from fb now that we don't use it anymore.

7 years agoecore_evas: change VNC API and use snapshot internally.
Cedric BAIL [Wed, 22 Mar 2017 18:19:27 +0000 (11:19 -0700)]
ecore_evas: change VNC API and use snapshot internally.

7 years agoecore_con: send server_upgrade event *after* clearing pending saves
Bryce Harrington [Wed, 12 Apr 2017 21:38:56 +0000 (14:38 -0700)]
ecore_con: send server_upgrade event *after* clearing pending saves

Summary:
The _ecore_con_post_event_server_upgrade() call adds an event to free
the server_upgrade object, svr, via  _ecore_con_server_free(svr) so we
should assume srv is freed after it returns.  Thus, perform the
pending_slice processing prior to calling it.  Otherwise it triggers an
illegal access (USE_AFTER_FREE) error in Coverity.

@fix CID1373485

Reviewers: barbieri

Reviewed By: barbieri

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoevas: correct pluralization grammar in Evas_Eo.h
Bryce Harrington [Wed, 12 Apr 2017 21:27:37 +0000 (14:27 -0700)]
evas: correct pluralization grammar in Evas_Eo.h

Test Plan:
- There are other grammatical errors, but I'm focusing this patch just
  on pluralization-related issues to ease review and make it clearer if
  I've introduced any inaccuracies.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agonotify: fix hide animation logic for popup
JinYong Park [Wed, 12 Apr 2017 21:25:51 +0000 (14:25 -0700)]
notify: fix hide animation logic for popup

Summary:
When popup is timeout, notify call hide func, and send time out event to popup.
After popup receiving time out event, popup hide object again,
so hide animation doesn't show.
And notify hide function doesn't send hide signal to block events part,
(but dismiss function send it)
So add that signal.

Test Plan:
 1. elementary_test -to popup
 2. click first item, "popup+center+text"
 3. compare time out event before this patch and after.

@fix

Reviewers: herb, singh.amitesh, Hermet, cedric, raster, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoevas: Fix event propagation in elm_widget
Jean-Philippe Andre [Wed, 12 Apr 2017 11:13:59 +0000 (20:13 +0900)]
evas: Fix event propagation in elm_widget

See the previous commit. efl_provider_find() could not
find a canvas because the event object had no parent.

This restores the slider in E's sound mixer.

Note: Input events may expose the evas canvas object
because of parenting. This will eventually need fixing,
as only efl.ui.win should be exposed.

If 8ff2dffe7c7a21278dis backported to 1.19 then this patch
also needs to be merged as well.

7 years agoevas/elm: Fix bad propagation of ON_HOLD flag
Jean-Philippe Andre [Wed, 12 Apr 2017 09:30:22 +0000 (18:30 +0900)]
evas/elm: Fix bad propagation of ON_HOLD flag

Test scenario:
  elementary_test -to "ExtScroller"

Try and modify a slider's value with the mouse wheel. Bad things
were happenning, as the flag ON_HOLD was not properly propagated
from the slider to the scroller. This is because the legacy
event_info structure inside the eo event info was not updated
with the new flag value.

By introducing a new EO only API, which is meant to remain
internal, we can use a single legacy info structure, fixing
this issue.

Note: In the future this API needs to be internal, not protected.

@fix

7 years agoconfigure: switch to dev mode again
Stefan Schmidt [Wed, 12 Apr 2017 09:19:25 +0000 (11:19 +0200)]
configure: switch to dev mode again

Merge window for 1.20 is now open.

7 years agorelease: Update NEWS and bump version for 1.19.0 release
Stefan Schmidt [Wed, 12 Apr 2017 08:23:06 +0000 (10:23 +0200)]
release: Update NEWS and bump version for 1.19.0 release

7 years agobuild: disable epoll support on solaris based systems
Stefan Schmidt [Wed, 12 Apr 2017 07:59:08 +0000 (09:59 +0200)]
build: disable epoll support on solaris based systems

We have a report where the use of epoll breaks such systems. Disabling it for
now to make them work again. A deeper analysis is underway to understand this
better and maybe have epoll support later.

7 years agoscroller: Fix issues with looping and paging
Jean-Philippe Andre [Wed, 12 Apr 2017 07:59:14 +0000 (16:59 +0900)]
scroller: Fix issues with looping and paging

Prerequisites:
  Disable scroll animation (in elementary_config)

Test case:
  elementary_test -to Scroller

1. Scroll with the mouse wheel. Scrolling will not loop or anything.
2. Enable loop in Y, scroll to the top and to the bottom, verify
   that scrolling loops fine and shows the last and first page in
   full.
3. Enable page snapping, and repeat 2.

FIXME: Page snapping doesn't do much if you use thumbscroll or
       drag the scrollbars.

FIXME: In the test case, Y +/- 1 is useless as the scroller snaps
       to the pages even without snapping enabled.

@fix

7 years agoscroller: Fix freeze after dragging bars
Jean-Philippe Andre [Wed, 12 Apr 2017 06:02:42 +0000 (15:02 +0900)]
scroller: Fix freeze after dragging bars

The freeze property is a set() only but could internally
be reset to false, after dragging a vertical or horizontal slider.

Test scenario:
  elementary_test -to scroller

Click Freeze, test the mouse wheel (can't do anything), drag a
scroller side bar, test the mouse wheel again.

Before this patch, the scroller would scroll. After the patch, the
scroller remains fixed, respecting the value of freeze.

FIXME: It is possible that the proper fix would be to disable
       bars drag during freeze, but that is not the case currently.

NOTE: freeze, hold, movement_block, lock_x/y have very similar
      meanings. The doc really needs clarification here, and some
      property might be removed. Also, freeze and hold have no
      getter, only a setter. drag_lock_x/y is part of elm_widget,
      and not specific to scrollers.

7 years agoscroller: Fix CRI if scroll animation is disabled
Jean-Philippe Andre [Wed, 12 Apr 2017 05:17:09 +0000 (14:17 +0900)]
scroller: Fix CRI if scroll animation is disabled

If the scroll animation is disabled, we ended up with an
immediate call from inside a post-event callback to modify
the canvas geometry which led to feeding events. Since
99d21f6d9c6e65 and 54e5841b2f638 it is basically forbidden
to modify the canvas or feed events from the post-event cb.
This is because feeding events from inside the post-event
callback can break the logical order of operations between
post-event cb and event cb.

Note: This also implements no-animation scrolling for page
scroll, in case scroll animation is disabled (unifying the
code did that).

Fixes T5289 (abort inside E)

7 years agoscroller: Fix wheel scroll with imbricated H+V scrollers
Jean-Philippe Andre [Wed, 12 Apr 2017 02:31:21 +0000 (11:31 +0900)]
scroller: Fix wheel scroll with imbricated H+V scrollers

Test scenario:
 elementary_test -to "Scroller 2"

Use the mouse wheel to scroll inside the horizontal scroller
(the one with many "...Horizontal scrolling..." buttons). This
scroller should scroll horizontally. When reaching the end of
this scroller, the main vertical scroller should take over
and scroll vertically, but only after a 0.5s timeout has passed.

Before this patch, you could wait forever and scrolling inside
the horizontal scroller would never trigger a scroll in the main
vertical scroller, despite reaching the end point.

In 1.18 both the main and the horizontal scrollers scroll
simultaneously. The imbricated vertical scrollers seem to work
as designed, but not H inside V.

@fix

7 years agoEvas_Common: Fix minor grammatical errors
Bryce Harrington [Tue, 11 Apr 2017 15:48:36 +0000 (11:48 -0400)]
Evas_Common: Fix minor grammatical errors

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, jpeg

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

7 years agoEvasGL: Do internal make current if context changed.
Minkyoung Kim [Tue, 11 Apr 2017 07:20:07 +0000 (16:20 +0900)]
EvasGL: Do internal make current if context changed.

Summary:
Before, rsc->current_ctx is always same with ctx.
So checking context change was meaningless.
From now, it has meaning.

Test Plan: App call evas_gl_make_current more than twice in pixels callback. Those surfaces are indirect rendering surface.

Reviewers: jpeg, dkdk, wonsik

Reviewed By: jpeg

Subscribers: cedric

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

7 years agoevas: If there isn't clipper when recalcing clip, set mask.clip = NULL.
Minkyoung Kim [Tue, 11 Apr 2017 04:47:55 +0000 (13:47 +0900)]
evas: If there isn't clipper when recalcing clip, set mask.clip = NULL.

Summary:
There's problem in Tizen3.0.

1. Clip set mask_obj to obj for masking.
2. Unset mask_obj from obj, and del mask_obj.
3. obj has clip.mask still. So obj is trying to do mask_subrender() for freeed mask_obj.

So reset clip.mask to NULL, If there isn't clipper.

Now, there's no routine for reseting clip.mask when clipper object is freed. isn't it?
Actually I'm not sure that clip.mask=NULL should be there as this patch.

Test Plan: Tizen3.0 wearable

Reviewers: cedric, raster, wonsik, jpeg

Subscribers: scholb.kim, dkdk

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
7 years agoelementary - efl ui flip - fix map apply for page flip
Carsten Haitzler (Rasterman) [Tue, 11 Apr 2017 00:56:22 +0000 (09:56 +0900)]
elementary - efl ui flip - fix map apply for page flip

this mirrors the fix in fd69113f6a9e2735a3e1ad2d0830982c722f453e by jp
into the elm flip widget too.

@fix

7 years agowayland_imf: Fix bug in shutdown
Derek Foreman [Mon, 10 Apr 2017 19:44:33 +0000 (14:44 -0500)]
wayland_imf: Fix bug in shutdown

Theoretical bug that may become real in the coming days - ecore_imf's
wayland module has the interface for the text input protocol.  The
imf module gets unloaded after destroying the protocol object but
before receiving all events from the server destined for it.

Currently that's fine, but I've posted some wayland patches for
review that require the interface to remain present while the text
input object is a zombie.  These patches cause some EFL apps to
crash on shutdown when they unmap the wayland imf module.

This moves the wayland interface bits into ecore_wl2 which doesn't
get unmapped.

7 years agoevas map: Fix test case "Flip Page"
Jean-Philippe Andre [Mon, 10 Apr 2017 10:38:56 +0000 (19:38 +0900)]
evas map: Fix test case "Flip Page"

Since 9b7ac51943ba0d6391b75cf evas map tries to avoid recalculating
stuff when the map parameters have not changed. Unfortunately the
code in elementary_test -to "Flip Page" was badly written. It was
modifying a constant's internal value (after ugly cast). So the
memcmp() and all other checks would return successfully, as the
exact same pointer was being compared to itself.

So, I've fixed the comparison by adding some forgotten parameters
(perspective) but most importantly I fixed the map API usage in the
test case.

7 years agoevas filters: Fix a rare crash in text render (SW)
Jean-Philippe Andre [Mon, 10 Apr 2017 07:56:14 +0000 (16:56 +0900)]
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

7 years agoedje: Add workaround for misuses of clip_set
Jean-Philippe Andre [Mon, 10 Apr 2017 07:01:28 +0000 (16:01 +0900)]
edje: Add workaround for misuses of clip_set

An unfortunately very common misuse of clip is as follows:

- Layout A is created (edje object / elm_layout)
- Object B is swallowed inside A
- Clipper C is set to clip B

This is a invalid usage, as layout A takes control over the clip
property of B (just like it does for geometry, visibility, color...).

Since 75ec3a7338c9c2406d4 edje_recalc resets the clip at every calc
loop, as it can change between states.

In the past, edje_recalc did not reset the clip so anyone could
(wrongly) swallow an object and then change its clip from C to modify
its color, mask it, blend it, etc... Even though this was not proper
use of the API, this is not very clearly documented, and since it
worked, it has been (ab)used a lot already.

The result now is that a clipper set from C will become visible
as an opaque white rectangle covering the entire UI. Booh.

This patch is a workaround that should have no impact on well
written applications. As a bonus this avoids an extra call to
clip_set() from edje.

@fix

7 years agoevas: give width offset when Evas tries to find ellipsis position
Youngbok Shin [Mon, 10 Apr 2017 03:15:19 +0000 (12:15 +0900)]
evas: give width offset when Evas tries to find ellipsis position

Summary:
If the last item before ellipsis item has bigger width than its advance,
evas_common_font_query_last_up_to_pos() function can find wrong ellipsis position.
When Evas finds a position for non last item, Evas must care about additionally
available space for glyph's width of the given x position.

ex) the last item's glyph before ellipsis item has a tail to draw above the ellipsis item.

@fix

Test Plan:
Test case will added as comment.
(Becasue of font license problem.)

Reviewers: herdsman, raster, jpeg, woohyun

Subscribers: cedric, Blackmole

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

7 years agoelm config - reload at runtime - fix env var overrides being lost
Carsten Haitzler (Rasterman) [Mon, 10 Apr 2017 02:05:56 +0000 (11:05 +0900)]
elm config - reload at runtime - fix env var overrides being lost

if you set config via environment variables then sa config
update/reload may end up overriding these again whenever it is updated
and thus may result in scaling or other things suddely changing

@fix

7 years agoevas - async preload cancel fix - don't double delete/free
Carsten Haitzler (Rasterman) [Mon, 10 Apr 2017 01:40:52 +0000 (10:40 +0900)]
evas - async preload cancel fix - don't double delete/free

just match the ref with the drop anddon't also manually free the image
as this leads to accessing of freed memory which is not a good thing.

this should fix T5374

@fix

7 years agoefl_net_socket_ssl (dialer): emit "resolved"
Gustavo Sverzut Barbieri [Sat, 8 Apr 2017 22:19:42 +0000 (19:19 -0300)]
efl_net_socket_ssl (dialer): emit "resolved"

for dialers we should also monitor "resolved" from inner TCP socket
and emit that ourselves, letting people know that we have an IP
address.

this is important for ecore_con_legacy.c, since the svr->ip is only
decoded and stored once when this signal is emitted.

7 years agoecore_con_legacy: fix legacy compatibility for ecore_con_server_send()
Gustavo Sverzut Barbieri [Sat, 8 Apr 2017 22:03:53 +0000 (19:03 -0300)]
ecore_con_legacy: fix legacy compatibility for ecore_con_server_send()

Since efl_net_ssl_context is immutable for a dialer and we create the
dialer with the context, the SSL cases uses a trick to postpone dialer
creation using a job, then it allows one main loop iteration for the
user to call various ecore_con_server_ssl_*() methods.

However this breaks immediate ecore_con_server_send() after
ecore_con_server_connect() as used to be allowed and used by
azy/erssd.

Most people wouldn't notice that, since the most common case is to
either use ecore_con_url (which uses cURL and a complete different
code path) OR they would wait for ECORE_CON_EVENT_SERVER_ADD prior to
sending data.

Nonetheless it was a compatibility issue and must be fixed.

Fixes T5339

7 years agoelm_code: trigger user change event on applying an undo/redo
Andy Williams [Fri, 7 Apr 2017 22:36:29 +0000 (23:36 +0100)]
elm_code: trigger user change event on applying an undo/redo

@fix

7 years agoecore-wl2: do not reconnect on protocol error for non-server processes
Mike Blumenkrantz [Fri, 7 Apr 2017 20:06:41 +0000 (16:06 -0400)]
ecore-wl2: do not reconnect on protocol error for non-server processes

this is not a recoverable state

@fix

7 years agoelm_win: set wl window type during finalize
Mike Blumenkrantz [Fri, 7 Apr 2017 20:06:41 +0000 (16:06 -0400)]
elm_win: set wl window type during finalize

@fix

7 years agoecore-wl2: create window surfaces immediately when windows are created
Mike Blumenkrantz [Fri, 7 Apr 2017 20:06:41 +0000 (16:06 -0400)]
ecore-wl2: create window surfaces immediately when windows are created

7 years agoecore-wl2: stop setting all windows as toplevels on creation
Mike Blumenkrantz [Fri, 7 Apr 2017 20:06:41 +0000 (16:06 -0400)]
ecore-wl2: stop setting all windows as toplevels on creation

this is not a valid assumption since toplevel is a shell-specific concept and
it's possible to run a shell which does not implement such windows

@fix

7 years agoecore-wl2: CRI when attempting to create a window from a server display object
Mike Blumenkrantz [Fri, 7 Apr 2017 20:06:41 +0000 (16:06 -0400)]
ecore-wl2: CRI when attempting to create a window from a server display object

7 years agoelementary: fix test breakage.
Cedric BAIL [Fri, 7 Apr 2017 18:38:10 +0000 (11:38 -0700)]
elementary: fix test breakage.

It is perfectly valid to call this API with no pointer provided.

7 years agoelm_code: Expose whether or not undo and redo can operate
Andy Williams [Fri, 7 Apr 2017 17:14:31 +0000 (18:14 +0100)]
elm_code: Expose whether or not undo and redo can operate

A quick peek at the stack will allow us to inform users
of the widget if operations will apply.

7 years agoecore_drm2: Use correct drm context version
Derek Foreman [Fri, 7 Apr 2017 14:09:56 +0000 (09:09 -0500)]
ecore_drm2: Use correct drm context version

We should be setting this to the context version we understand, not
the highest version supported by the library.

From Daniel Stone's recent intel-gpu-tools commit fixing the same bug:
With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.

7 years agoelementary: win - override atspi component get interface
Shinwoo Kim [Fri, 7 Apr 2017 04:17:58 +0000 (13:17 +0900)]
elementary: win - override atspi component get interface

The efl_ui_win overrides _elm_interface_atspi_component_extents_get to give
correct value if screen_coord is EINA_FALSE which means relative position.
The efl_ui_win has given its object geometry value + ecore evas geometry value.
The object geometry value was equal to the ecore evas geometry value, so the
relative position was not correct(twice of ecore evas geometry value).