Commit Graph

1855 Commits

Author SHA1 Message Date
Ji-Youn Park 8c66b70aa9 ecore_evas: fix iconified state set bug
if app set iconified state false, ecore evas call activate instead of show.
2015-06-26 19:18:09 +09:00
Carsten Haitzler e90d60f8f5 ecore-evas-extn : map shm for sharing render pixels conservatively
@fix

before we mapped these segmentsa read+write for the user or read+write
for EVERYONE if system. this now creates the file as r+w for the user
and +ro for everyone only IF system, and clients voluntarily map
read-only to avoid possible memory corrupting of pixels from the
client side. not more secure for clients, but nicer. defintiely more
secure for system services.
2015-06-26 17:37:24 +09:00
Daniel Kolesa c709f1dca2 eolian/generator: constify all prototypes for @const functions
Otherwise there would be conflicts in certain circumstances.

This also requires adding const on many existing functions,
and similar work is necessary in Elementary.

@fix
2015-06-25 12:18:43 +01:00
SangHyeon Lee 9e57d34893 fb engine : Add NULL type handling in output free.
Summary:
Add NULL type check in output_free of evas fb engine.
If engine setup is failed,
Render_Engine wil be NULL so output_free also need to
handling NULL check.

Test Plan:
It needs specific condition to reproduce,
           engine of ecore_evas is set to fb, and setup is failed,
           then Render_Engine is NULL, but ecore_evas_free will call
           output_free in fb engine's evas_engine.c

Reviewers: raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric, seoz, eagleeye, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D2743
2015-06-23 08:11:39 +09:00
Seunghun Lee 8b62177561 ecore-buffer: Add ecore_buffer library to EFL.
Summary:
Ecore_Buffer is abstraction of graphic buffer.
it supports backend of shm, x11_dri2 and x11_dri3 for now,
and this library also provides method to share buffers between processes.
Ecore_Buffer_Provider and Ecore_Buffer_Consumer is for this, sharing buffer.
provider draws something in to Ecore_Buffer, and consumer receives and displays it.
the binary, bq_mgr is a connection maker for buffer provider and consumer.
it can be included Enlightenment as a deamon later.

@feature

Test Plan:
1. Configure with --enable-ecore-buffer and --enable-always-build-examples to build examples.
2. Run bq_mgr, it connects consumer and provider.
3. Run ecore_buffer_provider_example and ecore_buffer_consumer_example

Reviewers: lsj119, gwanglim, cedric, zmike, jpeg, raster, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2197
2015-06-22 10:31:42 -04:00
Oleksandr Shcherbina ac4b6422f4 evas: fix Evas.Canvas3D color pick
Summary:
After this commit	684c51360f it didn't work
Miss bind color pick texture to drawable data
@fix

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, Ievgen, se.osadchy

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-22 11:11:33 +02:00
Chris Michael 4e6b06dfd7 evas-gl-drm: Cleanup compiler warnings when building gl_drm engine
Summary: This cleans up nasty compiler warnings when building the
gl_drm engine. If we do not define EGL_EGLEXT_PROTOTYPES then we end
up with implicit declaration warnings

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-18 09:59:29 -04:00
Oleksandr Shcherbina d409df1caa evas: change interface evas_3d to evas_canvas3d
Summary:
Regard to https://phab.enlightenment.org/T2479 it is need for right generation
Eolian files

Reviewers: cedric

Subscribers: cedric, tasn

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-17 17:52:17 +02:00
Chris Michael 7d6b142ca7 ecore-evas-drm: Default to GBM_FORMAT_ARGB8888
Summary: Seems some platforms (my setup here at least) don't have EGL
configs which suppose GBM_FORMAT_XRGB8888, so default to ARGB

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-17 10:19:29 -04:00
Chris Michael cdbaa65bd4 evas-gl-drm: Add support for EGL_MESA_platform_gbm
Summary: This change adds support for using EGL_MESA_platform_gbm to
get the display directly from gbm and to create a window surface
(usable by egl) directly from the gbm surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-17 10:19:29 -04:00
Cedric BAIL 7a1da35e22 evas: use the right function with freetype backend. 2015-06-16 17:23:05 +02:00
Jihoon Kim bae1c701ba ecore_imf/wayland: Add NULL check before accessing 2015-06-16 16:28:16 +09:00
Dongyeon Kim 6f55b135c2 evas/gl: Add null checks
Summary: Add null check for glGetString version check and evgl_engine

Test Plan: Local tests

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2699
2015-06-16 13:47:16 +09:00
Jean-Philippe Andre 8d72372fa7 Evas GL: Fix error message (ERR --> INF) 2015-06-15 17:51:36 +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
Chris Michael 88cb6b74bf evas-gl-drm: Cleanup gl_drm engine code a bit more
Summary: This cleans up the gl-drm engine code a bit and avoids the
need to constantly destroy and recreate the gbm device itself. This
also adds checks during Outbuf create to handle the swap_mode as per
previously added enum.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Chris Michael 9315424bac evas-gl-drm: Move gbm_surface field to Outbuf structure
Summary: This moves the Engine_Info's gbm_surface field to the Outbuf
structure

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Chris Michael 8809979ce3 evas-gl-drm: Add swap_mode enum
Summary: This adds an enum we can use for setting/determining the
swap_mode to use for the gl_drm engine

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Subhransu Mohanty aac9bee035 evas/engines : renamed ector native engine to "default" from "freetype" 2015-06-12 19:56:57 +09:00
Jean-Philippe Andre 142626c00a Evas GL: Make INF message more explicit
Direct rendering is actually quite hard to enable, so make the
message very explicit for elm_glview users. Thanks zmike for
reporting this msg.
2015-06-11 10:40:08 +09:00
Jean-Philippe Andre cb11a67595 Evas GL: Fix coverity CID 1304559, 1304560
Summary:
<CID 1304559: Logically dead code>
The dead code is only valid for GLES backend, so move if statement
to be used for GLES backend only.
<CID 1304560: Bad bit shift operation>
When calculating depth bit, bit shifting could be done with negative values.
@fix

Test Plan: Local tests

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2654
2015-06-11 08:39:43 +09:00
Carsten Haitzler 25983dcedd evas render2 work - begin to make rectangles deal with render 2 basic
infra
2015-06-09 17:34:39 +09:00
Jean-Philippe Andre fb58613e18 Evas: Fix shadow warning 2015-06-09 15:55:35 +09:00
Jihoon Kim b8bcc35f7a ecore_imf/wayland: support on-demand show mode
In on-demand show mode, input panel will be shown in case of only an user's explicit Mouse Up event.
It doesn't request to show the input panel even though the Input Method Context has focus.
2015-06-09 14:30:07 +09:00
Stefan Schmidt d50cebbd4f modules/evas/engines/software_generic: No need to check enums for smaller 0
Evas_Image_Orient is an enum starting at 0 thus we never go below 0. Remove
unneeded checks.

modules/evas/engines/software_generic/evas_engine.c:1558:4: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
modules/evas/engines/software_generic/evas_engine.c:1560:8: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
2015-06-08 17:09:38 +02:00
Avi Levin f9c116a487 emotion: porting evas smart callbacks to eo 2015-06-07 11:00:52 +03:00
Chris Michael 50a37e72fc evas-gl-drm: Trap for invalid gbm bo
Summary: If we fail to lock the front buffer, we will not get a valid
bo returned so we should not be calling other functions which require
a bo.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 13:40:35 -04:00
Chris Michael 939d221ff1 evas-gl-drm: Fix issue with swap mode returning wrong value
Summary: This fixes a crashing issue in evas image cache due to the
engine returning an improper swap mode.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael a83bb5e45d evas-gl-drm: Refactor gl_drm engine to not use dumb buffers
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael 35e7d36489 ecore-evas-drm: We don't need to feed mouse events here
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael 70b674d06c evas-gl-drm: Create eglContext before eglWindowSurface
Summary: We should be creating the eglContext before trying to create
the window surface.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 493e751882 ecore-evas-drm: Use XRGB format for gl_drm canvas
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 47a2602af7 evas-gl-drm: Readd support for pre_swap/post_swap callbacks
Summary: The pre/post swap callbacks were forgotten when doing the
engine rewrite, so readd them

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 39c28cbe8e ecore-evas-drm: Update ecore_evas_drm for recent evas gl_drm changes
Summary: Previous Ecore_Evas drm code would create the gbm device and
surface inside the gl_drm function. As these are now handled inside
the evas-gl-drm engine itself, this code is not needed here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael ee593050f1 evas-gl-drm: Rework gl_drm engine to function again
Summary: Previous gl_drm evas engine code did not work properly (or at
all really). This reworks/refactors the gl_drm engine code to work
again with the changes made to ecore_drm.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 58dbb63ba4 evas-gl-drm: Remove old engine code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Dongyeon Kim 25822405a4 evas/gl_common: Reset mvp matrix only for shaders that are being used
Summary:
Evas has quite a number of shaders, and resetting the projection matrix
for all shaders takes some time, which is an overhead when target surface
is continuously being changed (ie. when using proxy).
So here we reset the projection matrix for shaders that are actually used.
2015-06-03 11:30:22 +09:00
Dongyeon Kim 3e39bf3638 Evas GL: support surfaceless make current
Summary:
Evas GL now supports surfaceless make current, where
evas_gl_make_current can be called with sfc parameter NULL.
This closely resembles EGL_KHR_surfaceless_context extension,
where applications that only want to render to client API targets
can make current to NULL surface instead of creating a dummy egl surface.
@feature
2015-06-03 11:30:22 +09:00
Dongyeon Kim a4c05cc68c Evas GL: Skip surface buffers create/allocate for pbuffer with NO_FBO
Summary:
When pbuffer surface is created with EVAS_GL_NO_FBO config,
FBO should not be created/allocated.
2015-06-03 11:30:22 +09:00
Dongyeon Kim 517109858e Evas GL: Match FBO config with window surface config
Summary:
When direct rendering is enabled, FBO configuration should match
window surface configuration as FBO will be used in fallback cases.
So create FBO with configuration from window surface.
@fix
2015-06-03 11:30:22 +09:00
Dongyeon Kim ae91db021b Evas GL: Pass correct attachment enum for glDiscardFramebufferEXT
Summary:
When default framebuffer(0) is bound, attachment should contain
COLOR, DEPTH or STENCIL for glDiscardFramebufferEXT.
When a framebuffer object is bound, attachment should contain
COLOR_ATTACHMENT0, DEPTH_ATTACHMENT or STENCIL_ATTACHMENT.
This should be correctly taken into account for indirect rendering,
where internal FBO is used.
@fix
2015-06-03 11:30:22 +09:00
Dongyeon Kim e4e67732c2 Evas GL: return correct context for context_get with indirect context
Summary:
When evas gl falls back to using indirect context,
evas_gl_current_context_get() should return the indirect context.
@fix
2015-06-03 11:30:22 +09:00
Dongyeon Kim 660bfcf3c2 Evas GL: Separate EGL and GL extension lists
Summary:
Separate EGL extensions from GL/GLES extension list, since
we have extension list for each GL version, and we do not want to
check EGL extensions differently when different GL versions are used.
This also simplifies extension string get function as we just need to
concatenate EGL and GL extensions rathan than keeping track of
GL extensions only.
2015-06-03 11:30:22 +09:00
Dongyeon Kim 411bc27390 Evas GL: Share texture id in case EGL image is not supported
Summary:
When EGL image is not supported, Evas GL should share texture id
to the gl backend for indirect rendering to work.
2015-06-03 11:30:22 +09:00
Dongyeon Kim 34480d3d5d Evas GL: Make current to an Evas GL context before destroying surface buffers
Summary:
We should make current to an Evas GL context before calling _surface_buffers_destroy,
otherwise resources from GL backend will be removed.
@fix
2015-06-03 11:30:22 +09:00
Dongyeon Kim b0d2643f93 Evas GL: Add indirect surface fallback and yinvert callback
Summary:
When either FBO or EGL image from texture extension is not supported,
we can use pixmap surface as indirect surface fallback.
Since native pixmaps have (0,0) in the upper left while
FBOs have (0,0) in the lower left, we should invert the y coordinates
when native pixmaps are used as the render target.
To accomodate run-time y-invert check we add a new callback for
EVAS_NATIVE_SURFACE_EVASGL type.

Reviewers: cedric, jpeg

Subscribers: wonsik, mer.kim, cedric
2015-06-03 11:30:22 +09:00
Dongyeon Kim 63e057bff9 Evas GL: Fix direct_mem_opt and direct_override
Summary:
Remove surface buffer create/allocate in pbuffer_surface_create.
In evgl_make_current, we should use direct_mem_opt, direct_override values
set in EVGL_Surface struct, not the global value set by env variables.
@fix
2015-06-03 11:30:21 +09:00
Dongyeon Kim ea5788d247 Evas GL: destroy egl image when surface is destroyed
Summary:
We should destroy egl image when surface is destroyed
to avoid memory leak.
@fix

Test Plan: Evas GL test cases

Reviewers: jpeg

Subscribers: mer.kim, mythri, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2357
2015-06-03 11:30:21 +09:00
Dongyeon Kim e789b24ff4 Evas GL: 1.x support for GLX
Summary:
Now we can support EVAS_GL_GLES_1_X version for GLX backend
with both direct and indirect rendering.
Refactored api get functions to have similar code path for each version.
@feature

Test Plan: Evas GL test case

Reviewers: cedric, jpeg

Subscribers: cedric, mer.kim, mythri, wonsik

Differential Revision: https://phab.enlightenment.org/D2342
2015-06-03 11:30:21 +09:00
Jean-Philippe Andre 777f7f2047 Evas masking: Fix rare issue of invalid rendering (GL)
Thanks Dongyeon for finding out this solution. Now that was
one nasty bug :)

Somehow the currently bound texture id would not match what
Evas expected, so Evas would not call glBindTexture when
required. As a result it was drawing black (sampling from tex 0).

@fix
2015-06-03 11:03:29 +09:00