Commit Graph

714 Commits

Author SHA1 Message Date
Chris Michael a9853f96f7 Port 1f82fbe14d to wayland shm engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 08:11:16 +01:00
Chris Michael b43421ae5b Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 08:05:47 +01:00
Carsten Haitzler 70f443d8a8 evas - avoid memleak on rotation of tilebuf in engine for gl and sw possibly. 2013-08-29 14:58:09 +09:00
Rafael Antognolli f69cde8107 evas/gl_x11: eng_window_use will not always force makecurrent.
If the egl_surface is different from the current one, it may be that the
it has been destroyed already. Removing the below check (and just
checking for different contexts) will avoid calling makecurrent when
destroying a window.  That was always failing anyway.

Should fix https://phab.enlightenment.org/T311 for gl_x11 too.
2013-08-29 17:25:40 -03:00
Carsten Haitzler 1f82fbe14d evas - unify partial update in sw engine swapper so it is like gl 2013-08-27 17:21:10 +09:00
José Roberto de Souza 09bae8b373 ecore system: If by some reason name of locale changed dont have a '=' skip it 2013-08-23 16:05:12 -03:00
Rafael Antognolli 5d053bf19b evas/wayland_egl: eng_window_use will not always force makecurrent.
If the egl_surface is different from the current one, it may be that the it has
been destroyed already. Removing the below check (and just checking for
different contexts) will avoid calling makecurrent when destroying a window.
That was always failing anyway.

Should fix https://phab.enlightenment.org/T311 for wayland_egl.
2013-08-23 16:19:42 -03:00
Chris Michael 6f5f9d075d Reduce duplicated code for setting resize edges.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:31:29 +01:00
Chris Michael 5c2eadea98 Reduce duplicated code for setting engine resize edge
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:31:11 +01:00
Chris Michael 21f0ad4f0e Add function prototypes for resize_edge_set.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:30:52 +01:00
Chris Michael 2c9a19503f Add function for setting/resetting window resize edges to remove
duplicated code.
Resize the frame object before we update the window saved size.
Remove (again) call to _ecore_evas_wayland_resize and set the resize
edge of the window.

NB: The call to _ecore_evas_wayland_resize ends up sending duplicate
configure events here, hence whey it is removed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-21 08:28:48 +01:00
Rafael Antognolli ffa9d69180 Revert "Remove Call to _ecore_evas_wayland_resize on a configure event."
This reverts commit 5eeb820b0f.
2013-08-21 12:55:14 -03:00
Rafael Antognolli 3a654f795c evas/gl: Don't look for EXT and ARB extensions when on GLES.
At least on recent mesa (since commit 9f07ca11c17), it will find the
mentioned symbols but they won't really work, leading to error messages,
and possibly some other errors. So far, I just ifdef'ed the
glGenFramebuffer and glBindFramebuffer functions, but it may require
others to be ifdef'ed too.

This is just a workaround, to fix https://phab.enlightenment.org/T246.
2013-08-21 12:39:17 -03:00
Chris Michael 5eeb820b0f Remove Call to _ecore_evas_wayland_resize on a configure event.
NB: Not sure how/why this was here, but it's entirely Not needed and
leads to duplicate calls of wl_shell_surface_resize.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-16 11:31:53 +01:00
José Roberto de Souza 34c2fdbbba ecore system: Simply systemd locale set 2013-08-15 14:46:30 -03:00
José Roberto de Souza 76e69f9323 ecore system: Add Tizen backend 2013-08-15 14:46:30 -03:00
Carsten Haitzler 393040a9fe adjust (as discussed) to have enums for memory and battery state. 2013-08-10 23:23:06 +09:00
Gustavo Sverzut Barbieri 6f2871a305 ecore: add upower system module.
It's always enabled as it's a dbus module and links to nothing,
actually the daemon doesn't need to be running -- in that case it will
do nothing. In the case the daemon becomes active then it will get the
OnLowBattery property and keep it in sync.

NOTE: I couldn't test the property change as my laptop takes many
hours to get to that situation... let's hope it works :-)
2013-08-09 16:39:10 -03:00
Gustavo Sverzut Barbieri c0c5736a4e ecore: add system modules, implement 'systemd'.
Ecore will now load "system modules" on ecore_init(). The "systemd"
module will use DBus to monitor localed, hostnamed and timedated and
add system events related to those changes.
2013-08-09 14:28:02 -03:00
Stefan Schmidt 91426926c5 ecore_evas: Fix potential NULL dereference.
We don't want to execute any of the function below if t is NULL. Its not
only about strdup but alsa ecore_x_netwm_name_set which might dereference it.

CID 1039400
2013-08-07 15:38:35 +01:00
Cedric Bail 468eb14635 evas: fix comment to actually compile if you use them. 2013-08-06 15:44:43 +09:00
Cedric Bail e60baa0061 evas: change mapping policy to be less agressive into loading file in memory.
Should fix T271.
2013-08-02 10:25:26 +09:00
Chris Michael 4d54c97864 Remove calls to ecore_wl_init and ecore_wl_shutdown.
NB: These calls are NOT needed here (they setup and tear down the
actual wayland display fd connections, and are not necessary in order
to use ecore_wl functions).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-01 12:50:41 +01:00
Mike Blumenkrantz 5d1dec17b3 ecore-evas-x no longer tries making x calls on deleted windows when trying to free its sync counter 2013-08-01 12:17:58 +01:00
Sung W. Park 5ac17a52d5 Evas: Fix Evas_GL engine shutdown error.
It was trying to use access a struct for egl_disp after the struct
was freed..
2013-07-30 19:45:40 +09:00
Chris Michael d65c357b39 During a call to ecore_evas_show (using wayland_shm), we can avoid
erroneous calls to engine_setup code if we check surface validity.

NB: Short Version: Don't reassign surface if we don't need to.

NB: Prior to this, during a call to ecore_evas_show we would always
Reset the evas engine data (which was basically triggering code to
tear down and reconstruct all the engine internals including the
buffers and the swapper). By checking surface validity first, we can
potentially avoid all that teardown and reconstruction Thus resulting
in faster "show" speed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 15:48:40 +01:00
Chris Michael 43e60f3f83 Check that we have both Rects and Count is > 0 during buffer attach.
NB: When trying to attach a buffer to a surface, there was a corner
case that could fail in that if we just had 'rects' but count was 0,
then the surface would not get damaged (essentially a call to
wl_surface_damage would get passed 0,0 as the size). This fixes that
problem in that if count is <= 0 now, then we'll damage the whole
surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 15:45:55 +01:00
Chris Michael d112487e84 When we destroy the shm_pool, reset the swapper used_size to zero.
Remove FIXME and resize the the shm_pool if it is too small for the
new buffer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 09:13:08 +01:00
ChunEon Park 231d619c8c evas - found a inccorect check while reading the code. 2013-07-25 16:05:56 +09:00
ChunEon Park f4377b316c evas - skip the map rendering if all points are transparent. 2013-07-25 16:01:49 +09:00
Mike Blumenkrantz 569b2fd86a ecore-evas-x no longer uses X windows after receiving a destroy event 2013-07-24 14:01:03 +01:00
Chris Michael a48c4cd064 Check for valid text_input object before trying to call wayland
functions on it.

NB: Wayland (internal) functions typically do not do Any object
validity checking, so lets be proactive and do it here first.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-24 09:15:43 +01:00
Chris Michael 47a7f74453 Fix indentation of some if statements
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-24 09:10:42 +01:00
Chris Michael 345351d736 Fix formatting so I can actually read this code in 80 columns ;)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-24 09:08:50 +01:00
Chris Michael 449c0c72b0 Check for valid returns of ecore_wl_registry_get and
ecore_wl_globals_get before trying to use them.
After we have bound a text input manager, there is no need to keep
looping the globals, so break out.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-24 07:23:58 +01:00
Chris Michael 1832bf5c03 Fixup formatting.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-24 07:11:32 +01:00
Chris Michael 3482b91624 No longer necessary to set the surface user_data to be equal to the
buffer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-23 07:15:20 +01:00
Chris Michael cc596a3588 If the init count is >= 1, then we want to iterate (ecore_imf wayland
module adds an extra init).

Fix some formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-23 07:15:19 +01:00
Cedric Bail ee72c809f0 efl: fix headers order. 2013-07-23 11:27:29 +09:00
Sung W. Park 7aa516c01a Evas: adding image dump debug feature for wayland_egl backend
Porting commit f10c108283d9b76708418ba172b9ff0b28a09cd6 to wayland
engine.

Added a feature to dump out a png image before calling SwapBuffers.
To turn on the feature, use the following env vars.

EVAS_GL_SWAP_BUFFER_DEBUG_DIR="dir_name" sets the name of the directory
that the files will be output to and enables the debug mode.

EVAS_GL_SWAP_BUFFER_DEBUG_ALWAYS=1 will enable the writing of the
files every frame.  This in effect turns on the swap_buffer_debug
variable, which can be set on or off in gdb for debugging.  This will
allow dumping of certain frames without having to dump out a ton of
files to track down one frame.
2013-07-23 10:27:28 +09:00
Sung W. Park 3074280217 Evas: adding image dump debug feature for gl_x11 backend
Added a feature to dump out a png image before calling SwapBuffers.
To turn on the feature, use the following env vars.

EVAS_GL_SWAP_BUFFER_DEBUG_DIR="dir_name" sets the name of the directory
that the files will be output to and enables the debug mode.

EVAS_GL_SWAP_BUFFER_DEBUG_ALWAYS=1 will enable the writing of the
files every frame.  This in effect turns on the swap_buffer_debug
variable, which can be set on or off in gdb for debugging.  This will
allow dumping of certain frames without having to dump out a ton of
files to track down one frame.
2013-07-23 10:27:28 +09:00
Carsten Haitzler 382f3d5d60 emotion: warnings-- for x overlay/xv. 2013-07-18 20:07:01 +09:00
Carsten Haitzler f9f0b717e6 emotion - fix shutdown to ensure all pending async calls are gone too. 2013-07-18 20:00:22 +09:00
Carsten Haitzler 2e74e41ed3 emotion gst: disable x window under/overlay suport for now. broken badly. 2013-07-17 18:37:03 +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
Chris Michael 9a4fc9ad44 Add engine interface code for:
- ecore_evas_pixmap_visual_get
- ecore_evas_pixmap_colormap_get
- ecore_evas_pixmap_depth_get
Assign interface functions for above when creating the new interface.
When creating the pixmap, store the visual and colormap for later
retrieval.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-11 10:49:25 +01:00
Chris Michael fc9ee11462 Add visual and colormap to pixmap structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-11 10:49:25 +01: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
Chris Michael 4a40c8298b Remove prev_front pixmap from structure
Use a local variable to hold previous front pixmap while swapping

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-11 08:56:44 +01:00
Carsten Haitzler 199fb6523e evas gl engine - paranoia: check max texture size limits on texture alloc 2013-07-11 12:39:44 +09:00
Stefan Schmidt 92de5dd3c6 evas/eet: Prevent libjpeg to redefine INT32.
The define prevents that INT32 gets redefined in libjpeg while it
already is defined for the mingw build.
2013-07-09 11:19:28 +01:00
Cedric Bail f54a09ef83 Revert "evas: use Eina_Tiler for GL backend."
This reverts commit 87b49cf103.
2013-07-09 10:42:01 +09:00
Cedric Bail 87b49cf103 evas: use Eina_Tiler for GL backend.
This is a start to leverage more on our infrastructure so that later
optimizing Eina_Tiler will be more usefull.
2013-07-09 09:48:09 +09:00
Chris Michael 6e49578cb7 Check for valid string before trying to write (potentially NULL) to
the pipe.

NB: Fixes Coverity CID1039398

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:38:54 +01:00
Chris Michael 1d9a19f1ee Check for valid 'send' before trying to call
emotion_gstreamer_buffer_free (which will dereference it).

NB: Fixes Coverity CID1039397

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:34:41 +01:00
Chris Michael c58347b0a5 Check for valid 'send' before trying to call
emotion_gstreamer_buffer_free (which will derefence it).

NB: Fixes Coverity CID1039396

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:33:15 +01:00
Chris Michael 6229a871de When printing this debug message, check for valid extension string get
function First.

NB: Fixes Coverity CID1039394

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:30:41 +01:00
Chris Michael 1140dbceeb Add missing eina_lock_release when we exit
Since we take the lock at the start of the function, we should release
the mutex lock if we are going to return.

NB: Fixes Coverity CID1039381

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:10:44 +01:00
Chris Michael 6198351629 Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:09:50 +01:00
Chris Michael 5e94e640c6 Fix function and protoype for pointer_xy_get (missing const).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:09:02 +01:00
Chris Michael a8bb3ec5ce Add common wayland function to get the pointer xy from wayland
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:02:58 +01:00
Chris Michael 4d2de522fa Add pointer_xy_get function to engine functions
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:00:28 +01:00
Chris Michael f0e47a2219 Add pointer_xy_get function to engine functions
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 10:59:20 +01:00
Chris Michael fca4267ae4 Add functions to X engine for ecore_evas_pointer_xy_get and
ecore_evas_pointer_warp

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 10:57:00 +01:00
Chris Michael 6ea61e3e56 Fix formating ... Wow, how did this get sooo screwed ? :(
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 10:16:09 +01:00
Chris Michael 9103b7e2e3 Check the return of ecore_x_init and error out if that fails.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 09:21:33 +01:00
Chris Michael 461e406b91 Fix memleak reported by Coverity.
NB: Fixes Coverity CID1039652

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 08:43:24 +01:00
Chris Michael 1ea718c283 Fix memleak reported by Coverity.
NB: Fixes Coverity CID1039654

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 08:38:54 +01:00
Chris Michael 72347e539b Fix copy/paste error in gl_common_context_push. (I beleive that texm
texture was wanted here, not tex texture).

MB: Fixes Coverity 1039670

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 08:26:08 +01:00
Chris Michael 73a68f2f0d Add code for gl_pixmap_new and pixmap_get functions
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 07:21:51 +01:00
Carsten Haitzler 28c2bd1918 evas - gif: refactor a lot of the gif animated loader code to be much cleaner. 2013-07-06 15:12:36 +09:00
Carsten Haitzler fab94cb3ea evas - fix gif animatd loader segv just inroduced. 2013-07-05 23:11:51 +09:00
Chris Michael 7431e6a02a Check for valid ee->prop.window before trying to fetch window
attributes from it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-05 11:09:25 +01:00
Chris Michael 2c322cc7b1 Add code for ecore_evas_<engine>_pixmap_new/get functions.
- Add "pixmap" structure to engine_data.
    - Free the front and back pixmaps when the ecore_evas gets freed.
    - On resize, drop the backing pixmap if size is different.
    - Before we render, check pixmap size vs EE size and create new
backing pixmap if needed.
    - After we have rendered into the backing pixmap, flip it to the
front so that any calls to "pixmap_get" will return the proper one.
    - Add pixmap_new_internal code (the actual guts for all this)

NB: These can be used to create an internally double-buffered
ecore_evas that renders to a pixmap (not a window).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-05 10:44:18 +01:00
Cedric Bail 913d56da9e evas: make it possible to disable preload for buggy driver. 2013-07-05 15:39:44 +09:00
Cedric Bail 2efcd3bb19 evas: fix gif loader accessing uninitialized value. 2013-07-05 11:35:06 +09:00
Chris Michael 8fc3c9c8bc Revert "EFL formatting and 80 column wrap"
Revert this because I have better things to do than argue about commit
messages.

This reverts commit ee5483bee1.
2013-07-03 14:30:40 +01:00
Chris Michael ee5483bee1 EFL formatting and 80 column wrap
NB: Nothing functional (yet)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-03 13:54:35 +01:00
Cedric Bail 0f153be0e5 evas: fix bugin Enlightenment triggering a path where data are loaded, but flags is not set.
This fix T187.
2013-07-03 12:48:38 +09:00
Carsten Haitzler 22ad827274 evas gl: fix origin of swapbufferswithdamage to be BOTTOM-LEFT based... 2013-07-03 12:11:18 +09:00
Stefan Schmidt ed08c1832c emotion: Another check for engine being NULL.
Missed this second occurance in 8deb75463b.
Now also fixed this potential null pointer dereference when the engine
list is empty.
2013-07-02 09:45:35 +01:00
Carsten Haitzler 1f2c19749f in drm_shutdown set tried to false... 2013-07-02 17:26:18 +09:00
Jean-Philippe Andre f1506d8dd2 evas/loaders: use Eina_Stringshare where needed.
Evas loaders' open() function expect the key to be a stringshare,
so declare it as such and keep using ref() without add().

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre 687c4aa475 evas/cserve2: use Eina_Stringshare.
We must close the image after loading the data.
Also, Evas loaders expect stringshares.

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre 65fcf390b4 evas/loaders: init/shutdown EET from loader module.
cserve2 slave requires Eet to be initialized before use :)

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre a09efda8d2 evas/loaders: add log domain for ICO loader.
This is to remove the dependency of the ico loader on Evas itself.

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre 90d8647c02 evas/cserve2: fix crash with YUV tests in expedite.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jiyoun Park 958a430f5e * Evas: Fix jpeg loader cannot deal with exif information correctly 2013-06-29 15:00:43 +09:00
Chris Michael f9348a5015 Fix klockwork possible memleak report:
If we get an error trying to "make current" an allocated surface, then
we should free that allocated surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 14:23:57 +01:00
Chris Michael d92edb51a4 Fix memleak reported by klockwork:
If a jpeg image is rotated and we have allocated space for ptr_rotate,
then we should free it Always ... Not Only if the degrees are
180...because we allocate it always

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 13:39:45 +01:00
Eduardo Lima (Etrunko) 2d84a8a8fb WIP
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-26 10:58:36 -03:00
Daniel Willmann dd76f4cd05 evas gl_x11: Fix uninitialized use of re in eng_output_flush()
In case of render_mode == EVAS_RENDER_MODE_ASYNC_INIT we're jumping
directly to end which then calls
evas_gl_preload_render_unlock(eng_preload_make_current, re);

Make sure re is initialized with the render engine data so we don't
dereference junk.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-26 14:42:10 +01:00
Daniel Willmann adcde1f87e evas gl_common: Fix incorrect number of parameters in functions
_evgl_tls_resource_get() and _surface_context_list_print() don't take
parameters.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-26 14:42:10 +01:00
Tom Hacohen 182dfb82d4 Evas gl: Fixed double-free when failing gl init. 2013-06-26 10:40:44 +01:00
Cedric Bail d64c808a73 evas: check wether we do have a data or not. 2013-06-26 11:49:16 +09:00
Stefan Schmidt 8deb75463b emotion: Check engine for NULL before dereferencing.
It might be that our engine list is empty and thus our engine might still
be set to NULL. Better check and return if this is the case instead of
dereferencing NULL.
2013-06-25 14:42:09 +01:00
Chris Michael abf8a3b7bf Format for EFL style
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-25 14:14:04 +01:00
Chris Michael 0615dfe4ee Add missing safety checks for valid proxy objects before trying to
call functions on the object

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-25 14:14:04 +01:00
Chris Michael aa54fcf059 Check that ecore_wl_init succeeds before trying to make calls into it.
Fix formatting.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-25 09:31:52 +01:00