This is a copy of the "Flip Page" map usage example that relies
on the new set of APIs for EO. This was used to test the API
and show its usage.
The calculation being done in absolute values, this does not
really exploit the new API, but instead proves that it is on
par feature-wise.
The performance is worse than with legacy, because of extra list
walkings, map calculations, small struct allocations and eo calls.
This fixes the shadow of the page which was broken with the legacy
API (as color_get did not recalc the map).
A better implementation can probably be done without having
to rely so much on absolute coordinates.
I've done this by translating "Flip Page" to this new set of
EO APIs. In particular, absolute coordinates need to be used
in some calls, and the map needs to be calculated between
get and set operations.
This required an adjustment of the raw_coord API as the flip_page
code does some math after reading and then writing to the map.
Same for color. Those two properties now act like commands (ie.
like the other gfx map functions).
This also introduces a duplicate set of APIs to handle absolute
coordinates. Other solutions included:
- Use an enum to specify the type of coordinates (but then the
unit of cx,cy varies between non-unit relative position and
pixel position. Also this adds an extra argument to all those
function calls.
- Pass a special value (an empty eo object) as the argument for
pivot. Same remark about the unit as above. This way was
deemed too confusing because of the weird object.
Those two options have been discarded after asking the opinion
of a few developers I could reach.
@feature
This implements an entirely new API model for Evas Map by relying
on high-level transformations on the object rather than an external
Evas_Map structure that needs to be constantly updated manually.
The implementation relies on Evas_Map.
To rotate an object all you need to do now is
efl_gfx_map_rotate(obj, 45.0, NULL, 0.5, 0.5);
Or with a C++ syntax:
obj.rotate(45.0, NULL, 0.5, 0.5);
Or even simply (with default arguments):
obj.rotate(45.0);
The map transformation functions are:
- rotate
- rotate_3d
- rotate_quat
- zoom
- translate (new!)
- perspective_3d
- lightning_3d
@feature
Manual points population will eventually be useless as the
map API will become more like a transformation API, where
the current object geometry doesn't matter as much as which
transformation is applied to it.
In the map examples, the map image UV size was based on the image
source geometry, rather than the image geometry itself.
In the example, this affects how the glass is mirrored. Before this
patch, the reflection is a single line stretched. EFL 1.18 and 1.19
seem to have the same issue, while 1.17 simply fails to show any
reflection. 1.16 fails miserably and the entire window is black.
If the original code was correct, then I believe that map and/or
proxy rendering have been modified in a way that affects the meaning
of those image UV parameters. But this seems like the regression (if
it is one) is in fact quite old.
@fix
This fixes the commit 169a08c03a (efreetd:
BSD optimizations). Coverity rightly pointed out six different leaks of
various buffers on error paths.
CID: 1374949 1374950 1374951 1374952 1374953 1374954
Somehow this long standing bug wasn't obvious until wayland 1.13.0 made
some additions to an opaque structure.
This changed the frequency that new buffers came to us with the exact
same pointer value of a buffer that had just been freed.
This shortcut in eng_image_native_set has always been wrong - we need to
proceed to the end to make sure we pick up new dmabuf attributes.
Summary:
Also fixes a handful of obvious indentation irregularities,
including some reformatting of some printf() multi-line indents that
commit a71b770b did not properly adjust.
No functional code changes.
Reviewers: cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4864
Summary:
Adds a line between each function so it's more obvious what doc goes
with what API routine. Reorganize the doxygen elements so they're
consistently ordered and spaced.
No code or documentation changes; mostly just whitespace.
Reviewers: cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4866
With the wayland backend, it is posible to have no seat connected
until later. This would lead to calling evas_object_pointer_mode_set
and fail without returning a boolean it was impossible to detect it
did fail. This patch correct it.
696ed3e2e8 introduced a build failure on
macOS. _ecore_evas_subregister is being used in a foreign code module,
but it was not exported. Enforcing EAPI gives this symbol enough
visibility to be used outside of ecore_evas.
Summary:
Escaping is not happening whenever any escapable characters is coming after
'\t' or '\n'. It will also fix invalid read of 1 byte which happens for string where
last charachter is '\t' or '\n' like "eina\t".
Test Plan:
Take a string like "eina\t ". Observe space which is followed by tab is not getting
escaped.
Signed-off-by: Prasoon Singh <prasoon.16@samsung.com>
Reviewers: shilpasingh, rajeshps, govi, cedric
Reviewed By: shilpasingh
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4847
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Small patch which starts to implement refcounting on framebuffer
objects. This will be needed so that we do not free FB objects while
they are on the screen.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
For people browing through the examples, having the opening statement be
concise and consistent will help them more quickly find what they're
looking for.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Test Plan:
Some of the examples had identical opening statements (e.g. the image
object examples). I've tried to give each a unique description defining
what they are demonstrating, but you may want to doublecheck I got these
correct. Of particular note, to me evas-images5.c looks like just a
fixup to evas-images4.c, so I'm not sure what makes these two distinct.
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4861
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
In Issue scenario when _elm_theme_set was called,object was already deleted by app causing
unnecessary addition of the style in style_not_found list.
Check for object validity, if object is NULL return theme apply failed.
Test Plan: Make object pointer NULL before _elm_theme_set is called.
Reviewers: cedric, shilpasingh
Subscribers: rajeshps, govi, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4840
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Applies same change as e8355c93 for evas, to the remaining examples.
This uses the shell command-line:
src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 \
| uniq | xargs sed -i "s/fprintf(stdout/printf(/"
Note that use of the "fprintf(stdout" construct can generate warnings
when -Wformat-security is enabled, if the fprintf statement has no
format arguments, so in addition to the stylistic simplification this
also helps quell those spurious warnings.
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4836
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This fixes fullscreen feature in Elm on Windows as the geometry of the desktop
was not known.
In case of multiple displays, the desktop, where the window is displayed, is used for fullscreen.
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
The return value of the function eina_mempool_malloc was dereferenced without checking. I added the checking code similar to the other codes.
@fix
Reviewers: raster, cedric, jpeg, herdsman, woohyun, stefan_schmidt
Subscribers: stefan_schmidt
Differential Revision: https://phab.enlightenment.org/D4855
Summary:
Evas can't open tiff file because of no implement in client read api.
I wrote codes simply for open.
Test Plan: self
Reviewers: jpeg, cedric, jypark
Subscribers: stefan_schmidt
Differential Revision: https://phab.enlightenment.org/D4857
On touch devices there is the normal gesture to touch on the screen and
hold until the drag operation started.
For users of a mouse there is the gesture of just click and drag the
mouse away.
This commit changes the behaviour of the start based on the device that
sent the event
We keep planes on the plane list to ensure a released plane is removed
from display - however this means that if a caller starts messing with
a plane after release, that it could potentially reposition a plane it
doesn't own anymore.
Use EINA_SAFETY macros to prevent this.
The release flag is actually less useful than the existing in_use flag
for determining if a plane is unused. If a new plane is assigned before
the next flip cleans up released planes, then it can point to a released
plane state, and both it and the previous user will be freed on the next
commit, leaking a plane.
Putting the flag in the plane structure fixes this while still allowing us
to keep released planes around to ensure a recently released plane is
cleared from atomic state.
If we don't do a flip test, the atomic state isn't updated. This fixes
a potential problem where the last operation in state preparation is
a release - the following commit wouldn't include state from the release.
This patch fixes plane_state values during atomic flip test for any
planes marked for release. When the fb_flip actually completes, we
will remove the marked plane(s) from the output.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we cannot immediately remove a plane from an output, due to needing
an atomic commit to actually remove the plane from screen, we can use
a 'release' flag to indicate that a given plane needs removal from the
screen during our next atomic commit.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we need to be able to commit a new plane state for any released
planes, we should not be removing them from the output list just yet.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Unfortunately the plane sized returned from the cursor plane query isn't
a limit, it's an exact size. Sometimes you can use a different size,
but that's completely hardware dependent - so stick to the advertised
size.
I think we're now at the point where the two paths are merged.
Still no atomic functionality because nothing assigned the primary plane,
so we have no atomic state to commit. The machinery should be in place
though.
We'll be doing tests as we build up plane state assignment. it's too late
to do anything about it if we fail here - failed tests will block plane
assignment in the first place so the scene graph knows it still has to
render those visual elements.
This will simplify a bunch of API that would otherwise have to pass in
both output and plane - and in some cases we might not have the output
handy anyway.
In cases where output monitors have different frequencies, we need to
be doing atomic commits on a per-output basis. This patch modifies the
ecore_drm2_fb_flip function to support doing atomic commits per output.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we need to do atomic commits on a per-output basis, these 2 newly
added API functions can go because these functions did one atomic
commit for all outputs
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As there is nothing inside this function which requires any Atomic API
calls, this #ifdef can be removed and the function can then still be
used to assign Primary planes for non-atomic use cases.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit fills in various output 'state' structures during creation
so that those state structures can be reused for pageflip handling
even if Atomic support is not enabled.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit enables the ability to fill our state structures even if
atomic support is not enabled. This will allow us to reuse those state
structures for dealing with pageflip in both the atomic & non-atomic
use cases.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As there is nothing 'atomic' specific in these structures, we can move
them outside the atomic ifdef and make use of them for handling
pageflip for both atomic and non-atomic use cases.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
There have been cases where the logic of _event_callback_call break'ed
too early in the event submission.
Reason for that was the line ((const unsigned char *) desc -
(const unsigned char *) it->desc) producing a overflow.
This means the if statement
if (!legacy_compare &&
((const unsigned char *) desc - (const unsigned char *) it->desc) < 0)
was true while the pointer desc was smaller than it->desc, which means
the event subscription got aborted, even if it should not.
This turned out on two 32 bit maschines. And led to not rendering apps
anymore.
It was introduced by commit in 605fec91ee.
@fix
Summary:
Cleans up grammar, simplifies wording, and elaborates on some details
for better clarity. Assume the reader will already have a basic
understanding of reference counting and 3D graphics in order to avoid
overexplaining these concepts.
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4837
widget operations use NULL terminated strings, backend does not.
Refactor some selection code so all selection deletions trigger
undo events (except where they should not).
Summary: Added a new api to send the prediction hint string to IME.
Test Plan: Tested in Tizen device
Reviewers: woohyun, id213sin, jihoon
Reviewed By: jihoon
Subscribers: cedric, jsuya, z-wony, jpeg
Differential Revision: https://phab.enlightenment.org/D4805
The function parse_str returns allocated memory which should be freed
before we exit this function.
Fix Coverity CID1374644
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The function parse_str returns allocated memory which should be freed
before we exit this function.
Fix Coverity CID1374647
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This is needed by dmabuf engine fallback when it realizes it locally
allocated a buffer, has been rendering to it, but the compositor can't use
it.
So the engine copies its buffer contents into a new wl_shm buffer and
continues from there - however we need to make sure the async renderer
has finished first, so we don't copy a partial buffer.
This allows us to block for all previously submit actions in the render
queue to complete.
Summary:
when collecting the objects under a mouse pointer,
evas uses the geometry of an object to decide
whether the mouse pointer is inside the area of the object,
which is inappropriate for a mapped object.
so mapped objects don't receive mouse events when they should.
this patch fixes the issue.
Test Plan: A sample code will be added as comments
Reviewers: jpeg, raster
Subscribers: cedric, eunue
Differential Revision: https://phab.enlightenment.org/D4826
Previously the progressbar in fileselector use hardcoded style name
"wheel", that made unpossible to create different style for
fileselector. This commit made it possible.
@fix
Missing style name for sub cursor call the next error output:
ERR<24193>:elementary lib/elementary/els_cursor.c:734 elm_cursor_theme()
Could not apply the theme to the cursor style=(null)
Also this error call extra recalc for cursor hot spots.
Fixes T5408
@fix
Summary:
node_get() can return NULL sometimes. Add a missing check, and add dox
for the function to document the error return.
>>> CID 1374434: Null pointer dereferences (NULL_RETURNS)
>>> Assigning: "node" = null return value from "node_get".
@fix CID1374434
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4824
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
The following situation:
- A Box in a naviframe, with n children.
- All added children register to the focus graph with the box as parent,
order gets set correctly.
- Naviframe hides this item, so box property tree unfocusable gets set
to true, it gets unregistered from the focus graph, even every single
child gets unregistered.
- The item gets shown - every child and the table are getting
registered again.
- Order is not set again, since the box does not get changed
- Order of the children is mixed up.
This should fix this case since the order is flushed every time the box
gets registered.
There could be the case that the item gets freed due to some handling in
a event handler of the event EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED.
So the code now sets the node to NULL after the event is called and
saves the fields that are rfom use later.
It's unlikely that we'll have other stuff under Ip namespace, also not
that likely to have other than Ip Addresses (to invert it to
Address.Ip), thus make a toplevel entry Ip_Address as suggested by
DaveMDS.
Test case:
elementary_test -to "Gesture Layer"
Just move the pictures around (eg. to the bottom). They could
disappear entirely.
This is because the geometry used was based on the smart
object "bounding box" rather than the mapped output.
@fix
This is the first step toward handling multi output. This patch
remove engine.data.output from Evas structure and use an Eina_List
for it instead. It also start moving code around to fetch an output
or an engine context (which are the same at the moment, but will be
split in a later patch).
Summary:
Fixes some grammar confusion for in that/this, that/which, to/at,
to/for, at/by, etc.
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4806
Summary:
Rounding the sum of glyph's advance could cause inconsistency of
each glyph's positions. When Evas enables Harfbuzz library,
Each glyph's position has to be handled by only nearby glyphs.
But, currently, totally unrelated glyph's advacne could change
other glyphs positions.
ex) 1. "connect."
2. "Tap here to connect."
You can see different gap between "c" and "o" of word "connect".
It should be same even if there was a different text before the word "connect".
@fix
Test Plan: N/A
Reviewers: raster, herdsman, jpeg
Reviewed By: raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D4782