Commit Graph

59 Commits

Author SHA1 Message Date
Cedric BAIL 6427c77707 evas: refactor initialisation and shutdown of evas_common. 2016-12-05 11:22:52 -08:00
Jean Guyomarc'h 90c7a95a54 evas-gl_cocoa: add missing EVGL function
Not providing a call to the first method segfaults in elm_glview
right away. Instead of crashing, we now just issue a runtime error
about the method not being implemented.
2016-11-20 16:54:24 +01:00
Derek Foreman 5eec34812e evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs -
this is useful to get timing right on the drm and wayland engines.
2016-09-08 13:55:24 -05:00
Jean Guyomarc'h 60215a5c53 evas-gl_cocoa: migrate to gl_generic infrastructure
It has been a long journey, but here we are at last...
The infamous gl_cocoa engine has been migrated to the
gl_generic infrastructure. This should provide great
improvements and hopefully reduce side-channels b0rkage.

Fonts seems better, scrolling is smoother, expedite
does not segfault anymore... I haven't found a
regression with elementary_test, elementary_config,
terminology, expedite.
2016-08-25 23:29:27 +02:00
Jean Guyomarc'h d8e488b1c8 evas-gl_cocoa: start refactoring for gl_generic 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h c2856b040a evas-gl_cocoa: remove unused code 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 54b417fa30 evas-gl_cocoa: cleanup eng_setup 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h f4f94a9f79 evas-gl_cocoa: cleanup eng_info 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 62c342c4e3 evas-gl_cocoa: init/shutdown cleanup 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 84679d3173 evas-gl_cocoa: fix crashes at engine startup
Recently, the gl_cocoa engine started to crash at
startup. glGetIntegerv() in gl_common was called
without any gl context, and therefore segfaulted.

We now make sure it is called after a gl context
has been created and used.

Thanks jpeg for troubleshooting.

Fixes T4402
2016-08-22 19:56:08 +02:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
se.osadchy f796f04aae evas: fix work of engine on macOS.
Summary: Update eng_image_free function and check of references.

Reviewers: thiepha, NikaWhite, FurryMyad, raster, cedric

Subscribers: raster, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-11 10:54:50 -07:00
Jean Guyomarc'h b2775d90b1 evas-gl_cocoa: resize the gl context before resizing the window
This order seems more right. It does not have a visible
impact though...
2016-06-05 12:12:02 +02:00
Jean Guyomarc'h 8fb153cf8c evas_gl_cocoa: fix segmentation fault at program exit
Programs crashed on a segmentation fault when the last window was
closed. The eng_output_idle_flush() function was removed... but
since gl_cocoa does not properly use *_generic modules, the
output_idle_flush() function called by the render engine was
garbage (hence the segfault).

Now nothing is done... but at least we don't crash anymore.
2016-04-02 22:27:12 +02:00
Jean-Philippe Andre 39a970835b Evas: Remove unimplemented border_set/get (engine internal) 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
Jean-Philippe Andre 91e0bdb1e7 Evas: Simplify direct access to image data
This should avoid issues with image_data_get from the engines,
when we really just want to fetch the original data pointer.
2016-03-28 16:40:01 +09:00
Jean Guyomarc'h b9cd3ac82d evas_gl_cocoa: update function parameters
Commit fd4e133cc1 changed the internal
API, but it was not reflected in evas_gl_cocoa.

This commit fix a compiling warning and possible undetermined behaviour.

@fix
2016-01-07 12:03:04 +01:00
Jaehyun Cho d1c359eb27 Evas GL: Fix compile error by comment out removed function. 2015-12-11 14:29:16 +09:00
Jean Guyomarc'h 905d3c710a evas_gl_cocoa: make sure focus is always unlocked after locking it
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean-Philippe Andre 64de2f6ce5 Evas: Add some internal engine APIs
- image_file_colorspace_get
   This will be used to determine the best loading format, especially
   targeted at edje_cc / edje_decc so we can avoid ETC re-encoding.

- image_data_has
   Checks whether the image is currently loaded in (CPU) memory,
   and also returns the current colorspace.
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre c22c25c9ef Evas GL: Release shader compiler during evas_render_idle_flush
It is safe to release the compiler at any time since the next
call to glCompileShader will restore it. This may even be a no-op
for all we know (this is driver-dependent).
2015-11-10 16:12:20 +09:00
Nicolas Aguirre aab530e347 ecore_cocoa/evas_gl_cocoa: fix indent, remove printf, and add DBG messages
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:34 -08:00
Srivardhan Hebbar 78c723b2ed evas: removing redundant if case in gl_cocoa backend.
Summary:
According to my understanding of this function, this check of im_old is
redundant, as im_old will never be NULL. For im_old to be NULL, image should be
NULL. But that is checked at line 637. im is assigned image and im is checked for NULL. At line 654 im_old is assigned image and it is not modified till line 673. So this check would always return true and enter if case and would never
enter else case. So removing the redundant code.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-31 02:36:17 +01:00
Nicolas Aguirre d363b88b1c evas: fix build of gl_cocoa engine.
__context_restore and __need_context_restore are undefined when
building gl_cocoa engine.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-13 15:40:01 -07:00
Jean-Philippe Andre 2a46280e1e Revert "Evas gl_cocoa: remove code duplicated from gl_generic"
This reverts commit 681c8b0ec2.

@cedric pointed me out that gl_cocoa doesn't depend on gl_generic,
so this commit was not very smart.
2015-07-02 16:00:40 +09:00
Jean-Philippe Andre b5c9350805 Evas: Replace image_map_surface_free by common image_free
Those two functions were doing exactly the same thing[1], which
is free an image, so this commit only attempts to simplify the code
a little bit.

[1] Actually image_map_surface_free() might even not have worked
properly with cserve2 sw (calling unload instead of close).
2015-07-02 12:05:50 +09:00
Jean-Philippe Andre 681c8b0ec2 Evas gl_cocoa: remove code duplicated from gl_generic
Remove the two functions:
- image_data_get
- image_data_put
2015-07-02 11:58:50 +09:00
Dongyeon Kim 291fcca181 evas/gl_x11, gl_cocoa: remove static variable in eng_font_draw
Summary:
When evas is recreated, this static variable value remains,
so it references already freed memory.

Test Plan: Local tests

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: wonsik, mer.kim, cedric

Differential Revision: https://phab.enlightenment.org/D2678
2015-06-15 17:48:11 +09:00
Nicolas Aguirre 940f2e72f9 evas: fix gl_cocoa build after recent changes in evas_common_draw_context_font_ext_set.
Now evas_common_draw_context_font_ext_set takes 3 more parameters, fix the build
by adding NULL for the function pointers. We really need to switch to gl_generic
here, it would avoid this kind of problems.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-27 18:29:38 +01:00
pierre lamot 6ea9b476ad ecore_cocoa: release resources on window close event
@fix this patch:

catch the window close event from cocoa and send an ecore event
this event is catched by a handler in ecore_evas wich will
call the registered fn_delete_request (from elementary for instance)

/!\ this patch is currently incomplete and leads to a segv when
closing the last window

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
Nicolas Aguirre cf730014cf evas: symetric lock/unlock calls in gl_cocoa backend.
this code add symetric calls to lock and unlock focus view

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01:00
Romain Perier 6e193e2006 evas: lock and unlock focus on Cocoa view when drawing surface
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:58 +01:00
Cedric BAIL 93333ede15 evas: refactor shutdown. 2015-02-23 11:35:29 +01:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
Jean-Philippe Andre 4315537820 Evas GL: Add support for OpenGL-ES 1.1 (part 2)
Add version param to context_create.
Add support for 1.1 contexts in the GL_X11 engine, and checks
for version in all other engines (return NULL).
Add API wrappers for all OpenGL-ES 1.1 APIs (normal and debug
modes).
2014-10-20 12:16:08 +09:00
Jean Guyomarc'h ffb518fcdd evas: Gl_Cocoa - fix early segfault caused by unloaded symbols
Summary:
evas_gl_symbols() (introduced in commit 9a9d78d) was not dlsym()ed
which led to unloaded symbols, so NULL function pointers which were happily
dereferenced, leading to an early segfault, and therefore to a broken engine.

@fix

Reviewers: cedric, raoulh

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-22 14:59:27 +02:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
Raoul Hecky f15034d2a6 evas_cocoa: more changes copied from sdl engine 2014-06-18 11:34:07 +02:00
Raoul Hecky d535a0e605 evas_cocoa: Update cocoa gl engine 2014-06-18 11:34:07 +02:00
Raoul Hecky d29aac6fe7 evas_cocoa: remove eng_image_mask_create 2014-06-18 11:34:07 +02: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 dc75a1fcff evas: remove dead code. 2014-04-01 22:00:15 +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 7d7f548afc evas - gl - dont allocate image and/or texture until needed on native unset 2013-10-16 22:56:38 +09:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02: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 1073084807 evas: change cache API to forward Eo object. 2013-06-14 16:38:18 +09:00
Cedric Bail ad5d75dfcd evas: add support for engine specific extention during thread task. 2013-06-04 11:20:25 +09:00
Cedric Bail d833244100 evas: add infrastructure to open from Eina_File. 2013-05-08 18:17:00 +09:00