Commit Graph

531 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 587a171061 evas/fb: expose and call fb_freemode() and fb_cleanup()
properly clean memory and restore framebuffer on error conditions.

@fix
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri b0aa7325ae evas/fb: handle fds using -1 for unset/error.
clean evas_fb_main.c so it returns -1 to indicate invalid fds, same as
open() and what is written in evas_fb.h example.

call fb_cleanup() in all error conditions and always return -1 in
fb_postinit() if we did call fb_cleanup().
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri bf2abf12b4 evas/fb: avoid crashing it outbuf setup failed.
if fb setup fails, then we shouldn't use re->ob as it's NULL.

@fix
2014-03-06 11:19:11 -03:00
Chris Michael 06afd41355 evas-drm: Add headers for hardware acceleration
@bugfix: Add missing headers for egl/gl support in evas-drm

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 11:02:25 +00:00
Chris Michael 4bcd26d5b9 evas-drm: Remove hardware acceleration fields from engine structure
@bugfix: Removed hardware acceleration fields from engine structure.
These are now located inside the buffer management code itself, so no
need for them here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 10:59:44 +00:00
Chris Michael 2a1c6e02fb evas-drm: Add buffer management file
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 09:26:03 +00:00
Chris Michael 238208b829 evas-drm: Fix setting cached image alpha flag
@bugfix: Set cached image alpha flag properly

This fixes issue where cached image alpha flag was not set properly.
Set it according to the outbuf's destination alpha flag.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:12:58 +00:00
Chris Michael 3692f0905c evas-drm: Check buffer validity in swap function
@bugfix: Check (and set) buffer validity before calling
framebuffer_send. This fixes an issue where buffer was not valid,
causing next_update_get to do full Copies.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:12:58 +00:00
Chris Michael b117d48159 evas-drm: Don't call framebuffer set from within send function
@bugfix: We cannot call framebuffer_set from within the send function
because if we are not vsync'd then framebuffer_set would never be
called and thus the buffer would not be marked as valid, causing full
Copies to happen.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-05 14:12:58 +00:00
Chris Michael 1904466ebc evas-drm: Fix evas drawing delay for cedric
@bugfix: Draw to the front buffer first, instead of the back buffer.

Frenchie says this improves the "initial rendering delay" of expedite
tests. Originally, we were drawing to the back buffer first, then
flipping it onto the crtc when drawing was done. This presented a
"perceived" rendering delay when running expedite tests as it would
wait for the back buffer to be drawn before presenting it. Personally,
I think it is not good to draw directly to the front buffer first as
it may get presented "incomplete" ... but cedric says it draws fine so
we'll leave it starting on the front buffer (for now).

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2014-03-03 16:07:18 +00:00
Chris Michael 886c8d55b7 evas-drm: Ddd support for setting vsync with env variable.
@feature: Add support for EVAS_DRM_VSYNC environment variable to
@feature: Add support for marking a Framebuffer as dirty.
@bugfix: Fix color mask values for evas conversion functions.
@bugfix: Start with using the Backbuffer for drawing.
@bugfix: Fix previous Slowness with evas_cache image data.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael 7ca6837084 evas-drm: Add vsync/non-vsync support to evas_drm code
@feature: Add ability to render software buffers using vsync or not
@bugfix: Fix drmModeAddFB to use proper depth & bpp when adding FB
@bugfix: Fix mmap to use NULL (not 0) so that kernel assigns memory
address.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael 09b69d567e evas-drm: cleanup evas_engine code for drm sw engine
@bugfix: clear the tilebuffer when we get the next redraw update.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael 54680b1f97 evas-drm: cleanup outbuf structure and functions
@bugfix: this cleans up the Outbuf structure by removing unused
fields, Fixing some function declarations, and defaulting the number
of buffers to 2 (double-buffering)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael aafd8e5277 evas-drm: Add flag for setting vsync to engine structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:13:17 +00:00
Chris Michael c52d47ba36 evas-drm: Break out plane creation code into it's own function for cleaner code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:12:51 +00:00
Chris Michael 62a6b32ed3 evas-drm: Start on hardware Plane support
@feature: Start on hardware Plane support
 - Add Plane structure
 - Store list of Planes in the Output buffer

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:12:31 +00:00
Chris Michael fcd4929702 evas-drm: Add field to engine info for storing the buffer manager
- Typically this will come from ecore_evas and be used by evas to
allocate hardware accelerated buffers (gbm, tbm, etc)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:11:58 +00:00
Chris Michael 8a18515c7c evas-drm: Fix opening of drm card
@feature: Add code to check if async page flipping is supported by the driver.
@bugfix: Add code to get the proper drm driver name when we init the card.
@bugfix: Use drmOpen when opening the card so that any sub-driver gets initialized.
@bugfix: Add some debug/testing code to enumerate planes.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:10:55 +00:00
Chris Michael 258ce60930 evas-drm: Call framebuffer_set earlier in the process so that the screen gets
updated sooner.

@bugfix: set framebuffer on crtc earlier in process
@bugfix: Set the rendered image's alpha flag to be equal to the output buffer's

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:10:21 +00:00
Chris Michael ccbdd2137f evas-drm: Triple buffer by default.
@feature: Triple buffer by default on drm engine

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:10:00 +00:00
Chris Michael d21ab6f597 evas-drm: Start on hardware-accel support for drm
@feature: Start on hardware acceleration support by adding EGL
structure to engine info

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:09:37 +00:00
Chris Michael b42af265be evas-drm: Add Evas Drm Engine (software only currently)
@feature: Add working Evas_Drm Engine (software only currently)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-28 13:08:19 +00:00
Chris Michael 44e023c888 bugfix: Fix Wayland Shm engine destination calculation typo
When rotation is 0, we need to advance the destination pointer in the
X direction by a Multiple of Bits-Per-Pixel...not an addition.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-26 11:36:27 +00:00
Jean-Philippe Andre e7e3f73bbe Gif: Fix animated gifs when used as proxy sources
This looks like a typo: if (animated > 1) when animated is a... Bool!

So, I am not entirely sure why this bug is visible in case of gif
proxies, all it seems that the load_data function may be called
multiple times when the object is visible. So gif close and reopen
happen properly, and the first frame can be decoded.
2014-02-17 16:59:43 +09:00
Sung W. Park 2b4a7b438d evas gl: added partial rendering support for qcom extension
When running in direct rendering mode, properly support partial
rendering if the extension is properly supported.

Also, fixed the SwapBufferwWithDamage rectangle coordinate bug.
It wasn't properly y-inverted before.
2014-02-15 02:33:47 +09:00
Carsten Haitzler 93da35c5ab evas - gl - core - checke for wrong context in error check
this fixes CID 1135266
2014-02-13 19:38:13 +09:00
Carsten Haitzler 2e95690201 evas - gl x11 - fix glx texture from pixmap target rectangle mode check
even though we don't support rectangle bits in texture targets for
texture-from-pixmap the code checked and complained - problem is it
checked the wrong thing. fixes CID 1135267
2014-02-13 19:35:17 +09:00
Carsten Haitzler 153bbd8003 evas - gl core - don't access null ptr on init
this fixes CID 1135270
2014-02-13 19:19:59 +09:00
Wonsik Jung 48b95c4538 evas: software_x11 - use evas_xlib_swapper_depth_get to get buffer stride.
Summary: when image cache is created, buffer's size should use stride value.

Test Plan: Create small size window, then try to resizing that.

Reviewers: tasn, seoz, raster, cedric

Reviewed By: cedric

CC: tasn, seoz, raster, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 14:54:43 +09:00
Wonsik Jung 6ea0566e6c evas: add eglMakeCurrent in evas map create/free.
Summary: Ensure Evas's eglContext when several eglContexts are used.

Test Plan:
1. Native GLES application works with evas_object_image_native_surface_set
2. One Evas object works with evas map.

Reviewers: seoz, tasn, cedric

Reviewed By: cedric

CC: cedric, raster

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 10:40:56 +09:00
Wonsik Jung 0e04219758 Add quadruple swap mode for partial rendering
Summary: This patch is for QUADRUPLE window buffers.

Test Plan:
When enlightenment uses quadruple buffers or window system can support quadruple buffers,
application can use quadruple buffers with partial rendering

Reviewers: tasn, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D527
2014-02-08 23:04:04 +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
Wonsik Jung 3420eda31a evas: gl backend - ensure eng_window_use in image_content_hint_set
Summary: Ensure eng_window_use in image_content_hint_set

Test Plan:
1. make native OpenGLES application.
2. set evas object image  with evas_object_image_native_surface_set.
3. GLES Application try to call eglMakeCurrent with own eglContext, then resize evas object resize

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

CC: cedric, seoz

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-07 12:18:16 +09:00
Carsten Haitzler 93fd2263fc evas gl - fix egl/gles build after alpha4 change for fonts 2014-01-13 07:02:24 +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
Carsten Haitzler f21b0ee6c3 evas gl - prefer alpha4 format for font textures if possible (save memory)
if alpha4 is possible (desktopgl) then use it for fonts as this should
cut memory in half for them and possibly speed things up due to less
memory bandwidth needed
2014-01-13 05:15:32 +09:00
Carsten Haitzler ee9f80f246 comment out unreachable code
fixes CID 1132633
2014-01-10 19:04:32 +09:00
Carsten Haitzler 3de45a2c4b evas gl - comment out unreachable code
fixes CID 1132634
2014-01-10 19:00:54 +09:00
Carsten Haitzler e8c13118eb fix mingw build for setuid fix/checks 2014-01-08 22:06:41 +09:00
Carsten Haitzler b95ef3801f setuid safeness - ensure if an app that is setuid doesn't do bad things
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
2014-01-08 19:46:23 +09:00
Carsten Haitzler e9783c3caf evas - gl-x11 engine - put in guessed blacklist of yinvert extn for intel mesa 2014-01-07 16:28:46 +09:00
Carsten Haitzler 2373e1f636 evas - gl-x11 remove +x bit on src file! 2013-12-30 18:27:06 +09:00
Carsten Haitzler acf7dfa579 evas - gl engine - glerr should be off by default for performance
stable release - cherry-pick me!
2013-12-27 17:32:15 +09:00
Carsten Haitzler 153a744e67 evas gl engine - ensure on texture delete we never leave a cur tex id dangling 2013-12-26 21:04:25 +09:00
Vostokov Sergey 36a52ca062 evas - gl-x11 engine - don't re-init engine window on rotate
this puts rotationc hanges in the same class as resizes for evas gl
x11 engine info updates and doesnt re-create the engine window data on
rotate.
2013-12-26 19:19:15 +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
Dennis Schridde ff4cbfbc25 evas: fix a segfault in _draw_thread_font_draw, caused by the missing initialisation of a struct field
CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-26 10:32:48 +09:00
Cedric BAIL 1929637aa0 evas: no loader should ever close an Eina_File anymore.
This would lead to some crash in EFM if relying on Evas to find the file format by
trying all its loader.

This should fix T674 and T668.
2013-12-20 15:10:16 +09:00
Carsten Haitzler 846bbafbfb evas - jpg loader - speed up header check for pgoressive jpgs 2013-12-20 14:14:52 +09:00