Commit Graph

265 Commits

Author SHA1 Message Date
Shinwoo Kim c3c9fed7d9 evas_object_image: save EVAS_IMAGE_CONTENT_HINT_DYNAMIC image
Summary:
evas_gl_common_image_content_hint_set makes RGBA_Image NULL if content hint
is EVAS_IMAGE_CONTENT_HINT_DYNAMIC with 'sec_tbm_surface' and 'egl_tbm_ext'.

efl_file_save(_efl_canvas_image_internal_efl_file_save_save) does not work
in this case because ENFN->image_data_direct_get returns FALSE.

This patch makes ENFN->image_data_direct_get work but you need to free its
returned data after using it.

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8516
2019-05-02 20:50:24 +09:00
Hermet Park 9c66a4751c evas map: move to floating point coordinate system in high-quality drawing.
evas map has used integer coodinate system since it's born,

since object's transition is jiggled, not perfectly smooth.

It's obvious because Positioning must be stepping with integer units
without any subpixel rendering.

Currently, this patch is a sort of preparatory to improve this,
only valid for high-quality evas map (smooth + anti-aliasing)
2019-04-18 19:47:54 +09:00
Hermet Park fbe92aa67f evas ector: add software implmentation for masking feature.
This implementation uses Ector_Buffer to generate mask image from vg container,
and pass it to Ector engine. Ector renderer could blend this image as a mask.
Yet only vg container works as a mask, we could extend shape to support masking later.

Still vector gl drawing is not completed, We use software ector buffer to draw on it.
This is on progessing.
2018-12-07 19:50:08 +09:00
Carsten Haitzler 143bef348f evas gl extn sym finding - warn - use void catss for no more warns
so gcc now is being very picky about types. since we'r ereallyjast
throwing void *'s around for pointers to funcs and looking them up by
hand - use void *'s to avoid warnings.
2018-11-09 11:44:00 +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 38ee4167bc evas-software-genereric: Remove cserve2 support
ref T7226

Depends on D6929
2018-08-30 13:42:55 +09:00
Hermet Park 54f2a554da evas cache: refactor internal logic.
Summary:
Adding cache targets in other modules are inproper.
This can't be managed by cache module inside.

One representive scenario is,
when preload cancel is triggered, preload canceling sequence
can't be performed properly because cache targets implicitly were
increased by backend modules.

And then, Cache itself couldn't get notified it.
see this condition.

if ((!ie->targets) && (ie->preload) && (!ie->flags.pending))
in _evas_cache_image_entry_preload_remove()

Consequently, I move preloaded callbacks to sync with adding cache targets,
not to add by backed engines themselves.

This will bring Cache to manage cache targets properly.

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6912
2018-08-30 13:26:06 +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
Bowon Ryu f176aece65 evas_engine: remove logically dead code
Summary:
"plane" exception value is already filtered at line 1791.
execution cannot reach this statement.

Reviewers: cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5973
2018-04-20 19:07:39 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Youngbok Shin 255e9c788a evas: increase offset by 4 to do work for next map points
Summary:
Increasing offset as 2 for next map points is wrong.
If evas tries to draw for wrong combination of map points,
it can cause wrong results. Actually, every drawing code for
map points use and increase offset as 4.

@fix

Test Plan:
A test case for textpach is modified for testing this issue.
1. Run elementary_test with sync render mode.
   ex) ECORE_EVAS_FORCE_SYNC_RENDER=1 elementary_test
2. Open textpath test.
3. Set a short text by clicking newly added check box.
4. (It will show another issues... So,) change slice number to update textpath properly.
5. See some noises at top-left side of text.
   It is drawn from the two of end map points to the two of empty(not used) map points.

Reviewers: raster, cedric, jpeg, jypark

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
subhransu mohanty 48433efc43 ector: Updated the ector_buffer_pixels_set() api with stride info
Reviewers: jypark, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5795
2018-02-08 14:44:29 +09:00
Jean-Philippe Andre 24447641d3 evas gl: Properly verify that Evas GL works
For SW engine we need to verify that OSMesa is present. The patch
fb048e7312 broke the logic.

Tested by temporarily removing OSMesa from my system.

Fixes T6617 (again)
2018-01-17 15:22:46 +09:00
Carsten Haitzler fb048e7312 evas sw generic - don't dlopen osmesa until first needed.
osmesa needs llvm. llvm apparently just by dlopening or linking to the
lib (libLLVM...) gets you 3.5mb of dirty pages just in this lib. that's
a whole lib entirely dirty pages. odd and horrible. in fact once i
stoppd dlopening OSMesa all the time on engine init (and only when gl
is needed)... the amount of dirty pages went from 17208 to 8860.
that's a whopping drop of 8mb! 8mb saved! in fact just dlopening
osmesa and doing the other gl init stuff led to more anonymuse
mappings with dirty pages. 2 of them (2072k and 2076k) which baffled
me as that didn't seem like heap or efl's own data. these disappeared
along with libLLVM-5.0.so (3520k + 60k dirty pages). we stopped
linking/loading libedit (12k dirty), libglapi (20k dirty),
libLLVM-5.0 (3580k dirty), libncursesw (72k dirty),
libOSMesa.so (260k dirty), libtinfo (20k dirty). ... or at least
stopped until absolutely needed. total 17208k of dirty pages went down
to 8860.

my test case was just launching terminology (and doing nothing with it).

@fix memory bloating
2018-01-12 03:02:43 +09:00
subhransu mohanty d838220d56 evas/vg: Use always blending op while drawing the vector.
Summary:
The default backend overrides this operation depending on the fill color
but the cairo backend dosen't hence cairo will always use bled mode while drwaing the vector.

Reviewers: jpeg

Subscribers: vtorri, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5724
2018-01-08 19:16:59 +09:00
subhransu mohanty 41062cb15d evas/vg: use surface cache for efl vg canvas 2017-11-10 11:20:38 +09:00
subhransu mohanty f0b8c37d80 evas/vg: refactor ector engine api and backend . 2017-11-10 11:20:38 +09:00
subhransu mohanty befb7701a7 evas/engine: added new engine api for ector 2017-11-10 11:20:38 +09:00
subhransu mohanty aacf277c3a evas/vg: added support for engine surface cache. 2017-11-10 11:20:38 +09:00
Chris Michael 6016ce8133 evas-software-generic: Check for render engine function before calling
In most engines which inherit from software_generic, they do not
implement the outbuf_free_region_for_update function. Most engines
have it as an unused function. If we simply add a check here, then we
can reduce the need for having useless function in multiple engines.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:10:28 -05:00
Cedric Bail 867d826395 evas: remove image_load from the engine. 2017-10-04 21:48:26 -07: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
Cedric BAIL 545c1a70f4 evas: make Evas_GL work with multi output. 2017-08-25 10:54:19 -07:00
Cedric BAIL e682f64193 evas: make vector graphic support multi output. 2017-08-25 10:52:14 -07:00
Cedric BAIL a0c58276c3 evas: do not use default output or any other during render pre. 2017-08-25 10:52:10 -07:00
Cedric BAIL e9cd3e4c7c evas: remove image_content_hint_get from backend as it is unused. 2017-08-25 10:51:27 -07:00
Cedric BAIL fc603df8d1 evas: remove image_surface_noscale_region_get from engine backend as it is unused. 2017-08-25 10:51:13 -07:00
Cedric BAIL 28397e7206 evas: differentiate engine from output. 2017-08-25 10:49:53 -07:00
Cedric BAIL e31707743a evas: Render_Engine_Merge_Mode is actually about output. 2017-08-25 10:49:11 -07:00
Cedric BAIL 46e1df839b evas: factorize call to info and info_free. 2017-08-25 10:48:13 -07:00
Cedric BAIL 8017fab100 evas: nobody actually call the tile size set API. 2017-08-25 10:48:05 -07:00
Cedric BAIL cac667e402 evas: do not loose tile size when resizing output. 2017-08-25 10:47:56 -07:00
Cedric BAIL bf2439b501 evas: Render_Engine_Software_Generic is actually Render_Output_Software_Generic. 2017-08-25 10:47:11 -07:00
Jean-Philippe Andre b3722c05f9 evas: Fix crash with filters
Since the EO APIs are defined as weak symbols, invalid definitions of
EAPI lead to runtime crashes on non-public APIs. This is a fix following
a series of changes wrt. EAPI definitions.
2017-08-16 14:06:51 +09:00
Derek Foreman 81420d76e0 software_generic: Improve dmabuf validity tests
Now that upper layers set load errors this can be less gruesome.

Also, add some checks that were in E here where they belong.
2017-06-30 14:54:12 -05:00
Derek Foreman dc3873c8db software_generic: fix eng_image_native_get
This has been a stub for a long time, but now we have a native_set, so
we should have a native_get too.

This is required for hw plane usage on the software engine.
2017-06-29 17:20:23 -05:00
Derek Foreman 2e0e017b87 software_generic: Check dmabuf attribute version during set
We should check here instead of only at time of usage.
2017-06-29 16:11:45 -05:00
Derek Foreman 7e2c8c1cbd software_generic: Add plane assign/release function pointers
Functions to assign a plane for a native surface, and release a plane
that's been assigned to a native surface.

These are empty for now as they'll need to be overridden in any backend
that can handle planes.
2017-06-23 08:15:42 -05:00
Thiep Ha 4f77bb2f5a evas_map: support map with number of points as multiples of 4
Currently, in evas map, we only support map with 4 points.
This patch adds support for map with number of points as
multiples of 4.

@feature
2017-06-08 16:53:45 +09:00
Cedric BAIL fd38c09735 evas: reuse code for colorspace logic by using switch case statement fallthrough. 2017-06-05 12:07:57 -07:00
Cedric BAIL 35e54acc46 evas: stat introducing a concept of engine and output in the backend. 2017-05-12 15:24:45 -07:00
Cedric BAIL 7f5ec0c8ea evas: do not rely on Evas canvas for Evas Ector engine backend. 2017-04-25 16:16:30 -07:00
Cedric BAIL 55e1b3f205 evas: remove engine.data.output.
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).
2017-04-24 15:10:48 -07:00
Jean-Philippe Andre 2ef8d6f39a 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 ;)
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 190d84e84b 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre a8d283567a 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.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 46542ea748 evas filters: Move transform to software generic (7/8) 2017-04-14 11:26:42 +09:00
Jean-Philippe Andre 1b95d22c2c evas filters: Move bump to software generic (6/8) 2017-04-14 11:26:42 +09:00
Jean-Philippe Andre b56a788e96 evas filters: Move displace to software generic (5/8) 2017-04-14 11:26:42 +09:00
Jean-Philippe Andre c9eec74002 evas filters: Move fill to software generic (4/8)
This also moves the header evas_engine_filter.h to its subdir.
2017-04-14 11:26:42 +09:00