Commit Graph

55 Commits

Author SHA1 Message Date
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
Carsten Haitzler ec6ddf59e2 evas - image core - fix unloading of images to work again
i think this has been disabled for a while. image unloading is broken
- esp with gl enigne as due to async move it was effectively disabled.

this re-enables it. unloading is deferred with a managed list of things
needing unloading and then when any async sw renders are not busy any
more - do the unload then in the mainloop of all pending/flagged
images to unload

@fix
2015-07-07 21:38:21 +09:00
Cedric BAIL 71b7fc982a evas: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Cedric BAIL b18b1e89ff evas: fix Windows build. 2015-04-03 16:34:22 +02:00
Youngbok Shin 262dd3a139 evas: fix build failure with old version freetype.
Summary:
Fix build failure with old version freetype.
It is caused for supporting colored font.

Reviewers: raster, jpeg, woohyun, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2200
2015-03-20 13:24:31 +09:00
Youngbok Shin e197f8804f evas: Support bitmap embedded color font.
Summary:
Add the code for getting bitmap buffers from embedded color font,
And draw the bitmap buffers as images.
For drawing the bitmap buffers as images,
evas_common_draw_context_font_ext_set internal API is changed to
pass additional gl engine functions.
T2139
@feature

Test Plan:
1. Set a bitmap embedded color font to textblock.
2. Set a unicode emoticon text.
3. See the result.

Please check the sample unicode in the following link.
http://www.fileformat.info/info/unicode/char/1f3af/index.htm
http://www.fileformat.info/info/unicode/char/1f555/index.htm
http://www.fileformat.info/info/unicode/char/2600/index.htm
http://www.fileformat.info/info/unicode/char/263a/index.htm

Reviewers: tasn, woohyun, jpeg, raster

Reviewed By: raster

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D2084
2015-03-19 19:02:03 +09:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
kabeer khan 46b9b23144 evas: add image orient set/get API in software backend for now.
Summary:
Added API's to rotate(0, 90, 180, 270), flip(horizontal, vertical, transpose, transverse)
evas image object. Also added example to demonstrate this.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: raster, stephenmhouston, cedric

Subscribers: stephenmhouston, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 17:30:54 +01:00
Dongyeon Kim c0d990c724 evas/software_x11: implement tbm native surface type
Summary:
This native surface type is based on the tbm surface used for the tizen platform.
For the software_x11 backend, image data is retrieved from tbm surface
and color format converted appropriately.
This will only work when libtbm.so is present in the system.
@feature

Test Plan: Local tests

Reviewers: raster, cedric, jpeg, Hermet

Subscribers: wonsik, cedric

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-02-10 14:48:53 +09:00
Dongyeon Kim defcc1f2ac evas/software_x11: implement native surface set for x11 type
Summary:
implement native surface set for EVAS_NATIVE_SURFACE_X11 type
on software_x11 backend.
@feature

Test Plan: local tests on PC

Reviewers: jpeg, cedric, raster, Hermet

Subscribers: wonsik, cedric

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-02-10 14:48:22 +09:00
Jaeun Choi 9af60b1b04 Evas masking: Use alpha mask in SW engine draw functions
Work done by Jaeun Choi, rebased & squashed by jpeg.

This commit introduces changes to the low-level draw functions
of the SW engine considering the existence of an alpha mask image.

Features:
- Font masking (TEXT, TEXTBLOCK),
- Rectangle masking,
- Image masking (all image scaling functions should be handled).

The mask image itself is not yet set in the draw context (see
following commits).

@feature

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre 05aee3e370 Evas: Don't pass whole RGBA_Image to low-level render functions
Idea originated from Cedric the b0rker.

This is a big fat search-and-replace commit.
This commit also introduces space changes... Sorry for the mix.

NOTE: This commit may have one side effect as there was some very
      dubious code chaning the dst image's alpha flag in the
      Gfx get functions. Logically this didn't make sense (at
      draw time the dst alpha should already be well defined),
      so it should be safe.
2014-11-13 12:20:57 +09:00
Wonguk Jeong 1cc23d4ff2 evas: jpeg loader - support flip, transpose, transverse
Summary:
Previously, jpeg image loader support rotation (90°, 180°, 270°) only.
this patch is about supporting flip(vertical, horizontal), transpose, transverse

@feature

Test Plan: I'm going to make tests in src/tests

Reviewers: cedric, raster, jpeg

CC: seoz, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 20:12:31 +02:00
Jean-Philippe Andre 2b191b3c51 Evas loader: Introduce border param 2014-07-03 11:37:47 +09:00
Cedric BAIL 3699ec6883 evas: remove RGBA_IMAGE_ALPHA_ONLY flags and use EVAS_COLORSPACE_GRY8 instead. 2014-04-01 22:00:15 +09:00
Cedric BAIL 05239d8dd2 evas: let loader specify there prefered color space. 2014-04-01 22:00:14 +09:00
Jean-Philippe Andre ac8140ccd1 Evas filters: Rename RGBA_Image::mask.data into image.data8
The structure should not be changed, despite the union modification.

I am renaming for consistency with older branches that had a mask
field in RGBA_Image. Also, the mask.data or data8 is really just
a way to avoid casting between DATA8 and DATA32 (and it shows
clearly what kind of data you are dealing with).
2014-03-04 12:10:29 +09:00
Jean-Philippe Andre d8301fae6e Evas: Add support for Alpha buffers
Evas is an RGBA only engine, BUT we also use some alpha masks,
especially in the font rendering pipeline.
This commit adds basic support for alpha buffer operations
(blend and copy).

RGBA_Image can then point to either alpha-only data, if
its colorspace is grey.
2014-02-07 15:38:42 +09:00
Carsten Haitzler 86a97efeea evas - fonts - move to using 4bit and rel 4 bit compressed font glyphs
this changes the internal encoding of font glyphs in evas to use 4bit
uncompressed if small, or 4bit rle (run length encoded) if larger.
this caves at least 50% of memory on fonts - and more if bigger. with
large fonts (40-80pixel size) we can save in the region of 80% of
memory used for glyphs. this also happesn to allow speedups in
rendering too.
2014-01-13 05:15:32 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Cedric Bail e551f88a09 evas: Let fix the mess in our header instead of sweeping it under the carpet.
This also does fix the build on Windows.

This reverts commit 86c08e6985.
2013-11-22 11:06:07 +09:00
Tom Hacohen 86c08e6985 Revert "evas: this headers order are seriously insane..."
Perhaps they are insane, but as the comments imply it defines
USE_HARFBUZZ which is needed afterwards. You just broke everything. I
know it's a mess there, but it's a mess that works. Your change doesn't.

This reverts commit d4b9e3b287.
2013-11-21 10:55:37 +00:00
Cedric Bail d4b9e3b287 evas: this headers order are seriously insane, hope that one fix the last breakage. 2013-11-21 18:26:29 +09:00
Cedric Bail 3b42ecbe1e evas: fixing headers order for windows build is insane. 2013-11-21 16:08:55 +09:00
Ulisses Furquim 3d3f33f310 evas: change sync all canvases function name.
Change evas_render_sync() to evas_all_sync() to better describe what it does
and avoid confusions with evas_render() and friends.
2013-10-18 14:43:08 -03:00
Cedric Bail 6dcffec491 evas: Use Eina_Spinlock for Evas_Scalecache, Evas_Async_Events and Image_Entry. 2013-10-11 11:08:17 +09:00
Ulisses Furquim 063f076aed evas/async_render: remove block/unblock of render thread.
This reverts commit 42a46214c4.
2013-09-02 20:01:37 -03:00