Commit Graph

52 Commits

Author SHA1 Message Date
Carsten Haitzler 7d1a27bae9 evas gl engine - dont complain if refs are still there in cache on trim 2015-05-22 17:12:14 +09:00
Oleksandr Shcherbina 0f6d101ad5 evas: add to Evas_GL_Image flag disable generate atlas.
Summary:
It is need in case Evas_3D_Mesh created with not normileze texture coordinate
and flag repeat mode for Evas_3D_Texture
Additional info see here https://phab.enlightenment.org/conpherence/54/
Use Evas_GL_Image for generation texture unit for Evas_3D_Texture
see here https://phab.enlightenment.org/D2371

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Cedric BAIL 28e66c23b6 evas: prevent infinite loop when there is no image we can remove. 2015-05-05 10:17:00 +02:00
Jean-Philippe Andre 52c7cbddf5 Evas GL common: Avoid excessive pipe flushes in image free
This should boost performance a little bit when an image is
just unref'ed but not deleted (thus doesn't need a pipe flush).
2015-04-24 11:12:30 +09:00
kabeer khan ce45d443c1 evas: fix rotation and flipping of image in gl engine
Summary:
fix rotation(90, 180, 270) and flipping(vertical, horizontal, transpose,
transverse) of evas image in gl engine backend.

@fix

T2338

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

Reviewers: cedric, jpeg

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:19 +02:00
Jean-Philippe Andre e38f5cafd5 Evas masking: Ensure texture is up-to-date before drawing (GL) 2015-04-01 11:02:18 +09:00
Jean-Philippe Andre 740995e089 Evas GL generic: Simplify "scaled" images (used for masking)
Invert the meaning of scaled (w,h), so that im->(w,h) corresponds
to the final scaled size, and the original size is stored directly
in the texture itself.

This simplifies code a little bit.

Also, lift the limitation on the maximum texture size, as those
virtual textures are not limited by GPU texture size.
2015-04-01 09:59:49 +09:00
Jean-Philippe Andre 32009a0e8c Evas masking: Refactor GL code
Use the same method as for map masking:
- Pass absolute geometry of the mask to the push functions,
- Compute absolute position in the shader (like gl_Position)
  and apply scaling factor + offset to sample the mask.

Masking now uses a single vec4 attribute instead of hi-jacking
other vertices.

This way, all masking shaders share the same code and are way
simpler. On the other hand, the vertex shaders have a little bit
more work to do.
2015-04-01 09:53:55 +09:00
Cedric BAIL dd6db2b603 evas: fix use after free.
Thanks to Thanatermesis for tracking this in T2135.
2015-03-24 23:10:51 +01: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
Dongyeon Kim a32edfaf19 evas/gl: implement dynamic hint set using tbm surface
Summary:
Currently dynamic hint set is implemented using eglMapImageSEC extension,
which is no longer supported by any drivers (should be deprecated)
This patch implements dynamic hint set using Khronos extension EGL_TIZEN_image_native_surface.
Since tbm surface library is required for this, libtbm.so is queried at context new.

Test Plan: Local tests

Reviewers: raster, Hermet, cedric, jpeg

Subscribers: mer.kim, wonsik, cedric

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>

jpeg: I also fixed a few minor style issues and two warnings (bad function
names, glsym instead of secsym).
2015-03-02 15:55:47 +09:00
Jean-Philippe Andre ab89dc401c Evas masking: Check fill properties to consider image as filled
Edje may not set the filled flag on an image even if its fill
properties make it fill the whole object. For masking, it can
then be considered as a filled image.
2015-02-27 15:57:36 +09:00
Jean-Philippe Andre 0da6278af8 Evas masking: Fix masking of maps in GL
This completes the transition to auto-scaled mask images when
using the GL engine. Now the shaders do the work on-the-fly of
resizing the mask.
2015-02-27 13:06:09 +09:00
Jean-Philippe Andre fddaf62fcc Evas masking: Add fast path for image-only masks in GL.
This will currently optimize most of the masks when using the
GL engine[1].

This is a very special case that adds a highly optimized path
for masking in GL. It works by creating a virtual image, containing
a pointer to the original image and a new geometry[2].

Instead of creating a new FBO-based surface (image_map_surface),
we refer to the original image and adjust the mask geometry on
the fly.

KNOWN BUGS:
- masking a map with such a scaled image is now broken.

[1] Right now all masks are simple Evas Object Image, so that means
    all cases of masking, except masks of masks, or masks of maps,
    will be optimized with this new method.

[2] This virtual image mechanism is still quite hackish and may
    be improved (for memory usage, refcounting, etc...)
2015-02-27 13:06:09 +09:00
Jean-Philippe Andre 1874ea9890 Evas masking: Fix evas map masking in GL
While this may look like a feature, it's definitely a fix.
2015-01-14 16:35:20 +09:00
Jean-Philippe Andre bb923d5586 Evas masking: Minor fixes in GL masking 2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 61b847d47a Evas masking: Simplify and fix vertex logic in GL
There was some geometry problem, and this commit also
simplifies a lot of code by factorizing it a lot.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre a2604956f9 Evas masking: Add support for BGRA/ARGB masking
Also, refactor font & image GL masking.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 124ab102b7 Evas masking: Implement image masking for GL engines 2015-01-07 15:06:02 +09:00
Jean-Philippe Andre f902de616e Evas: Check load_error before loading again (GL)
This is a new attempt at avoiding reload of an image
that failed to load during async preload.

See 42d2f8a12b (reverted).

I still can't figure out why setting load_error does not
work as expected (E pager becomes blank).
2014-11-19 19:47:33 +09:00
Jean-Philippe Andre 64238ca9f1 Revert "Evas: Set image load_error after load"
Oops, I didn't test this enough.
This causes some problems with E's pager for instance.

This reverts commit 42d2f8a12b.
2014-11-19 19:19:56 +09:00
Jean-Philippe Andre 42d2f8a12b Evas: Set image load_error after load
In case of async preload, this avoids loading an image twice
if it already failed loading.

Thanks Minkyoung Kim for spotting this.
2014-11-19 19:07:19 +09:00
Jean-Philippe Andre 9afe5ffb9d Evas: Cosmetic changes in evas_gl_image 2014-11-19 18:54:36 +09:00
Carsten Haitzler b21d6cfd0c evas gl common - remove logically dead code
fix CID 1039444
2014-08-22 20:14:59 +09:00
Carsten Haitzler 8b796edce7 evas gl - fixz minor leak on exit of rectangles
these were static rect cutouts, so they stayed around on exit and thus
we "lost" them. this nukes them on context free and each new frame.
fixes the "leak"
2014-08-07 18:15:50 +09:00
Cedric BAIL 0d00b476cb evas: export symbol from gl_common so that loading gl_generic can expose them. 2014-07-11 15:32:51 +02:00
Jean-Philippe Andre 48bcf182b4 Evas gl: Add support for ETC1+Alpha textures
Compile-in the required shaders, add support for the
new EVAS_COLORSPACE_ETC1_ALPHA, and upload textures as RGB+A
pairs.

@feature
2014-07-09 09:04:55 +09:00
Carsten Haitzler 1eaf26989b evas - gl common - fix drop of image on cache hit in gl engine images
@fix - this fixes a leak (reference count leak)
2014-07-04 12:26:16 +09:00
Jean-Philippe Andre b0df307927 Evas gl: Add support for S3TC textures
Add support for DXT1, DXT3 and DXT5 textures (4 formats in total).

@feature Add support for S3TC textures if the GPU supports them
2014-07-03 15:36:22 +09:00
ChunEon Park 5ade5ca433 evas/png - better way to support png grayscale with transparency format.
suggested by cedric.
2014-06-26 17:00:37 +09:00
ChunEon Park d69e4fbe20 evas/gl - fix to render grayscale with transparency format in gl backened.
In case of png, grayscale with transparency format (transparency doesn't mean the png has alpha channel)
gl doesn't prepare that format render.
In this case, set it argb8888 to convert the data in the png loader.

@fix
2014-06-25 21:50:35 +09:00
Jean-Philippe Andre dbd576b858 Evas gl: Enable texture atlasses with ETC1/2
We prefer ETC2 textures when ETC2 support has been detected.
According to the spec, glCompressedTexSubImage2D should work
for ETC2.

Try even with ETC1. This may fail at runtime. The fallback path
is very dubious right now but without a proper test case I'm
not sure which approach to take.

We can also imagine cases where the GPU supports TexSubImage for
ETC1 but ETC2 is not supported at all. This will need testing, as
this case is not handled.

@feature
2014-06-12 14:47:16 +09:00
Jean-Philippe Andre 86ce491a86 Evas gl_x11: Add ETC2 support to the GL/X11 engine
This should allow texture upload with ETC2 RGB8 or RGBA8 formats.
Untested for now...

@feature
2014-04-25 16:50:29 +09:00
Jean-Philippe Andre 54fb9b2346 Evas: Use Evas_Colorspace to declare cspace
Why use int when we have a proper type?
All these APIs are internal.
2014-04-15 18:50:37 +09:00
Cedric BAIL 854dd14474 evas: add ETC1 texture format support to Evas. 2014-04-01 22:00:54 +09:00
Cedric BAIL 3684b749be evas: add support for GL_LUMINANCE_ALPHA and GL_LUMINANCE when loading image from disk. 2014-04-01 22:00:15 +09:00
Jean-Philippe Andre 7cbe636311 Evas gl: Fix clip in image_draw if it's not set
In evas_gl_common_image_draw, if an image is drawn with a fresh context,
containing no clip and no cutouts, then it will be wrongly clipped to
the source image size instead of the destination surface size.

This case seems to never happen, ever, since the contexts are always
fully set by the render functions.

@fix
2014-03-18 18:03:40 +09:00
Jean-Philippe Andre 0135b45c12 Evas filters: OpenGL support part 1.
Quick and dirty solution to support the OpenGL engine:
[1] Allocate CPU buffers
[2] Render text and process all effects to these buffers
[3] Push final image as an OpenGL texture.

This patch implements [1].
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 82e8028b5d evas/cserve2: Fix image preload with gl-x11 engine
Cserves supports only the SW (xlib) and GL (gl-x11) engines.
Also, improve cs2 support for some lesser used functions in the
gl_x11 engine.
2013-10-30 19:48:17 +09:00
Jean-Philippe Andre 3889feca24 evas/cserve2: Implement support for GL engine
Simply call the appropriate cache2 functions when possible
and check for usage of cache2 whenever an evas_cache_ function
is called.

This effectively adds cserve2 image (data) load support for the
GL engines. Fonts were already working out-of-the-box.
2013-10-28 15:47:15 +09:00
Carsten Haitzler 7d7f548afc evas - gl - dont allocate image and/or texture until needed on native unset 2013-10-16 22:56:38 +09:00
Cedric Bail 5c82716fe8 evas: factorize some code. 2013-09-09 18:59:21 +09:00
Cedric Bail 906d7adad7 evas: put the test after we had a chance to update the texture. 2013-07-15 19:12:01 +09:00
Carsten Haitzler 3c891b4058 evas gl: cover some more cannot-allocate-texture cases. 2013-07-15 10:59:29 +09:00
Carsten Haitzler edd39272bd evas gl: if img src size == dst on draw, turn smooth off to avoid ghosting 2013-07-11 17:39:08 +09:00
Cedric Bail d06a0982ef evas: add support for asynchronously uploading GL texture.
NOTE: when using Evas_Object image preload infrastructure the GL texture
upload was uploaded from the main loop during the rendering stage. This
could lead to some frame drop during fast animation due to the time needed
to upload that texture.

This patch fix this problem by uploading a small texture quickly (16x16)
and waiting for going back to the main loop to be able to use the same GL
context from another thread to do the texture upload asynchronously without
blocking the main loop.
2013-06-24 12:04:18 +09:00
Cedric Bail 1403b3a9ad evas: preliminary work on texture destruction for async preload of texture. 2013-06-14 16:38:18 +09:00
Cedric Bail d833244100 evas: add infrastructure to open from Eina_File. 2013-05-08 18:17:00 +09:00
Cedric Bail c5b0d28d73 evas: move flags and attribute around. 2013-05-06 19:02:04 +09:00
Gustavo Sverzut Barbieri a332d1c869 efl/evas: remove mask of non-rectangle objects.
it was broken and mostly disabled, so now we do remove it in the hope
who does that next time, does it properly.



SVN revision: 80252
2012-12-05 13:52:59 +00:00