Commit Graph

81 Commits

Author SHA1 Message Date
Stefan Schmidt f3d9b8ee70 esacpe: remove library from tree
This has not been used for a while and is not even buildable after our
switch to meson. It was a niche to start with given that it needed the
PS3 OS to run on. I asked for any remaining users at EDD and on the list
but heard nothing. Time to remove.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10778
2019-12-04 12:21:24 -08:00
Cedric Bail 7dc98ab3d0 evas: move efl_input_device into evas/Efl_Canvas.h
Summary:
The internal and the API we would like is mostly a canvas API. A lot of the code
in evas is working around the fact that efl_input_device is not defined inside Evas.
This patch is the first step to try to clean this up.

Depends on D10487

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10488
2019-10-31 13:29:56 -04:00
Cedric BAIL 6a93e2ef3d evas: add infrastructure to feed 9 patch information from file loader to image object.
This is just the plumbing that feed data provided along android 9 patch image for example
into Evas object image new stretch and content region infrastructure for rendering them
properly.

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9102
2019-07-12 09:54:16 -07:00
Vincent Torri 24e4881efb Evas: remove Evil.h when not needed and use evil_private when needed
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8921
2019-05-20 08:46:02 -04:00
Mike Blumenkrantz 6b046ec845 efl.gfx: remove Efl.Gfx.Image_Load_Error
Summary:
this is now implemented through Eina.Error

ref T7718

Depends on D8066

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8067
2019-03-04 13:36:57 -05:00
Carsten Haitzler 168fec6995 eina+evas cpu - add theoretical SVE support
SVE is a new-ish ARM vector instruction set like neon... but with
wider vectors (and variable vector sizes). this adds the flags and
hwcaps checks.
2018-12-03 11:04:27 +00:00
Carsten Haitzler ae2d399dd6 build - evas - sse3 optimized code - decouple from eo 2018-11-12 16:42:17 +00:00
Carsten Haitzler c1ad0879a1 meson - add checks/options for mmx, sse3, neon, altivec
so we can build our assembly fast-paths again.... - also clean up the
code a bit to match...
2018-11-09 11:43:59 +00:00
Hermet Park 423d8a2296 evas image: fix a bug in image preloading.
Summary:
Current preloading is too buggy since it's on thread-based.
This is a fundamental improvement to fix a bug.

The critical issue here is,
When preloading img object suddenly cancel its preloading,
the object possibly cannot render image next then because
renderer doesn't have any idea when async cancelling is
finished. Renderer just tries to render regardless of
image loading status, and this could occur no-texture(in gl case)
image object.

So, here improvement is, adding a notification for async cancelled
so that putting img objects to redraw images properly after their preloading is
cancelled.

The best scenario to reproduce this bug is this one.

Evas_Object *img2 = evas_object_image_filled_add(evas);
evas_object_image_file_set(img2, "test.jpg", NULL);
evas_object_image_preload(img2, EINA_FALSE);
evas_object_resize(img2, 200, 200);
evas_object_show(img2);

Evas_Object *img = evas_object_image_filled_add(evas);
evas_object_image_file_set(img, "test.jpg", NULL);
evas_object_image_preload(img, EINA_FALSE);
evas_object_move(img, 200, 200);
evas_object_resize(img, 200, 200);
evas_object_show(img);

evas_object_image_preload(img2, EINA_TRUE);
If you run this on gl backend, occasionally happens rendering fail.

Yet there other bugs on preloading feature....

@fix

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6919
2018-09-03 17:12:55 +09:00
Chris Michael 3862b304b0 evas-common: Remove cserve2 support
ref T7226

Depends on D6934
2018-08-30 13:47:27 +09:00
Hermet Park 4e1553905c evas cache: remove unused custom task in preload.
Summary:
That redundant code just made code complex.

This is one of intermediate patches for preload

Reviewers: raster, #committers

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6907
2018-08-30 13:17:44 +09:00
Hermet Park 43fcca4acd evas cache: code refactoring.
rename to proper internal variables.
Differential Revision: https://phab.enlightenment.org/D6911
2018-08-27 21:25:29 +02:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
subhransu mohanty aacf277c3a evas/vg: added support for engine surface cache. 2017-11-10 11:20:38 +09:00
subhransu mohanty b038d7df25 Remove evas internal dependency from the evas_font module
Summary:
dev branch : devs/subhransu/font

The Final goal is to move the evas_font module to ector so that both ector and evas can reuse the code.
make the api simple so that sam eapi can be used by evas_textblock and ector text.

This is the 1st stage to achive that gola, first remove the evas internal dependancy as much as possible before moving to ector library.

Reviewers: jpeg, raster, herdsman, cedric, id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5419
2017-11-07 11:34:53 +09:00
Youngbok Shin 1750410650 evas: Add scale feature for embedded bitmap fonts.
Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

Differential Revision: https://phab.enlightenment.org/D2713
2017-09-26 11:31:31 +09:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Vincent Torri 15108ecad0 evas: move EAPI undef to the correct place
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-14 10:16:44 -07:00
Carsten Haitzler b2ca7a96dc thread fence code - move elsewhere in file to avoid conflicts 2017-04-28 18:41:39 +09:00
Derek Foreman 83adbadc89 evas: Add a function to block for render thread completion
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.
2017-04-26 13:47:46 -05:00
Jean-Philippe Andre 3d2f1a3d9b 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 :)
2017-04-14 11:26:43 +09:00
Cedric BAIL 9883831b76 evas: move Efl_Canvas_Output to be an internal only API. 2017-04-13 15:25:29 -07:00
Youngbok Shin f83ce20e1c evas: clean up GL images for emojis when GL context is free'd
If GL context is free'd before processing font shutdown,
textures for emoji glyph's GL images will be free'd without clean
up its GL images. It causes eina mempool infinite loop issue when
emoji's GL images are free'd in shutdown process.

So, the patch will make a list for emoji's GL images in context and
clean up them when the context is free'd. Just like font textures in
context.

@fix

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2017-03-08 19:35:03 +09:00
Jean-Philippe Andre 9dcf2d3965 evas: Set thread name for preload
This can be useful during debugging.
2017-03-08 11:25:40 +09:00
Carsten Haitzler a909ca1f68 evas draw context - reduce size and allocations and frees
so a little perf fun shows malloc/free/realloc/etc. are, combined a
reasonable overhead. this reduced malloc overhead for draw contexts so
whne we duplicate them or create new ones, we re-use a small cache of
8 of them to avoid re-allocation. just take the first one from the
list as it really is that simple. mempool would not have helped more
here and cost more overhead.

@optimize
2017-01-31 23:01:50 +09:00
Carsten Haitzler 3842e87d3a evas image skip header - more fixes for when images fail to load
this fixes some more issues i have found in using skip header like if
the file doesn't exist etc. recent feature add so not a fix.
2017-01-06 09:38:44 +09:00
Carsten Haitzler 9e01cf2698 evas image async preload - add option to also make header load async
to date if you use async preload we still load the header
synchronously and this can be horrible especially with generic
loaders. there is no way to farm this off to the preload thread. now
there is. youhave to set it as a skip head load option before doing a
file_set AND you need to issue a preload ... but now it's possible.

@feature
2017-01-02 18:53:56 +09:00
Carsten Haitzler b0530aba4f evas cutouts - quickly avoid huge per issues with large nos of cutouts
i found evas_common_draw_context_apply_cutouts() was procsessing 300+
cutouts and as it's O(n^2)/2 to try and merge adjacent rects for
cutouts this really performs like complete junk. we apply cutout rects
a LOT. this is not the best solution, but it's quick and much faster
than doing the clipouts which drop framerate to like 1-2fps or so in the
nasty case i say (tyls -m of photos in a dir with a 2160 high
terminal).

this figures out the target area to limit the count of rects
significantly so O(n^2) is far far better when n is now < 10 most of
the time. and for the few operations where it's a high value this now
uses qsort to speed up merges etc. etc.

@optimize
2017-01-02 18:53:56 +09:00
Wonki Kim 88e1fc9613 evas: Add shutdown logic on thread creation failure
Summary:
In case of thread creation failure, shutdown logic will be stuck.
To prevent stuck, set exit variables to make thread_shutdown working
even if init fails.

Also modify init logics to return init result to a caller.

Reviewers: jypark, woohyun, cedric, jpeg

Subscribers: cedric

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

Note (@jpeg):
I have modified the patch just a little bit.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2016-11-22 14:50:38 +09:00
Cedric BAIL 53dd596f43 evas: reduce usage of __thread directive.
Moved rects caching into draw context to avoid the use of __thread
slot. Draw context are defined per thread anyway and should be just
fine. This doesn't really change the picture regarding glibc problem
when to many __thread are needed, but slightly improve the global
picture. Also this patch doesn't affect our performance in expedite
benchmark as far as I can tell.
2016-11-16 16:05:56 -08:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre d4b96d33d6 Evas: Mark type as legacy and protected
Only set() is allowed for EO, and it's a constructor,
protected function. Unfortunately, this means a lot
of #define EVAS_OBJECT_PROTECTED
2016-06-17 11:37:39 +09:00
Minkyoung Kim f10672dd74 evas : remove native.func.data variable and data argument of native calblacks.
Summary:
Evas Image should be independent of render engine.
So remove native.func.data member of RGBA_Image, Evas_GL_Image struct.
And remove data argument,too.

Test Plan: Local test, Tizen3.0 mobile, Desktop englitenment

Reviewers: jpeg, spacegrapher, wonsik

Subscribers: cedric, dkdk

Differential Revision: https://phab.enlightenment.org/D3850
2016-04-01 12:09:06 +09:00
Jean-Philippe Andre 488854af2b Efl.Gfx.Buffer: Switch to void* data and signed ints
1. unsigned char* as a return type was not even compatible
   with the default colorspace (ARGB: 32 bits).

2. Change all unsigned to int for... uh... simplicity
   unsigned is more correct than int for things like width,
   size or stride, but in fact having both ints (x,y) and unsigned
   ints makes the code more complex.
   This is a matter of personal taste.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre d5b0b1e683 Evas: Add SW engine map/unmap functions
Also, fix some of the code using them.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 28a03d6e19 Evas: Remove unimplemented image comment (internal)
This is a minor cleanup of RGBA_Image.
2016-03-28 16:40:01 +09:00
jiin.moon cdb7286485 evas: some changes for preload thread dead lock issue
Summary:
Add spin lock to access to new flag can check to
status of the preload

Reviewers: jpeg, cedric, jypark

Subscribers: raster

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 11:57:25 -07:00
jiin.moon 41b8a320a0 evas: fix preload thread deadlock issue
Summary: Wrong condition makes deadlock issue.

Reviewers: jpeg, jypark

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-04 16:09:51 -08:00
Minkyoung Kim 25ebd91555 evas/gl : Do not re-preload image data if texture is successfully uploaded with image data.
Summary:
'cached' flag is not enough to check whethere data is loaded and texture is uploaded.
so check more options for prevent re-preload image data on gl-backend.

Test Plan: Local Test (elementary_test : elm images)

Reviewers: jpeg, eunue

Reviewed By: jpeg

Subscribers: cedric, jiin.moon, wonsik, spacegrapher

Differential Revision: https://phab.enlightenment.org/D3446
2015-12-18 16:49:17 +09:00
Pankaj Mittal 1363cd757a evas_eet: Add Type Safety check
Summary:
The Function _evas_canvas3d_eet_file_free(void) is referenced in  evas_model_load_file_eet()(file:evas_model_load_eet.c at line 122).
This call is  under condition
        if ((eet_file->mesh == NULL) || (eet_file->header == NULL)).
when  either eet_file->mesh or eet_file->header are NULL, dereference of the corresponding pointer in function "_evas_canvas3d_eet_file_free()"
will generate Segmentation Fault.

@fix

Reviewers: raster, Hermet, tasn, wonsik, spacegrapher, cedric, jpeg

Subscribers: singh.amitesh, sachin.dev, alok25, yashu21985, mvsovani, cedric

Differential Revision: https://phab.enlightenment.org/D3369
2015-12-10 16:26:56 +09:00
Jean-Philippe Andre b5500a8644 Evas: Move alpha functions to static_libs/draw
This is a pretty simple code refactor, moving pixel handling
to the new draw lib.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 615b2442b7 Ector: Move drawhelper to static_libs
Rename a few things:
 - draw helper -> efl_draw
 - Ector_Rop -> Efl.Gfx.Render_Op
 - ECTOR_ bla bla -> DRAW_ bla bla (base pixel ops)
 - ector_memfill -> draw_memset32 (and invert arg order to match memset)

The main rasterizer file is now draw.h in static_libs/draw
This is a non functional change, simple code refactor.
2015-12-03 18:42:50 +09:00
Carsten Haitzler 5801013ad4 evas - region updates - go back to tiler as its faster
the overhead didnt show up in y tests. do show up with certain
expedite tests. hmmm. last time i messed with region code it was
actually same speed as tiler. bonus was it was fully accurate.
2015-10-05 18:41:00 +09:00
Carsten Haitzler 217faeebe8 evas cutouts - optimize to use less cpu
this optimizes draw ctxt cutouts by skipping small ones and
remembering the last cutout added so it isn't double-added as well as
extending the minimum cutout array to 512 and going up in blocks of
512 instead of 128. also optimize the clipping code a bit more.
2015-09-24 14:09:20 +09:00
Carsten Haitzler 49adf8aa47 evas tiler update handler - move to region code to be accurate and fast
this move evas tiler that does update handling to use fully correct
regions using region.[xh]. this also removed old unused regionbuf code
and a bunch of commented out code no longer needed. much simpler now
and easier to maintain.
2015-09-24 14:09:09 +09:00
Jean-Philippe Andre f654a3b300 evas_render: simplify masking and clipping in general
Use context_dup to inherit from previous contexts in a clean
manner. This removes the need for restoring the previous
clip information.

Plus, this commit removes lines of code so it must be good, right?
2015-09-04 11:11:39 +09:00
Jean-Philippe Andre c45ae022c8 Evas masking: Fix crash in async rendering
There was a FIXME comment... >_<

Improper management of image resources in async render led to
a rare crash. This should fix that.

@fix
2015-07-27 14:15:09 +09:00