Commit Graph

53069 Commits

Author SHA1 Message Date
Derek Foreman fddbf75fc9 Fix sed error that changed "video" to "videfl"
commit c662934be8 seems to have accidentally
renamed a few instances of _video_ to _videfl_, this hopefully changes
them all back.
2017-04-17 17:06:28 -05:00
Derek Foreman 6319f3831a ecore_wl2: Remove unused code
ecore_wl2 contains a bunch of code for compositor side seat handling.
There's really no need for a client to do this, and E does the
compositor side seat stuff internally, so this code will never
be used.

This removes the unused code.
2017-04-17 14:45:14 -05:00
Carsten Haitzler 0a600a45d3 Revert "ecore_imf: Add ecore_imf_context_keyboard_mode_get API"
This reverts commit 4533eef59b.

this commit breaks efl's build and can't be fixed - missing types.
2017-04-17 17:23:19 +09:00
Carsten Haitzler 2055a876c4 ecore pipe - fix cast warning by casting (validly) 2017-04-17 17:08:33 +09:00
Jean Guyomarc'h 8f0402e2fb ecore: fix build on macOS
Epoll/timerfd is not available on "everything but Windows".
This fixes a76ebea2d8.
2017-04-17 09:57:53 +02:00
Jihoon Kim 4533eef59b ecore_imf: Add ecore_imf_context_keyboard_mode_get API
Summary:
When the keyboard mode state is changed, the keyboard_mode_event_cb will be called, too.
But there is no way to get keyboard mode manually.

Test Plan: Tested in Tizen device

Reviewers: jihoon, woohyun, id213sin

Reviewed By: jihoon

Subscribers: jpeg, z-wony, jsuya, cedric

Differential Revision: https://phab.enlightenment.org/D4786
2017-04-17 16:53:50 +09:00
Carsten Haitzler 2ea4872869 ecore_pipe - fix recent patch to close on exec the epoll fd 2017-04-17 14:23:33 +09:00
Ivan Furs a76ebea2d8 ecore_pipe: added epoll
Summary: integration epoll in ecore_pipe

Reviewers: cedric, NikaWhite, rimmed, an.kroitor, vtorri, raster

Reviewed By: raster

Subscribers: artem.popov, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4754
2017-04-17 12:28:42 +09:00
Ivan Furs 0e7ee821cd eina: For Windows fix crash when the file was opened many times.
Summary:
A similar problem as:
    commit 62b469749a

Reviewers: NikaWhite, t.naumenko, an.kroitor, FurryMyad, cedric, raster, vtorri, rimmed

Reviewed By: raster

Subscribers: artem.popov, cedric, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D4788
2017-04-17 11:51:05 +09:00
Carsten Haitzler 2171855a1a elm test - fix windows compilation as _close is used in windows
fix T5391 - windows compilation due to symbol clash

@fix
2017-04-17 11:31:22 +09:00
Carsten Haitzler a85494a5b2 emotion - gstreamer1 - fix yuv import funcs to use gst stride + offset
so our yuv import funcs for gstreamer 1.x engine were ignoring the
plane offsets and strides provided by gstreamer. though this nicely
shows that these numbers provided are actually wrong - at least in the
testing with vaapi back-ends with gst.

so this fixes emotions' badness but there is still badness in gst
apparently. the numbers provided if used are just simply wrong for teh
image data. commented code in the src to show how to "Fix it up" by
forcing some alignment of content to get it to work.

@fix
2017-04-16 12:56:11 +09:00
Jean-Philippe Andre d87a65e825 evas gl: Fix compilation for EGL 2017-04-14 13:57:04 +09:00
Jean-Philippe Andre 2497480330 makefile: Fix make dist (with filters) 2017-04-14 13:57:04 +09:00
Jean-Philippe Andre 03b0e23137 evas filters: Fix rare crash with async render
Reported by bu5hm4n

@fix (backport will look slightly different)
2017-04-14 13:57:04 +09:00
Jean-Philippe Andre 3c92b32c13 evas filters: Fix async RW rendering
This fixes a crash (when deleting the output image), and rearranges
the code a bit.
2017-04-14 13:57:04 +09:00
Jean-Philippe Andre 30ac315631 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.
2017-04-14 13:57:04 +09:00
Jean-Philippe Andre 01a4ecd92c 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).
2017-04-14 13:57:04 +09:00
Jean-Philippe Andre 5467d1eb3e 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).
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 4cbff5f0ea 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre b5a5f61cd6 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).
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre fc92a1c0f6 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 293438111c 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 45548e8358 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 08a8072571 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre c53f1526f1 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
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre e7eb97f3b0 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
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 06a7beec52 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 408115cef6 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 530399acde 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre a8b6c1cd7f 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre b6c5af5edc evas: Fix excessive redraws of snapshot objects 2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 1bf24f8762 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.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 7407a0d073 evas filters: Reduce one log level 2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 9aa335cecc evas filters: Remove warning about OpenGL
Well... I'm working on making all this work, so the log
is a bit irrelevant now.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre b77cb960ca 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre ebeead4681 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 6af3c20aeb evas filters: Pass gaussian values to GL blur shader 2017-04-14 11:26:43 +09:00
Jean-Philippe Andre a9ddeeb4fb 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre d56f9afa40 evas filters: Recompile filter after data_set 2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 513d686628 elm_test: Add slider to control blur radius 2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 3f6f51560a 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 1336b2d9e0 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre e52a04ef8f 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 1639c06118 elm_test: Add obscuring rectangle in snapshot test
This will test the obscured region optimization for the
filters.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 9b1ea2fc6b 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre a6951397f6 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).
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 096af26dd6 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre b90246a619 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
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 5bce7120f1 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 125c7d956e 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.
2017-04-14 11:26:43 +09:00