From: Jaehwan Kim Date: Wed, 11 Nov 2015 11:29:07 +0000 (+0900) Subject: Merge remote-tracking branch 'opensource/efl-1.16' into tizen X-Git-Tag: accepted/tizen/mobile/20151120.070412~3^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e098736effd136c6f1026566c527fe0656a13597;p=platform%2Fupstream%2Fefl.git Merge remote-tracking branch 'opensource/efl-1.16' into tizen Conflicts: Makefile.am NEWS configure.ac data/ecore/ecore_wayland/protocol/subsurface.xml pc/.gitignore src/Makefile.am src/Makefile_Ecore_Buffer.am src/Makefile_Ecore_Evas.am src/Makefile_Ecore_Wayland.am src/Makefile_Ector.am src/Makefile_Efl.am src/Makefile_Efl_Cxx.am src/Makefile_Eina.am src/Makefile_Evas.am src/Makefile_Evas_Cxx.am src/bin/ecore_evas/.gitignore src/bin/edje/edje_cc_handlers.c src/bindings/eo_cxx/eo_inherit_bindings.hh src/examples/ecore/Makefile.am src/examples/ecore/ecore_buffer_example.c src/examples/edje/Makefile.am src/examples/evas/evas-images4.c src/examples/evas/evas-vg-batman.c src/examples/evas/evas-vg-simple.c src/lib/ecore/ecore_timer.eo src/lib/ecore_buffer/Ecore_Buffer.h src/lib/ecore_buffer/Ecore_Buffer_Queue.h src/lib/ecore_buffer/buffer_queue.c src/lib/ecore_buffer/buffer_queue.h src/lib/ecore_buffer/ecore_buffer.c src/lib/ecore_buffer/ecore_buffer_consumer.c src/lib/ecore_buffer/ecore_buffer_private.h src/lib/ecore_buffer/ecore_buffer_provider.c src/lib/ecore_buffer/shared_buffer.c src/lib/ecore_buffer/shared_buffer.h src/lib/ecore_drm/Ecore_Drm.h src/lib/ecore_drm/ecore_drm.c src/lib/ecore_drm/ecore_drm_device.c src/lib/ecore_drm/ecore_drm_evdev.c src/lib/ecore_drm/ecore_drm_inputs.c src/lib/ecore_drm/ecore_drm_launcher.c src/lib/ecore_drm/ecore_drm_logind.c src/lib/ecore_drm/ecore_drm_output.c src/lib/ecore_drm/ecore_drm_private.h src/lib/ecore_drm/ecore_drm_tty.c src/lib/ecore_imf/Ecore_IMF.h src/lib/ecore_imf_evas/ecore_imf_evas.c src/lib/ecore_wayland/Ecore_Wayland.h src/lib/ecore_wayland/ecore_wl.c src/lib/ecore_wayland/ecore_wl_input.c src/lib/ecore_wayland/ecore_wl_private.h src/lib/ecore_wayland/ecore_wl_subsurf.c src/lib/ecore_wayland/ecore_wl_window.c src/lib/ecore_wayland/subsurface-client-protocol.h src/lib/ecore_wayland/subsurface-protocol.c src/lib/ecore_wayland/xdg-shell-client-protocol.h src/lib/ecore_wayland/xdg-shell-protocol.c src/lib/ecore_x/Ecore_X_Atoms.h src/lib/ecore_x/ecore_x_atoms_decl.h src/lib/ecore_x/xlib/ecore_x_e.c src/lib/ecore_x/xlib/ecore_x_keygrab.c src/lib/ector/cairo/Ector_Cairo.h src/lib/ector/cairo/ector_cairo_private.h src/lib/ector/cairo/ector_cairo_surface.c src/lib/ector/cairo/ector_cairo_surface.eo src/lib/ector/cairo/ector_renderer_cairo_base.c src/lib/ector/cairo/ector_renderer_cairo_base.eo src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo src/lib/ector/cairo/ector_renderer_cairo_shape.c src/lib/ector/cairo/ector_renderer_cairo_shape.eo src/lib/ector/ector_generic_surface.eo src/lib/ector/ector_private.h src/lib/ector/ector_renderer_base.c src/lib/ector/ector_renderer_generic_base.eo src/lib/ector/ector_renderer_generic_shape.eo src/lib/ector/software/Ector_Software.h src/lib/ector/software/ector_drawhelper.c src/lib/ector/software/ector_drawhelper_private.h src/lib/ector/software/ector_drawhelper_sse2.c src/lib/ector/software/ector_renderer_software_gradient_linear.c src/lib/ector/software/ector_renderer_software_gradient_linear.eo src/lib/ector/software/ector_renderer_software_gradient_radial.c src/lib/ector/software/ector_renderer_software_gradient_radial.eo src/lib/ector/software/ector_renderer_software_shape.c src/lib/ector/software/ector_renderer_software_shape.eo src/lib/ector/software/ector_software_gradient.c src/lib/ector/software/ector_software_private.h src/lib/ector/software/ector_software_rasterizer.c src/lib/ector/software/ector_software_surface.c src/lib/ector/software/ector_software_surface.eo src/lib/ector/software/sw_ft_math.c src/lib/ector/software/sw_ft_math.h src/lib/ector/software/sw_ft_raster.c src/lib/ector/software/sw_ft_raster.h src/lib/ector/software/sw_ft_stroker.c src/lib/ector/software/sw_ft_stroker.h src/lib/ector/software/sw_ft_types.h src/lib/edje/Edje_Common.h src/lib/edje/Edje_Edit.h src/lib/edje/edje_calc.c src/lib/edje/edje_data.c src/lib/edje/edje_edit.c src/lib/edje/edje_load.c src/lib/edje/edje_object.eo src/lib/edje/edje_private.h src/lib/edje/edje_program.c src/lib/edje/edje_smart.c src/lib/efl/Efl.h src/lib/efl/interfaces/efl_file.eo src/lib/efl/interfaces/efl_gfx_base.eo src/lib/efl/interfaces/efl_gfx_fill.eo src/lib/efl/interfaces/efl_gfx_gradient_base.eo src/lib/efl/interfaces/efl_gfx_gradient_linear.eo src/lib/efl/interfaces/efl_gfx_gradient_radial.eo src/lib/efl/interfaces/efl_gfx_shape.c src/lib/efl/interfaces/efl_gfx_shape.eo src/lib/efl/interfaces/efl_gfx_stack.eo src/lib/efl/interfaces/efl_gfx_view.eo src/lib/efl/interfaces/efl_interfaces_main.c src/lib/eina/Eina.h src/lib/eina/eina_main.c src/lib/eina/eina_matrix.c src/lib/eina/eina_matrix.h src/lib/eina/eina_quad.c src/lib/eina/eina_quad.h src/lib/eina/eina_simple_xml_parser.h src/lib/eldbus/eldbus_message.h src/lib/eo/Eo.h src/lib/evas/Evas_Common.h src/lib/evas/Evas_Eo.h src/lib/evas/Evas_Legacy.h src/lib/evas/canvas/efl_vg_base.eo src/lib/evas/canvas/efl_vg_container.eo src/lib/evas/canvas/efl_vg_gradient.eo src/lib/evas/canvas/efl_vg_gradient_linear.eo src/lib/evas/canvas/efl_vg_gradient_radial.eo src/lib/evas/canvas/efl_vg_shape.eo src/lib/evas/canvas/evas_callbacks.c src/lib/evas/canvas/evas_image.eo src/lib/evas/canvas/evas_object.eo src/lib/evas/canvas/evas_object_image.c src/lib/evas/canvas/evas_object_main.c src/lib/evas/canvas/evas_object_vg.c src/lib/evas/canvas/evas_render.c src/lib/evas/canvas/evas_text.eo src/lib/evas/canvas/evas_vg.eo src/lib/evas/canvas/evas_vg_container.c src/lib/evas/canvas/evas_vg_gradient.c src/lib/evas/canvas/evas_vg_gradient_linear.c src/lib/evas/canvas/evas_vg_gradient_radial.c src/lib/evas/canvas/evas_vg_node.c src/lib/evas/canvas/evas_vg_private.h src/lib/evas/canvas/evas_vg_root_node.c src/lib/evas/canvas/evas_vg_shape.c src/lib/evas/common/evas_font_draw.c src/lib/evas/common/evas_font_load.c src/lib/evas/common/evas_scale_sample.c src/lib/evas/include/evas_private.h src/modules/ecore_buffer/x11_dri2/ecore_buffer_x11_dri2.c src/modules/ecore_buffer/x11_dri3/ecore_buffer_x11_dri3.c src/modules/ecore_evas/engines/drm/ecore_evas_drm.c src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h src/modules/ecore_imf/wayland/wayland_imcontext.c src/modules/ecore_imf/wayland/wayland_imcontext.h src/modules/ecore_imf/wayland/wayland_module.c src/modules/evas/engines/drm/evas_bufmgr.c src/modules/evas/engines/drm/evas_drm.c src/modules/evas/engines/drm/evas_engine.h src/modules/evas/engines/gl_common/evas_gl_api.c src/modules/evas/engines/gl_common/evas_gl_api_ext.c src/modules/evas/engines/gl_common/evas_gl_api_ext.h src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h src/modules/evas/engines/gl_common/evas_gl_api_gles1.c src/modules/evas/engines/gl_common/evas_gl_common.h src/modules/evas/engines/gl_common/evas_gl_context.c src/modules/evas/engines/gl_common/evas_gl_core.c src/modules/evas/engines/gl_common/evas_gl_core.h src/modules/evas/engines/gl_common/evas_gl_core_private.h src/modules/evas/engines/gl_common/evas_gl_texture.c src/modules/evas/engines/gl_drm/evas_drm.c src/modules/evas/engines/gl_drm/evas_drm_main.c src/modules/evas/engines/gl_drm/evas_engine.c src/modules/evas/engines/gl_drm/evas_engine.h src/modules/evas/engines/gl_generic/ector_cairo_software_surface.eo src/modules/evas/engines/gl_generic/evas_engine.c src/modules/evas/engines/gl_sdl/evas_engine.c src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h src/modules/evas/engines/gl_x11/evas_engine.c src/modules/evas/engines/gl_x11/evas_x_main.c src/modules/evas/engines/software_generic/ector_cairo_software_surface.eo src/modules/evas/engines/software_generic/evas_engine.c src/modules/evas/engines/software_x11/evas_xlib_swapper.c src/modules/evas/engines/wayland_egl/evas_engine.c src/modules/evas/engines/wayland_egl/evas_engine.h src/modules/evas/engines/wayland_shm/evas_engine.c src/modules/evas/engines/wayland_shm/evas_engine.h src/modules/evas/engines/wayland_shm/evas_outbuf.c src/modules/evas/engines/wayland_shm/evas_shm.c src/tests/evas/evas_test_filters.c Change-Id: I5fc126ca1611586f9c386265d2dae47eea5679ef --- e098736effd136c6f1026566c527fe0656a13597 diff --cc Makefile.am index f052cfd,56c298c..614ea61 --- a/Makefile.am +++ b/Makefile.am @@@ -141,7 -141,7 +141,8 @@@ pc/ecore-imf.pc pc/ecore-imf-evas.pc \ pc/ecore-evas.pc \ pc/ecore-avahi.pc \ +pc/ecore-buffer.pc \ + pc/ector.pc \ pc/embryo.pc \ pc/eio.pc \ pc/eldbus.pc \ diff --cc configure.ac index 0f49826,c6e49bc..dadb5fc --- a/configure.ac +++ b/configure.ac @@@ -1305,7 -1383,7 +1384,7 @@@ AC_ARG_ENABLE([wayland] [want_wayland="no"]) if test "${want_wayland}" = "yes"; then - EFL_PKG_CHECK_STRICT([wayland-client >= 1.3.0]) - EFL_PKG_CHECK_STRICT([wayland-client >= 1.8.0]) ++ EFL_PKG_CHECK_STRICT([wayland-client >= 1.7.0]) fi # Wayland IVI-Shell @@@ -4514,7 -4583,7 +4584,7 @@@ EFL_LIB_END([Elocation] ### Add Wayland server library if test is enabled if test "x${want_tests}" = "xyes" -a "x${want_wayland}" = "xyes"; then - EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.3.0]) - EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.8.0]) ++ EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.7.0]) EFL_EVAL_PKGS([ECORE_WAYLAND_SRV]) fi @@@ -4550,64 -4618,52 +4620,62 @@@ build_ecore_buffer_tbm="no EFL_LIB_START_OPTIONAL([Ecore_Buffer], [test "${want_ecore_buffer}" = "yes"]) ### Checks for libraries EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eina]) - EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore]) EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eo]) + EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore]) EFL_DEPEND_PKG([ECORE_BUFFER], [WAYLAND], - [wayland-client >= 1.5.0]) - EFL_EVAL_PKGS([ECORE_BUFFER]) + [wayland-server >= 1.5.0 wayland-client >= 1.5.0]) - tbm_version="1.1.0" - PKG_CHECK_MODULES([TBM], [libtbm >= ${tbm_version}], -PKG_CHECK_MODULES([X11_DRI_COMMON], - [ - libtbm >= 1.1.0, - libdrm >= 2.4.35, - ], - [have_x11_dri_common_pkgs="yes"], - [have_x11_dri_common_pkgs="no"] -) ++PKG_CHECK_MODULES([TBM], [libtbm >= "1.1.0"], + [have_tbm="yes"], + [have_tbm="no"]) -if test "x$have_x11_dri_common_pkgs" = "xyes" ; then - EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore_x]) +if test "x${have_tbm}" = "xyes" ; then + build_ecore_buffer_tbm="yes" + AC_DEFINE(BUILD_ECORE_BUFFER_TBM, 1, [Support for TBM Backend in Ecore_Buffer]) +fi +EFL_ADD_FEATURE([ECORE_BUFFER], [tbm], [${build_ecore_buffer_tbm}]) - PKG_CHECK_MODULES([X11_DRI2], [libdri2], - [have_x11_dri2_pkgs="yes"], - [have_x11_dri2_pkgs="no"]) - PKG_CHECK_MODULES([X11_DRI3], +if test "x$want_x11_any" = "xyes" ; then + drm_version="2.4.35" + PKG_CHECK_MODULES([X11_DRI_COMMON], [ - xshmfence, - xcb, - x11-xcb, - xcb-sync, - xcb-dri3 + libtbm >= ${tbm_version}, + libdrm >= ${drm_version} + ecore-x ], - [have_x11_dri3_pkgs="yes"], - [have_x11_dri3_pkgs="no"]) -fi + [have_x11_dri_common_pkgs="yes"], + [have_x11_dri_common_pkgs="no"] + ) -if test "x${have_x11_dri2_pkgs}" = "xyes" ; then - build_ecore_buffer_x11_dri2="yes" - AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI2, 1, [Support for X11_DRI2 Backend in Ecore_Buffer]) -fi + if test "x$have_x11_dri_common_pkgs" = "xyes" ; then + PKG_CHECK_MODULES([X11_DRI2], [libdri2], + [have_x11_dri2_pkgs="yes"], + [have_x11_dri2_pkgs="no"]) -if test "x${have_x11_dri3_pkgs}" = "xyes" ; then - build_ecore_buffer_x11_dri3="yes" - AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI3, 1, [Support for X11_DRI3 Backend in Ecore_Buffer]) -fi -EFL_EVAL_PKGS([ECORE_BUFFER]) + PKG_CHECK_MODULES([X11_DRI3], + [ + xshmfence, + xcb, + x11-xcb, + xcb-sync, + xcb-dri3 + ], + [have_x11_dri3_pkgs="yes"], + [have_x11_dri3_pkgs="no"]) + fi -EFL_ADD_FEATURE([ECORE_BUFFER], [shm], ["yes"]) -EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri2], [${build_ecore_buffer_x11_dri2}]) -EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri3], [${build_ecore_buffer_x11_dri3}]) + if test "x${have_x11_dri2_pkgs}" = "xyes" ; then + build_ecore_buffer_x11_dri2="yes" + AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI2, 1, [Support for X11_DRI2 Backend in Ecore_Buffer]) + fi + EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri2], [${build_ecore_buffer_x11_dri2}]) + + if test "x${have_x11_dri3_pkgs}" = "xyes" ; then + build_ecore_buffer_x11_dri3="yes" + AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI3, 1, [Support for X11_DRI3 Backend in Ecore_Buffer]) + fi + EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri3], [${build_ecore_buffer_x11_dri3}]) +fi EFL_LIB_END_OPTIONAL([Ecore_Buffer]) @@@ -4617,8 -4672,6 +4685,7 @@@ AM_CONDITIONAL([BUILD_ECORE_BUFFER_TBM] #### End of Ecore_Buffer - +#### src/examples/ephysics/Makefile AC_CONFIG_FILES([ Makefile data/Makefile diff --cc packaging/efl.spec index 4a3e0d7,0000000..2433a5d mode 100644,000000..100644 --- a/packaging/efl.spec +++ b/packaging/efl.spec @@@ -1,1163 -1,0 +1,1217 @@@ +%bcond_with wayland +%bcond_with x + +Name: efl +Version: 1.13.1 +Release: 0 +License: LGPL-2.1 +Summary: Enlightenment Foundation Libraries - set of libraries used (not only) by e +Url: http://enlightenment.org/ +Group: Graphics & UI Framework/API +Source: %{name}-%{version}.tar.bz2 +Source100: efl.conf +Source1001: efl.manifest + +BuildRequires: pkgconfig(check) +BuildRequires: pkgconfig(libinput) +BuildRequires: zlib-devel +BuildRequires: gettext-tools + +%if %{with wayland} +BuildRequires: pkgconfig(gles20) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-cursor) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(text-client) +BuildRequires: pkgconfig(xdg-shell-client) +BuildRequires: pkgconfig(tizen-extension-client) +Requires: libwayland-extension-client +%endif + +%if %{with x} +BuildRequires: pkgconfig(glesv2) +BuildRequires: pkgconfig(libdri2) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xcursor) +BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xpm) +BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xcomposite) +BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(xscrnsaver) +BuildRequires: libXtst-devel +BuildRequires: pkgconfig(xi) +BuildRequires: pkgconfig(ice) +BuildRequires: pkgconfig(sm) +BuildRequires: pkgconfig(ibus-1.0) +%endif + +BuildRequires: glib2-devel +BuildRequires: pkgconfig(bullet) +BuildRequires: pkgconfig(openssl) +BuildRequires: gnutls-devel +BuildRequires: curl-devel +BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: systemd-devel + +#eldbus +BuildRequires: dbus-devel + +#edje +BuildRequires: pkgconfig(lua) +BuildRequires: pkgconfig(sndfile) +BuildRequires: pkgconfig(libpulse) + +#emotion +BuildRequires: pkgconfig(gstreamer-1.0) +BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) + +#evas +BuildRequires: libexif-devel +BuildRequires: giflib-devel +BuildRequires: libtiff-devel +BuildRequires: pkgconfig(libpng) +BuildRequires: libjpeg-turbo-devel +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(fribidi) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(libtbm) + +#eeze +BuildRequires: libudev-devel +BuildRequires: libmount-devel +BuildRequires: pkgconfig(dlog) + +#ecore_buffer +%if %{with x} +BuildRequires: pkgconfig(libdri2) +BuildRequires: pkgconfig(xshmfence) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-sync) +BuildRequires: pkgconfig(xcb-dri3) +%endif +BuildRequires: pkgconfig(libtbm) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-server) + +############ efl +Provides: efl-data +Obsoletes: efl-data + + +%description +EFL is a library collection providing various functionality used (not only) by +Enlightenment, Terminology, Tizen and more. + +############ efl-data + +%package devel +Summary: Developer files for EFL package + +%description devel +This package includes developer files common to all packages. + +############ Eina +%package -n eina +Summary: Data type library +Requires: %{name}-data = %{version}-%{release} + +%description -n eina +Eina is a data type library. + ++%package -n eina-tools ++Summary: Eina Tools ++Group: Graphics & UI Framework/Utilities ++Requires: eina = %{version}-%{release} ++Provides: eina-bin ++ ++%description -n eina-tools ++The eina tools package the eina binary utility. ++ +#%package -n eina-examples +#Summary: Examples for the eina package +#Group: Graphics & UI Framework/Testing +#Requires: eina = %{version}-%{release} + +#%description -n eina-examples +#Example files for eina + +%package -n eina-devel +Summary: Development components for the eina package +Group: Graphics & UI Framework/Development +Requires: eina = %{version}-%{release} + +%description -n eina-devel +Development files for eina. + ++############ Emile ++%package -n emile ++Summary: EFL serialization, compression and crypto library ++Requires: %{name}-data = %{version}-%{release} ++ ++%description -n emile ++EFL serialization, compression and crypto library ++ ++%package -n emile-devel ++Summary: Development components for the emile package ++Group: Graphics & UI Framework/Development ++Requires: emile = %{version}-%{release} ++ ++%description -n emile-devel ++Development files for emile. ++ +############ Eet +%package -n eet +Summary: Library for speedy data storage, retrieval, and compression +Requires: %{name}-data = %{version}-%{release} + +%description -n eet +Eet is a tiny library designed to write an arbitrary set of chunks of +data to a file and optionally compress each chunk (very much like a +zip file) and allow fast random-access reading of the file later +on. It does not do zip as a zip itself has more complexity than is +needed, and it was much simpler to implement this once here. + +It also can encode and decode data structures in memory, as well as +image data for saving to eet files or sending across the network to +other machines, or just writing to arbitrary files on the system. All +data is encoded in a platform independent way and can be written and +read by any architecture. + +%package -n eet-tools +Summary: Eet Tools +Group: Graphics & UI Framework/Utilities +Requires: eet = %{version}-%{release} +Provides: eet-bin + +%description -n eet-tools +The eet tools package the eet binary utility. + +#%package -n eet-examples +#Summary: Examples for the eet package +#Group: Graphics & UI Framework/Testing +#Requires: eet = %{version}-%{release} + +#%description -n eet-examples +#Example files for eet + +%package -n eet-devel +Summary: Development components for the eet package +Group: Graphics & UI Framework/Development +Requires: eet = %{version}-%{release} + +%description -n eet-devel +Development files for eet + +############ Eo +%package -n eo +Summary: EFL generic object system library +Requires: %{name}-data = %{version}-%{release} + +%description -n eo +The Eo generic object system. It was designed to be the base object +system for the EFL. + +#%package -n eo-examples +#Summary: Examples for the eo package +#Group: Graphics & UI Framework/Testing +#Requires: eo = %{version}-%{release} + +#%description -n eo-examples +#Example files for eo + +%package -n eo-devel +Summary: Development components for the eo package +Group: Graphics & UI Framework/Development +Requires: eo = %{version}-%{release} + +%description -n eo-devel +Development files for eo + +############ Ector +%package -n ector +Summary: vector graphics library +Requires: %{name}-data = %{version}-%{release} + +%description -n ector +vector graphics library. + +%package -n ector-devel +Summary: Development components for the ector package +Group: Graphics & UI Framework/Development +Requires: ector = %{version}-%{release} + +%description -n ector-devel +Development files for ector + +############ Evas +%package -n evas +Summary: Multi-platform canvas library +Requires: %{name}-data = %{version}-%{release} + +%description -n evas +Evas is a clean display canvas API for several target display systems +that can draw anti-aliased text, smooth super and sub-sampled scaled +images, alpha-blend objects much and more. + +#%package -n evas-examples +#Summary: Examples for the evas package +#Group: Graphics & UI Framework/Testing +#Requires: evas = %{version}-%{release} + +#%description -n evas-examples +#Example files for evas + +%package -n evas-devel +Summary: Development components for the evas package +Group: Graphics & UI Framework/Development +Requires: evas = %{version}-%{release} + +%description -n evas-devel +Development files for evas + +############ Ecore +%package -n ecore +Summary: Enlightened Core X interface library +Requires: %{name}-data = %{version}-%{release} + +%description -n ecore +Ecore is the event/X abstraction layer that makes doing selections, +Xdnd, general X stuff, event loops, timeouts and idle handlers fast, +optimized, and convenient. + +#%package -n ecore-examples +#Summary: Examples for the ecore package +#Group: Graphics & UI Framework/Testing +#Requires: ecore = %{version}-%{release} + +#%description -n ecore-examples +#Example files for ecore + +%package -n ecore-devel +Summary: Development components for the ecore package +Group: Graphics & UI Framework/Development +Requires: ecore = %{version}-%{release} + +%description -n ecore-devel +Development files for ecore + +############ Eldbus +%package -n eldbus +Summary: D-Bus bindings for EFL +Requires: %{name}-data = %{version}-%{release} + +%description -n eldbus +Eldbus allows connecting to both system and session buses acting as +both client and service roles. + +This is a replacement for old library "edbus". Its main purpose is to +fix some core bugs and completely encapsulating D-Bus without exposing +libdbus to end-user. One day libdbus may be completely removed as a +dependency. + +#%package -n eldbus-examples +#Summary: Examples for the eldbus package +#Group: Graphics & UI Framework/Testing +#Requires: eldbus = %{version}-%{release} + +#%description -n eldbus-examples +#Example files for eldbus + +%package -n eldbus-devel +Summary: Development components for the eldbus package +Group: Graphics & UI Framework/Development +Requires: eldbus = %{version}-%{release} + +%description -n eldbus-devel +Development files for eldbus + +############ Embryo +%package -n embryo +Summary: A small virtual machine engine (in a library) and bytecode compiler +Requires: %{name}-data = %{version}-%{release} +Provides: embryo-bin + +%description -n embryo +Embryo is a tiny library designed as a virtual machine to interpret a +limited set of small compiled programs. + +%package -n embryo-devel +Summary: Development components for the embryo package +Group: Graphics & UI Framework/Development +Requires: embryo = %{version}-%{release} + +%description -n embryo-devel +Development files for embryo + +############ Eio +%package -n eio +Summary: Enlightenment Input/Output Library +Requires: %{name}-data = %{version}-%{release} + +%description -n eio +Enlightenment Input/Output Library + +#%package -n eio-examples +#Summary: Examples for the eio package +#Group: Graphics & UI Framework/Testing +#Requires: eio = %{version}-%{release} + +#%description -n eio-examples +#Example files for eio + +%package -n eio-devel +Summary: Development components for the eio package +Group: Graphics & UI Framework/Development +Requires: eio = %{version}-%{release} + +%description -n eio-devel +Development files for eio + +############ Ephysics +%package -n ephysics +Summary: EFL wrapper for the Bullet Physics library + +%description -n ephysics +EPhysics is a library that makes it easy to use Ecore, Evas and Bullet +Physics together. It's a kind of wrapper, a glue, between these libraries. +It's not intended to be a physics library (we already have many out there). + +Enlightenment Input/Output Library + +#%package -n ephysics-examples +#Summary: Examples for the ephysics package +#Group: Graphics & UI Framework/Testing +#Requires: ephysics = %{version}-%{release} + +#%description -n ephysics-examples +#Example files for ephysics + +%package -n ephysics-devel +Summary: Development components for the ephysics package +Group: Graphics & UI Framework/Development +Requires: ephysics = %{version}-%{release} + +%description -n ephysics-devel +Development files for ephysics + +############ Edje +%package -n edje +Summary: Complex Graphical Design/Layout Engine +Requires: %{name}-data = %{version}-%{release} + +%description -n edje +Edje is a complex graphical design and layout engine. It provides a +mechanism for allowing configuration data to define visual elements in +terms of layout, behavior, and appearance. Edje allows for multiple +collections of layouts in one file, allowing a complete set of images, +animations, and controls to exist as a unified whole. + +Edje separates the arrangement, appearance, and behavior logic into +distinct independent entities. This allows visual objects to share +image data and configuration information without requiring them to do +so. This separation and simplistic event driven style of programming +can produce almost any look and feel one could want for basic visual +elements. Anything more complex is likely the domain of an application +or widget set that may use Edje as a conveneient way of being able to +configure parts of the display. + +%package -n edje-tools +Summary: Edje tools +Group: Graphics & UI Framework/Utilities +Requires: edje = %{version}-%{release} +Provides: edje-bin + +%description -n edje-tools +The edje tools package include the compiler, decompiler, visualizer, code +generator and more. + +#%package -n edje-examples +#Summary: Examples for the edje package +#Group: Graphics & UI Framework/Testing +#Requires: edje = %{version}-%{release} + +#%description -n edje-examples +#Example files for edje + +%package -n edje-devel +Summary: Development components for the edje package +Group: Graphics & UI Framework/Development +Requires: edje-tools = %{version}-%{release} + +%description -n edje-devel +Development files for edje + +############ Eeze +%package -n eeze +Summary: Device convenience library +Requires: %{name}-data = %{version}-%{release} + +%description -n eeze +Eeze is a library for manipulating devices through udev with a simple +and fast api. It interfaces directly with libudev, avoiding such +middleman daemons as udisks/upower or hal, to immediately gather +device information the instant it becomes known to the system. This +can be used to determine such things as: + * If a cdrom has a disk inserted + * The temperature of a cpu core + * The remaining power left in a battery + * The current power consumption of various parts + * Monitor in realtime the status of peripheral devices + +Each of the above examples can be performed by using only a single +eeze function, as one of the primary focuses of the library is to +reduce the complexity of managing devices. + +%package -n eeze-devel +Summary: Development components for the eeze package +Group: Graphics & UI Framework/Development +Requires: eeze = %{version}-%{release} + +%description -n eeze-devel +Development files for eeze + +############ Efreet +%package -n efreet +Summary: FreeDesktop.Org standards implementation +Requires: %{name}-data = %{version}-%{release} + +%description -n efreet +Efreet implements the FreeDesktop.Org application and MIME-handling +standards. + +%package -n efreet-devel +Summary: Development components for the efreet package +Group: Graphics & UI Framework/Development +Requires: efreet = %{version}-%{release} + +%description -n efreet-devel +Development files for efreet + +############ Emotion +%package -n emotion +Summary: EFL Media Library +Requires: %{name}-data = %{version}-%{release} + +%description -n emotion +Emotion is a media library with support for different backends as plug-ins. + +#%package -n emotion-examples +#Summary: Examples for the emotion package +#Group: Graphics & UI Framework/Testing +#Requires: emotion = %{version}-%{release} + +#%description -n emotion-examples +#Example files for emotion + +%package -n emotion-devel +Summary: Development components for the emotion package +Group: Graphics & UI Framework/Development +Requires: emotion = %{version}-%{release} + +%description -n emotion-devel +Development files for emotion + +############ Ethumb +%package -n ethumb +Summary: EFL thumbnail generator library +Requires: %{name}-data = %{version}-%{release} + +%description -n ethumb +Enlightenment thumbnailing library + +#%package -n ethumb-examples +#Summary: Examples for the ethumb package +#Group: Graphics & UI Framework/Testing +#Requires: ethumb = %{version}-%{release} + +#%description -n ethumb-examples +#Example files for ethumb + +%package -n ethumb-devel +Summary: Development components for the ethumb package +Group: Graphics & UI Framework/Development +Requires: ethumb = %{version}-%{release} + +%description -n ethumb-devel +Development files for emotion + +############ Eolian +%package -n eolian +Summary: EO object parser and C code generator +Group: Graphics & UI Framework/Development +Requires: %{name}-data = %{version}-%{release} + +%description -n eolian +Tool that parses Enlightenment's meta-data (.eo) filesg +and can then generate C code along with header files. + +%package -n eolian-devel +Summary: Development components for the eolian package +Group: Graphics & UI Framework/Development +Requires: eolian = %{version}-%{release} + +%description -n eolian-devel +Development files for eolian + +#%package -n eolian-examples +#Summary: Examples for the eolian package +#Group: Graphics & UI Framework/Testing +#Requires: eolian = %{version}-%{release} + +#%description -n eolian-examples +#Example files for eolian + +############ Elocation +%package -n elocation +Summary: EFL location library +Requires: %{name}-data = %{version}-%{release} + +%description -n elocation +Elocation is meant as a convenience library to ease application developers +the usage of geo information in their apps. Adding a geo tag to a picture or +translating an address to a GPS position and show it on a map widget are just +some of the use cases. + +#%package -n elocation-examples +#Summary: Examples for the elocation package +#Group: Graphics & UI Framework/Testing +#Requires: elocation = %{version}-%{release} +# +#%description -n elocation-examples +#Example files for elocation + +%package -n elocation-devel +Summary: Development components for the elocation package +Group: Graphics & UI Framework/Development +Requires: elocation = %{version}-%{release} + +%description -n elocation-devel +Development files for elocation + +############ Elua +%package -n elua +Summary: EFL lua binding library +Requires: %{name}-data = %{version}-%{release} + +%description -n elua +The Elua library was created to ease integration of EFL Lua into other EFL +libraries or applications. Using the Elua library you can easily create a +Lua state that is fully set up for running EFL Lua bindings. + +%package -n elua-devel +Summary: Development components for the elua package +Group: Graphics & UI Framework/Development +Requires: elua = %{version}-%{release} + +%description -n elua-devel +Development files for elua + + +%prep +%setup -q +cp %{SOURCE1001} . + + +%build + +%if ! %{with x} +CFLAGS+=" -DMESA_EGL_NO_X11_HEADERS " +%endif + +%reconfigure \ + --with-glib=always \ + --disable-xim \ + --disable-scim \ + --disable-gesture \ + --with-tests=regular \ + --enable-fb \ + --disable-tslib \ +%if %{with wayland} + --enable-wayland \ + --enable-drm \ + --enable-gl-drm \ + --enable-egl \ + --with-opengl=es \ + --enable-tile-rotate \ + --disable-rpath \ + --disable-ibus \ +%endif +%if %{with x} + --with-opengl=es \ + --disable-gesture \ +%else + --with-x11=none \ + --enable-tile-rotate \ + --disable-rpath \ +%endif + --disable-cxx-bindings \ + --enable-systemd \ + --enable-lua-old \ + --enable-ecore-buffer \ + --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba + + +%__make %{?_smp_mflags} + + +%install +%make_install +#make datadir=%{buildroot}%{_datadir} install-examples +rm -rf %{buildroot}%{_libdir}/ecore/system/upower + +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/efl.conf + +%post -n eina -p /sbin/ldconfig +%postun -n eina -p /sbin/ldconfig + ++%post -n emile -p /sbin/ldconfig ++%postun -n emile -p /sbin/ldconfig ++ +%post -n eet -p /sbin/ldconfig +%postun -n eet -p /sbin/ldconfig + +%post -n eo -p /sbin/ldconfig +%postun -n eo -p /sbin/ldconfig + +%post -n ector -p /sbin/ldconfig +%postun -n ector -p /sbin/ldconfig + +%post -n evas -p /sbin/ldconfig +%postun -n evas -p /sbin/ldconfig + +%post -n ecore +/sbin/ldconfig + +%if %{with wayland} +f="/etc/profile.d/ecore.sh" +grep --silent EFL_WAYLAND_USE_XDG_SHELL "$f" \ + || printf "\nEFL_WAYLAND_USE_XDG_SHELL='defined'\nexport EFL_WAYLAND_USE_XDG_SHELL\n" >> "$f" + +grep --silent ECORE_EVAS_ENGINE "$f" \ + || printf "\nECORE_EVAS_ENGINE=wayland_shm\n[ ! -d /dev/dri ] || ECORE_EVAS_ENGINE=wayland_egl\nexport ECORE_EVAS_ENGINE" >> "$f" + +grep --silent ECORE_IMF_MODULE "$f" \ + || printf "\nECORE_IMF_MODULE=wayland\nexport ECORE_IMF_MODULE\n" >> "$f" + +%endif + +%postun -n ecore -p /sbin/ldconfig + +%post -n eldbus -p /sbin/ldconfig +%postun -n eldbus -p /sbin/ldconfig + +%post -n embryo -p /sbin/ldconfig +%postun -n embryo -p /sbin/ldconfig + +%post -n eio -p /sbin/ldconfig +%postun -n eio -p /sbin/ldconfig + +%post -n edje -p /sbin/ldconfig +%postun -n edje -p /sbin/ldconfig + +%post -n eeze -p /sbin/ldconfig +%postun -n eeze -p /sbin/ldconfig + +%post -n efreet -p /sbin/ldconfig +%postun -n efreet -p /sbin/ldconfig + +%post -n emotion -p /sbin/ldconfig +%postun -n emotion -p /sbin/ldconfig + +%post -n ethumb -p /sbin/ldconfig +%postun -n ethumb -p /sbin/ldconfig + +%post -n ephysics -p /sbin/ldconfig +%postun -n ephysics -p /sbin/ldconfig + +%post -n eolian -p /sbin/ldconfig +%postun -n eolian -p /sbin/ldconfig + +%post -n elocation -p /sbin/ldconfig +%postun -n elocation -p /sbin/ldconfig + + +%files -n %{name} +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_datadir}/locale/*/*/*.mo +%{_libdir}/libefl.so.* ++%{_bindir}/efl_debug* + +%files -n %{name}-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/efl-1/Efl*.h +%{_includedir}/efl-1/interfaces/efl*.h +#%{_includedir}/efl-cxx-1/*.hh +%{_libdir}/cmake/Efl*/*.cmake +%{_libdir}/libefl.so +%{_libdir}/pkgconfig/efl*.pc + +%files -n eina +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libeina.so.* +%{_bindir}/eina-bench-cmp + ++%files -n eina-tools ++%manifest %{name}.manifest ++%{_bindir}/eina_btlog ++ +#%files -n eina-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/eina*/examples/* +#%{_libdir}/eina/examples/* + +%files -n eina-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/eina-*1/*.h* +%{_includedir}/eina-*1/eina*/* +%{_libdir}/libeina.so +%{_libdir}/pkgconfig/eina*.pc +%{_libdir}/cmake/Eina*/*.cmake + ++%files -n emile ++%manifest %{name}.manifest ++%defattr(-,root,root,-) ++%license COPYING ++%{_libdir}/libemile.so.* ++ ++%files -n emile-devel ++%manifest %{name}.manifest ++%defattr(-,root,root,-) ++%{_includedir}/emile-*1/*.h* ++%{_libdir}/libemile.so ++%{_libdir}/pkgconfig/emile*.pc ++%{_libdir}/cmake/Emile*/*.cmake ++ +%files -n eet +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libeet*.so.* + +%files -n eet-tools +%manifest %{name}.manifest +%{_bindir}/eet +%{_bindir}/vieet +%{_bindir}/diffeet ++%{_bindir}/eetpack + +#%files -n eet-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/eet/examples/* +#%{_libdir}/eet/examples/* + +%files -n eet-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/eet-*1/*.h* +#%{_includedir}/eet-*1/*/*.h* +%{_libdir}/libeet.so +%{_libdir}/pkgconfig/eet*.pc +%{_libdir}/cmake/Eet*/*.cmake + +%files -n eo +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libeo.so.* + +#%files -n eo-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/eo/examples/* +#%{_libdir}/eo/examples/* + +%files -n eo-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/eo-*1/*.h* +%{_libdir}/libeo.so +%{_libdir}/pkgconfig/eo*.pc +%{_datadir}/eo/gdb/eo_gdb.py +%{_datadir}/gdb/auto-load/usr/lib*/* +%{_libdir}/cmake/Eo/*.cmake +%{_libdir}/cmake/EoCxx/*.cmake ++/usr/share/eolian/include/eo-*1/*.eot + +%files -n ector +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libector.so.* + +%files -n ector-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/ector-*1/*.h* ++%{_includedir}/ector-*1/*/*.h* +%{_libdir}/libector.so +%{_libdir}/pkgconfig/ector*.pc + +%files -n evas +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_bindir}/ecore_evas_* +%{_bindir}/evas_cserve2_client +%{_bindir}/evas_cserve2_debug +%{_bindir}/evas_cserve2_shm_debug +%{_bindir}/evas_cserve2_usage +%{_libdir}/evas/modules/*/*/*/module.so +%{_libdir}/libevas.so.* +%{_libdir}/evas/cserve2 +%{_datadir}/evas/checkme + +#%files -n evas-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/evas/examples/* +#%{_libdir}/evas/examples/* + +%files -n evas-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/evas-*1/*.h* +%{_includedir}/evas-*1/*/*.h* +%{_libdir}/libevas.so +%{_libdir}/pkgconfig/evas*.pc +%{_libdir}/cmake/Evas*/*.cmake ++/usr/share/eolian/include/evas-*1/*.eot ++/usr/share/evas/filters/lua/*.lua + +%files -n ecore +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libecore.so.* +%{_libdir}/libecore_audio.so.* +%{_libdir}/libecore_avahi.so.* +%{_libdir}/libecore_con.so.* +%{_libdir}/libecore_evas.so.* +%{_libdir}/libecore_file.so.* +%{_libdir}/libecore_imf.so.* +%{_libdir}/libecore_imf_evas.so.* +%{_libdir}/libecore_input.so.* +%{_libdir}/libecore_input_evas.so.* +%{_libdir}/libecore_ipc.so.* +%{_libdir}/libecore_fb.so.* +%{_libdir}/libecore_buffer.so.* +%if %{with wayland} +%{_libdir}/libecore_wayland.so.* +%{_libdir}/libecore_drm.so.* +%endif +%if %{with x} +%{_libdir}/libecore_x.so.* +%{_libdir}/ecore_x/*/*/* +%endif +%{_libdir}/ecore_evas/engines/*/*/module.so +%{_libdir}/ecore_imf/modules/*/*/module.so +%{_libdir}/ecore/system/systemd/v-*/module.so +%{_libdir}/ecore_buffer/modules/*/*/module.so +%{_datadir}/ecore/checkme +%{_datadir}/ecore_*/checkme +%{_tmpfilesdir}/efl.conf + +#%files -n ecore-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/ecore*/examples/* +#%{_libdir}/ecore*/examples/* + + +%files -n ecore-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/ecore*/*.h +#%{_includedir}/ecore*cxx*/*.hh +%{_libdir}/libecore.so +%{_libdir}/libecore_audio.so +%{_libdir}/libecore_avahi.so +%{_libdir}/libecore_con.so +%{_libdir}/libecore_evas.so +%{_libdir}/libecore_file.so +%{_libdir}/libecore_imf.so +%{_libdir}/libecore_imf_evas.so +%{_libdir}/libecore_input.so +%{_libdir}/libecore_input_evas.so +%{_libdir}/libecore_ipc.so +%{_libdir}/libecore_fb.so +%{_libdir}/libecore_buffer.so +%if %{with wayland} +%{_libdir}/libecore_wayland.so +%{_libdir}/libecore_drm.so +%endif +%if %{with x} +%{_libdir}/libecore_x.so +%endif +%{_libdir}/pkgconfig/ecore*.pc +%{_libdir}/cmake/Ecore*/*.cmake + +%files -n eldbus +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libeldbus.so.* +%{_bindir}/eldbus* +%license COPYING + +#%files -n eldbus-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/eldbus/examples/* +#%{_libdir}/eldbus/examples/* + +%files -n eldbus-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libeldbus.so +%{_libdir}/pkgconfig/eldbus*.pc +%{_includedir}/eldbus*/* +%{_libdir}/cmake/Eldbus/*.cmake + +%files -n embryo +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_bindir}/embryo_cc +%{_libdir}/libembryo.so.* +%{_datadir}/embryo/include/default.inc + +%files -n embryo-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/embryo-1/*.h +%{_libdir}/libembryo.so +%{_libdir}/pkgconfig/embryo*.pc + +%files -n eio +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libeio.so.* + +#%files -n eio-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/eio/examples/* +#%{_libdir}/eio/examples/* + +%files -n eio-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/eio-1/* +%{_libdir}/libeio.so +%{_libdir}/pkgconfig/eio*.pc ++%{_libdir}/cmake/Eio*/*.cmake + +%files -n edje +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libedje.so.* +%{_libdir}/edje/utils/*/* +%{_datadir}/edje/include/edje.inc +%{_datadir}/mime/packages/edje.xml + +%files -n edje-tools +%manifest %{name}.manifest +%{_bindir}/edje* +%{_datadir}/edje/data/* + +#%files -n edje-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/edje/examples/* +#%{_libdir}/edje/examples/* + +%files -n edje-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/edje*-1/*.h* +%{_libdir}/libedje.so +%{_libdir}/pkgconfig/edje*.pc +%{_libdir}/cmake/Edje/*.cmake ++/usr/share/eolian/include/edje-*1/*.eot + +%files -n eeze +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libeeze.so.* +%{_bindir}/eeze_disk_ls +%{_bindir}/eeze_mount +%{_bindir}/eeze_scanner +%{_bindir}/eeze_umount +%{_libdir}/eeze/modules/sensor/*/*/module.so +%{_datadir}/eeze/checkme + +%files -n eeze-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/eeze-1/*.h +%{_libdir}/libeeze.so +%{_libdir}/pkgconfig/eeze*.pc +%{_libdir}/cmake/Eeze/*.cmake + +%files -n efreet +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%exclude %{_datadir}/dbus-1/services/org.enlightenment.Efreet.service +%exclude %{_userunitdir}/efreet.service +%exclude %{_bindir}/efreetd +%exclude /usr/lib/debug/usr/bin/efreetd.debug +%exclude %{_libdir}/efreet/*/efreet_desktop_cache_create +%exclude %{_libdir}/efreet/*/efreet_icon_cache_create +%exclude /usr/lib/debug/%{_libdir}/efreet/*/efreet_desktop_cache_create.debug +%exclude /usr/lib/debug/%{_libdir}/efreet/*/efreet_icon_cache_create.debug +%exclude /usr/lib/debug/.build-id/*/* +%{_libdir}/libefreet.so.* +%{_libdir}/libefreet_mime.so.* +%{_libdir}/libefreet_trash.so.* +%{_datadir}/efreet/* + +%files -n efreet-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/efreet-1/*.h +%{_libdir}/libefreet.so +%{_libdir}/libefreet_mime.so +%{_libdir}/libefreet_trash.so +%{_libdir}/pkgconfig/efreet*.pc +%{_libdir}/cmake/Efreet/*.cmake + +%files -n emotion +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libemotion.so.* +%{_libdir}/edje/modules/emotion/*/module.so +%{_libdir}/emotion/modules/*/*/module.so +%{_datadir}/emotion/* - %{_bindir}/emotion_test ++%{_bindir}/emotion_test* + +#%files -n emotion-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/emotion/examples/* +#%{_libdir}/emotion/examples/* + +%files -n emotion-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/emotion-1/* +%{_libdir}/libemotion.so +%{_libdir}/pkgconfig/emotion*.pc +%{_libdir}/cmake/Emotion/*.cmake + +%files -n ethumb +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license COPYING +%{_libdir}/libethumb.so.* +%{_libdir}/libethumb_client.so.* +%exclude %{_datadir}/dbus-1/services/org.enlightenment.Ethumb.service +%exclude %{_userunitdir}/ethumb.service +%{_datadir}/ethumb/* +%{_datadir}/ethumb_client/* +#%{_datadir}/ethumb_client/*/* +%{_libdir}/ethumb/modules/*/*/module.so +%{_libdir}/ethumb/modules/*/*/template.edj +%exclude %{_libdir}/ethumb_client/utils/*/ethumbd_slave +%exclude /usr/lib/debug/%{_libdir}/ethumb_client/utils/*/ethumbd_slave.debug +%exclude %{_bindir}/ethumb +%exclude %{_bindir}/ethumbd +%exclude %{_bindir}/ethumbd_client +%exclude /usr/lib/debug/usr/bin/ethumb.debug +%exclude /usr/lib/debug/usr/bin/ethumbd.debug +%exclude /usr/lib/debug/usr/bin/ethumbd_client.debug +%exclude /usr/lib/debug/.build-id/*/* + +#%files -n ethumb-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/ethumb_client/examples/* +#%{_libdir}/ethumb_client/examples/* + +%files -n ethumb-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/ethumb-1/*.h +%{_includedir}/ethumb-client-1/*.h +%{_libdir}/libethumb.so +%{_libdir}/libethumb_client.so +%{_libdir}/pkgconfig/ethumb*.pc +%{_libdir}/cmake/Ethumb/*.cmake +%{_libdir}/cmake/EthumbClient/*.cmake + +%files -n ephysics +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libephysics.so.* + +%files -n ephysics-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libephysics.so +%{_libdir}/pkgconfig/ephysics.pc +%{_includedir}/ephysics-1/EPhysics.h + +#%files -n ephysics-examples +#%{_datadir}/ephysics/examples/* + + +%files -n eolian +%{_bindir}/eolian* +%{_libdir}/libeolian.so.* + +%files -n eolian-devel +%{_includedir}/eolian-*1/*.h* +#%{_includedir}/eolian-*1/*/*.h* +%{_datadir}/eolian/include/*/*.eo +%{_libdir}/libeolian.so* +%{_libdir}/cmake/Eolian*/*.cmake + +#%files -n eolian-examples +#%{_datadir}/eolian_*/examples/* + +%files -n elocation +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/libelocation.so.* + +#%files -n elocation-examples +#%manifest %{name}.manifest +#%defattr(-,root,root,-) +#%{_datadir}/elocation/examples/* + +%files -n elocation-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_includedir}/elocation-*1/*.h* +%{_libdir}/pkgconfig/elocation.pc +%{_libdir}/libelocation.so* + +%files -n elua +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_datadir}/elua/checkme + +%files -n elua-devel +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/cmake/Elua*/*.cmake + diff --cc src/Makefile_Ecore_Buffer.am index d2e95cd,c357c5c..f7d89ad --- a/src/Makefile_Ecore_Buffer.am +++ b/src/Makefile_Ecore_Buffer.am @@@ -28,7 -29,39 +29,8 @@@ lib_ecore_buffer_libecore_buffer_la_LIB lib_ecore_buffer_libecore_buffer_la_DEPENDENCIES = @ECORE_BUFFER_INTERNAL_LIBS@ lib_ecore_buffer_libecore_buffer_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ -### Binary -bqmgr_bindir=$(libdir)/ecore_buffer/bin/$(MODULE_ARCH) -bqmgr_bin_PROGRAMS = bin/ecore_buffer/bq_mgr - -bin_ecore_buffer_bq_mgr_SOURCES = \ -bin/ecore_buffer/bq_mgr_protocol.c \ -bin/ecore_buffer/bq_mgr.c - -bin_ecore_buffer_bq_mgr_CPPFLAGS = \ --I$(top_builddir)/src/lib/efl \ -@ECORE_BUFFER_CFLAGS@ -bin_ecore_buffer_bq_mgr_LDADD = @USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_BUFFER_LIBS@ -bin_ecore_buffer_bq_mgr_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@ @USE_ECORE_BUFFER_INTERNAL_LIBS@ - ### Backends + -ecorebuffershmdir = $(libdir)/ecore_buffer/modules/shm/$(MODULE_ARCH) -ecorebuffershm_LTLIBRARIES = modules/ecore_buffer/shm/module.la - -modules_ecore_buffer_shm_module_la_SOURCES = \ - modules/ecore_buffer/shm/ecore_buffer_shm.c -modules_ecore_buffer_shm_module_la_CPPFLAGS = \ - -I$(top_builddir)/src/lib/efl \ - @ECORE_BUFFER_CFLAGS@ \ - -I$(top_srcdir)/src/modules/ecore_buffer/shm -modules_ecore_buffer_shm_module_la_LIBADD = \ - @ECORE_BUFFER_LIBS@ \ - @USE_ECORE_BUFFER_INTERNAL_LIBS@ -modules_ecore_buffer_shm_module_la_DEPENDENCIES = \ - @USE_ECORE_BUFFER_INTERNAL_LIBS@ -modules_ecore_buffer_shm_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ -modules_ecore_buffer_shm_module_la_LIBTOOLFLAGS = --tag=disable-static - if BUILD_ECORE_BUFFER_X11_DRI2 ecorebufferx11dri2dir = $(libdir)/ecore_buffer/modules/x11_dri2/$(MODULE_ARCH) ecorebufferx11dri2_LTLIBRARIES = modules/ecore_buffer/x11_dri2/module.la diff --cc src/Makefile_Ecore_Evas.am index b488a1b,f8da5e18..5696fba --- a/src/Makefile_Ecore_Evas.am +++ b/src/Makefile_Ecore_Evas.am @@@ -228,14 -282,14 +282,21 @@@ endi bin_PROGRAMS += \ bin/ecore_evas/ecore_evas_convert \ - bin/ecore_evas/ecore_evas_svg ++bin/ecore_evas/ecore_evas_svg \ + bin/ecore_evas/eetpack bin_ecore_evas_ecore_evas_convert_SOURCES = bin/ecore_evas/ecore_evas_convert.c -bin_ecore_evas_ecore_evas_convert_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_EVAS_CFLAGS@ @EINA_CFLAGS@ @ECORE_CFLAGS@ @EVAS_CFLAGS@ -bin_ecore_evas_ecore_evas_convert_LDADD = @USE_ECORE_EVAS_LIBS@ @USE_EINA_LIBS@ @USE_ECORE_LIBS@ @USE_EVAS_LIBS@ -bin_ecore_evas_ecore_evas_convert_DEPENDENCIES = @USE_ECORE_EVAS_INTERNAL_LIBS@ @USE_EINA_INTERNAL_LIBS@ @USE_ECORE_INTERNAL_LIBS@ @USE_EVAS_INTERNAL_LIBS@ +bin_ecore_evas_ecore_evas_convert_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_EVAS_CFLAGS@ +bin_ecore_evas_ecore_evas_convert_LDADD = @USE_ECORE_EVAS_LIBS@ +bin_ecore_evas_ecore_evas_convert_DEPENDENCIES = @USE_ECORE_EVAS_INTERNAL_LIBS@ + +bin_ecore_evas_ecore_evas_svg_SOURCES = bin/ecore_evas/ecore_evas_svg.c +bin_ecore_evas_ecore_evas_svg_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_EVAS_CFLAGS@ +bin_ecore_evas_ecore_evas_svg_LDADD = @USE_ECORE_EVAS_LIBS@ +bin_ecore_evas_ecore_evas_svg_DEPENDENCIES = @USE_ECORE_EVAS_INTERNAL_LIBS@ + + bin_ecore_evas_eetpack_SOURCES = bin/ecore_evas/eetpack.c + bin_ecore_evas_eetpack_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_EVAS_CFLAGS@ @EINA_CFLAGS@ @EET_CFLAGS@ @EVAS_CFLAGS@ + bin_ecore_evas_eetpack_LDADD = @USE_ECORE_EVAS_LIBS@ @USE_EINA_LIBS@ @USE_EET_LIBS@ @USE_EVAS_LIBS@ + bin_ecore_evas_eetpack_DEPENDENCIES = @USE_ECORE_EVAS_INTERNAL_LIBS@ @USE_EINA_INTERNAL_LIBS@ @USE_EET_INTERNAL_LIBS@ @USE_EVAS_INTERNAL_LIBS@ ++ diff --cc src/Makefile_Ecore_Wayland.am index 1a75596,6099f34..614c698 --- a/src/Makefile_Ecore_Wayland.am +++ b/src/Makefile_Ecore_Wayland.am @@@ -16,10 -16,14 +16,14 @@@ lib/ecore_wayland/ecore_wl_output.c lib/ecore_wayland/ecore_wl_window.c \ lib/ecore_wayland/ecore_wl_subsurf.c \ lib/ecore_wayland/ecore_wl_private.h \ -lib/ecore_wayland/subsurface-protocol.c \ -lib/ecore_wayland/subsurface-client-protocol.h \ lib/ecore_wayland/ivi-application-protocol.c \ lib/ecore_wayland/ivi-application-client-protocol.h \ +lib/ecore_wayland/tizen-policy-ext-client-protocol.h \ - lib/ecore_wayland/tizen-policy-ext-protocol.c ++lib/ecore_wayland/tizen-policy-ext-protocol.c \ + lib/ecore_wayland/xdg-shell-client-protocol.h \ + lib/ecore_wayland/xdg-shell-protocol.c \ + lib/ecore_wayland/session-recovery-client-protocol.h \ + lib/ecore_wayland/session-recovery-protocol.c lib_ecore_wayland_libecore_wayland_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_WAYLAND_CFLAGS@ lib_ecore_wayland_libecore_wayland_la_LIBADD = @ECORE_WAYLAND_LIBS@ diff --cc src/Makefile_Ector.am index d6ff0ad,18c60a3..4ff6714 --- a/src/Makefile_Ector.am +++ b/src/Makefile_Ector.am @@@ -63,7 -81,10 +81,11 @@@ lib/ector/cairo/ector_renderer_cairo_sh lib/ector/cairo/ector_renderer_cairo_base.c \ lib/ector/cairo/ector_cairo_surface.c +# And now the software backend + installed_ectorcairoheadersdir = $(includedir)/ector-@VMAJ@/cairo + nodist_installed_ectorcairoheaders_DATA = $(ector_eolian_cairo_h) + + # And the default software backend lib_ector_libector_la_SOURCES += \ lib/ector/software/ector_renderer_software_gradient_linear.c \ lib/ector/software/ector_renderer_software_gradient_radial.c \ @@@ -120,11 -148,11 +149,12 @@@ tests_ector_ector_suite_DEPENDENCIES = endif EXTRA_DIST += \ - src/lib/ector/ector_private.h \ - src/lib/ector/cairo/ector_cairo_private.h \ - src/lib/ector/software/ector_drawhelper_private.h \ - src/lib/ector/software/ector_software_private.h \ - src/lib/ector/software/sw_ft_math.h \ - src/lib/ector/software/sw_ft_raster.h \ - src/lib/ector/software/sw_ft_stroker.h \ - src/lib/ector/software/sw_ft_types.h + lib/ector/ector_private.h \ + lib/ector/cairo/ector_cairo_private.h \ + lib/ector/software/ector_drawhelper_private.h \ + lib/ector/software/ector_software_private.h \ + lib/ector/software/sw_ft_math.h \ + lib/ector/software/sw_ft_raster.h \ + lib/ector/software/sw_ft_stroker.h \ + lib/ector/software/sw_ft_types.h ++ diff --cc src/Makefile_Evas.am index c4d4010,c2da888..dd4ec69 mode 100755,100644..100755 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am diff --cc src/bin/ecore_evas/.gitignore index eef5a15,776885d..b08a20f --- a/src/bin/ecore_evas/.gitignore +++ b/src/bin/ecore_evas/.gitignore @@@ -1,2 -1,3 +1,4 @@@ /ecore_evas_convert /ecore_evas_svg + /eetpack ++ diff --cc src/bin/edje/edje_cc_handlers.c index 6503783,f82b020..6171396 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@@ -532,16 -653,11 +662,21 @@@ New_Statement_Handler statement_handler {"collections.font", st_fonts_font}, /* dup */ FONT_STYLE_CC_STATEMENTS("collections.") {"collections.base_scale", st_collections_base_scale}, +// TIZEN_ONLY(20150110): Add plugins keyword. +#ifdef PLUGIN + {"collections.plugins.plugin.name", st_collections_plugins_plugin_name}, + {"collections.plugins.plugin.source", st_collections_plugins_plugin_source}, + {"collections.plugins.plugin.param", st_collections_plugins_plugin_param}, + {"collections.group.plugins.plugin.name", st_collections_plugins_plugin_name}, /* dup */ + {"collections.group.plugins.plugin.source", st_collections_plugins_plugin_source}, /* dup */ + {"collections.group.plugins.plugin.param", st_collections_plugins_plugin_param}, /* dup */ +#endif +// + {"collections.translation.file.locale", st_collections_group_translation_file_locale}, + {"collections.translation.file.source", st_collections_group_translation_file_source}, + {"collections.group.translation.file.locale", st_collections_group_translation_file_locale}, + {"collections.group.translation.file.source", st_collections_group_translation_file_source}, + {"collections.sounds.sample.name", st_collections_group_sound_sample_name}, {"collections.sounds.sample.source", st_collections_group_sound_sample_source}, {"collections.group.sounds.sample.name", st_collections_group_sound_sample_name}, /* dup */ @@@ -1439,12 -1628,8 +1655,13 @@@ _edje_program_copy(Edje_Program *ep, Ed ep->tween.v2 = ep2->tween.v2; ep->tween.v3 = ep2->tween.v3; ep->tween.v4 = ep2->tween.v4; + ep->tween.use_duration_factor = ep2->tween.use_duration_factor; ep->sample_name = STRDUP(ep2->sample_name); +// TIZEN_ONLY(20150110): Add plugins keyword. +#ifdef PLUGIN + ep->plugin_name = STRDUP(ep2->plugin_name); +#endif +// ep->tone_name = STRDUP(ep2->tone_name); ep->duration = ep2->duration; ep->speed = ep2->speed; @@@ -10729,26 -12913,24 +13052,32 @@@ st_collections_group_programs_program_a else if (ep->action == EDJE_ACTION_TYPE_SOUND_TONE) { ep->tone_name = parse_str(1); - for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++) + if (edje_file->sound_dir) { - if (!strcmp(edje_file->sound_dir->tones[i].name, ep->tone_name)) - break; - if (i == (int)(edje_file->sound_dir->tones_count - 1)) + for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++) { - ERR("No Tone name %s exist.", ep->tone_name); - exit(-1); + if (!strcmp(edje_file->sound_dir->tones[i].name, ep->tone_name)) + { + found = EINA_TRUE; + break; + } } } + if (!found) + { + ERR("No Tone name %s exist.", ep->tone_name); + exit(-1); + } ep->duration = parse_float_range(2, 0.1, 10.0); } +// TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + else if (ep->action == EDJE_ACTION_TYPE_RUN_PLUGIN) + { + ep->plugin_name = parse_str(1); + } +#endif +// else if (ep->action == EDJE_ACTION_TYPE_VIBRATION_SAMPLE) { ep->vibration_name = parse_str(1); diff --cc src/bin/edje/edje_cc_out.c index 72eebc1,2a31b3f..1282c62 mode 100755,100644..100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c diff --cc src/examples/ecore/Makefile.am index dbc06fe,a8af94f..0a0fd6a --- a/src/examples/ecore/Makefile.am +++ b/src/examples/ecore/Makefile.am @@@ -14,8 -16,9 +16,10 @@@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib/ecore_con \ -I$(top_srcdir)/src/lib/ecore_evas \ -I$(top_srcdir)/src/lib/ecore_audio \ +-I$(top_srcdir)/src/lib/ecore_buffer \ -I$(top_builddir)/src/lib/eina \ + -I$(top_builddir)/src/lib/eet \ + -I$(top_builddir)/src/lib/emile \ -I$(top_builddir)/src/lib/eo \ -I$(top_builddir)/src/lib/evas \ -I$(top_builddir)/src/lib/ecore \ @@@ -28,9 -31,12 +32,13 @@@ -I$(top_builddir)/src/lib/ecore_evas \ -I$(top_builddir)/src/lib/ecore_audio \ -DPACKAGE_EXAMPLES_DIR=\".\" \ +-I$(top_builddir)/src/lib/ecore_buffer \ @ECORE_CFLAGS@ + if HAVE_ECORE_BUFFER + AM_CPPFLAGS += -I$(top_srcdir)/src/lib/ecore_buffer + endif + EXTRA_PROGRAMS = \ ecore_animator_example \ ecore_client_bench \ @@@ -68,7 -74,8 +76,9 @@@ ecore_thread_example ecore_time_functions_example \ ecore_timer_example \ ecore_getopt_example \ - ecore_buffer_example ++ecore_buffer_example \ + ecore_con_eet_client_example \ + ecore_con_eet_server_example ECORE_COMMON_LDADD = \ $(top_builddir)/src/lib/ecore/libecore.la \ diff --cc src/examples/evas/Makefile.am index c7e0ac7,d271652..82bbe3e --- a/src/examples/evas/Makefile.am +++ b/src/examples/evas/Makefile.am @@@ -338,15 -352,63 +352,65 @@@ evas-vg-simple.c evas-vg-batman.c DATA_FILES = \ - enlightenment.png \ - red.png \ - im1.png \ - cube1.png \ - Makefile.examples + resources/images/enlightenment.png \ + resources/images/red.png \ + resources/images/im1.png \ + resources/images/cube1.png \ + resources/images/normal_lego.png \ + resources/images/sonic.png \ + resources/images/sweet_home_reversed.png \ + resources/images/wood.jpg \ + resources/images/rocks.jpg \ + resources/images/four_NM_height.tga \ + resources/images/rocks_NM_height.tga \ + resources/images/grid.png \ + resources/images/grid_n.png \ + resources/images/billboard.png \ + resources/models/mesh_for_mmap.eet \ + resources/models/mesh_for_mmap.md2 \ + resources/models/mesh_for_mmap.obj \ + resources/models/mesh_for_mmap.ply \ + resources/models/Normal_UVs_Colors.ply \ + resources/models/Normal_UVs_NoColors.ply \ + resources/models/Normal_NoUVs_Colors.ply \ + resources/models/Normal_NoUVs_NoColors.ply \ + resources/models/NoNormal_UVs_Colors.ply \ + resources/models/NoNormal_UVs_NoColors.ply \ + resources/models/NoNormal_NoUVs_Colors.ply \ + resources/models/NoNormal_NoUVs_NoColors.ply \ + resources/models/sonic.md2 \ + resources/models/sweet_home.obj \ + resources/models/sweet_home_only_vertex_coords.obj \ + resources/models/sweet_home_without_normals.obj \ + resources/models/sweet_home_without_tex_coords.obj \ + shooter/assets/images/brick-stone_n.jpg \ + shooter/assets/images/brick-stone.jpg \ + shooter/assets/images/bricks_n.jpg \ + shooter/assets/images/eagle.png \ + shooter/assets/images/snake.png \ + shooter/assets/images/snake_n.png \ + shooter/assets/images/bricks.jpg \ + shooter/assets/images/soldier.png \ + shooter/assets/images/gazebo.png \ + shooter/assets/images/warrior.png \ + shooter/assets/images/gazebo_t.png \ + shooter/assets/images/gazebo_t_t.png \ + shooter/assets/images/gazebo_t_n.png \ + shooter/assets/images/gazebo_b_n.png \ + shooter/assets/models/warrior.md2 \ + shooter/assets/models/gazebo_b.md2 \ + shooter/assets/models/gazebo_t.md2 \ + shooter/assets/models/eagle.md2 \ + shooter/assets/models/snake.md2 \ + shooter/assets/models/soldier_jump.md2 \ + shooter/assets/models/soldier.md2 \ + shooter/assets/models/tommy.ply \ + Makefile.examples \ + evas-common.h -examples: $(EXTRA_PROGRAMS) $(EDJS) +examplesdir = $(libdir)/evas/examples +examples_PROGRAMS = $(EXTRA_PROGRAMS) +examples_DATA = $(EDJS) clean-local: rm -f $(EXTRA_PROGRAMS) $(EDJS) diff --cc src/lib/ecore_buffer/Ecore_Buffer.h index 534f838,36c82da..7a7c21e --- a/src/lib/ecore_buffer/Ecore_Buffer.h +++ b/src/lib/ecore_buffer/Ecore_Buffer.h @@@ -416,9 -420,9 +420,9 @@@ typedef void (*Ecore_Buffer_Cb)(Ecore_B /** * @enum _Ecore_Export_Type * Types for export buffer. - * @since_tizen 2.4 + * @since 1.15 */ -enum _Ecore_Export_Type +typedef enum _Ecore_Export_Type { EXPORT_TYPE_INVALID, EXPORT_TYPE_ID, @@@ -513,23 -514,11 +517,23 @@@ EAPI void ecore_buffer_unregis * * @return Newly allocated Ecore_Buffer instance, NULL otherwise. */ - EAPI Ecore_Buffer *ecore_buffer_new(const char* engine, unsigned int width, unsigned int height, Ecore_Buffer_Format format, unsigned int flags); + EAPI Ecore_Buffer *ecore_buffer_new(const char *engine, unsigned int width, unsigned int height, Ecore_Buffer_Format format, unsigned int flags); /** + * @brief Creates a new Ecore_Buffer based on given tbm surface. + * - * @since_tizen 2.4 ++ * @since 1.15 + * + * @param[in] engine the name of backend + * @param[in] tbm_surface the handle of tbm_surface_h + * @param[in] flags the flags for Ecore_Buffer + * + * @return Newly allocated Ecore_Buffer instance based on tbm surface, NULL otherwise. + */ +EAPI Ecore_Buffer *ecore_buffer_new_with_tbm_surface(const char *engine, void *tbm_surface, unsigned int flags); +/** * @brief Free the given Ecore_Buffer. * - * @since_tizen 2.4 + * @since 1.15 * * @param[in] buf The Ecore_Buffer to free */ @@@ -560,11 -549,19 +564,11 @@@ EAPI void ecore_buffer_free_ca * * @see ecore_buffer_free_callback_add() */ - EAPI void ecore_buffer_free_callback_remove(Ecore_Buffer* buf, Ecore_Buffer_Cb func, void* data); + EAPI void ecore_buffer_free_callback_remove(Ecore_Buffer *buf, Ecore_Buffer_Cb func, void *data); /** - * @brief Get a pointer to the raw data of the given Ecore_Buffer. - * - * @param[in] buf The Ecore_Buffer. - * - * @return The pointer of raw data. - */ -EAPI void *ecore_buffer_data_get(Ecore_Buffer *buf); -/** * @brief Return the Pixmap of given Ecore_Buffer. * - * @since_tizen 2.4 + * @since 1.15 * * @param[in] buf The Ecore_Buffer * diff --cc src/lib/ecore_buffer/Ecore_Buffer_Queue.h index 0264fd3,4bc79ae..23faa46 --- a/src/lib/ecore_buffer/Ecore_Buffer_Queue.h +++ b/src/lib/ecore_buffer/Ecore_Buffer_Queue.h @@@ -183,7 -183,7 +183,7 @@@ typedef void (*Ecore_Buffer_Provider_En * * @see ecore_buffer_queue_shutdown() */ --EAPI int ecore_buffer_queue_init(void); ++EAPI int ecore_buffer_queue_init(void); /** * @brief Shut down the Ecore_Buffer_Queue system. * diff --cc src/lib/ecore_buffer/ecore_buffer.c index 95bd8c4,caa8f87..b286aa8 --- a/src/lib/ecore_buffer/ecore_buffer.c +++ b/src/lib/ecore_buffer/ecore_buffer.c @@@ -15,9 -15,10 +15,10 @@@ typedef struct _Ecore_Buffer_Module Ecore_Buffer_Module; typedef struct _Ecore_Buffer_Cb_Data Ecore_Buffer_Cb_Data; - struct _Ecore_Buffer_Module { - Ecore_Buffer_Backend *be; - Ecore_Buffer_Module_Data data; + struct _Ecore_Buffer_Module + { - Ecore_Buffer_Backend *be; - Ecore_Buffer_Module_Data data; ++ Ecore_Buffer_Backend *be; ++ Ecore_Buffer_Module_Data data; }; struct _Ecore_Buffer diff --cc src/lib/ecore_drm/Ecore_Drm.h index b834b62,47c6004..0e4f28d --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@@ -185,30 -178,17 +194,25 @@@ typedef struct _Ecore_Drm_Seat Ecore_Dr /* opaque structure to represent a drm sprite */ typedef struct _Ecore_Drm_Sprite Ecore_Drm_Sprite; - /* sturcture to inform drm activation state */ + /* structure to inform drm activation state */ typedef struct _Ecore_Drm_Event_Activate Ecore_Drm_Event_Activate; - /* sturcture to inform drm page flip */ - typedef struct _Ecore_Drm_Event_Page_Flip Ecore_Drm_Event_Page_Flip; - - /* sturcture to inform drm vblank */ - typedef struct _Ecore_Drm_Event_Vblank Ecore_Drm_Event_Vblank; - +/* sturcture to inform new input device added */ +typedef struct _Ecore_Drm_Event_Input_Device_Add Ecore_Drm_Event_Input_Device_Add; + +/* sturcture to inform old input device deleted */ +typedef struct _Ecore_Drm_Event_Input_Device_Del Ecore_Drm_Event_Input_Device_Del; + /* structure to inform drm output plug events */ /** @since 1.14 */ typedef struct _Ecore_Drm_Event_Output Ecore_Drm_Event_Output; + /** @since 1.14 */ + typedef void (*Ecore_Drm_Pageflip_Cb)(void *data); + EAPI extern int ECORE_DRM_EVENT_ACTIVATE; - EAPI extern int ECORE_DRM_EVENT_PAGE_FLIP; - EAPI extern int ECORE_DRM_EVENT_VBLANK; +EAPI extern int ECORE_DRM_EVENT_INPUT_DEVICE_ADD; +EAPI extern int ECORE_DRM_EVENT_INPUT_DEVICE_DEL; EAPI extern int ECORE_DRM_EVENT_OUTPUT; /**< @since 1.14 */ @@@ -382,10 -716,235 +740,247 @@@ EAPI Eina_Stringshare *ecore_drm_output EAPI Eina_Stringshare *ecore_drm_output_make_get(Ecore_Drm_Output *output); /** + * Get the name of Ecore_Drm_Output + * + * This function will give the name of Ecore_Drm_Output + * + * @param output The Ecore_Drm_Output to get name for + * @return The name. Caller should free this return. + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI char *ecore_drm_output_name_get(Ecore_Drm_Output *output); + + /** + * Set the dpms level of an Ecore_Drm_Output + * + * This function will set the DPMS level of an Ecore_Drm_Output + * + * @param output The Ecore_Drm_Output to set the dpms level on + * @param level The level to set + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.14 + */ + EAPI void ecore_drm_output_dpms_set(Ecore_Drm_Output *output, int level); + + /** + * Set the gamma level of an Ecore_Drm_Output + * + * This function will set the gamma of an Ecore_Drm_Output + * + * @param output The Ecore_Drm_Output to set the gamma level on + * @param size The gamma table size to set + * @param r The amount to scale the red channel + * @param g The amount to scale the green channel + * @param b The amount to scale the blue channel + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.14 + */ + EAPI void ecore_drm_output_gamma_set(Ecore_Drm_Output *output, uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b); + + /** + * Get the pointer position of Ecore_Drm_Device + * + * This function will give the pointer position of Ecore_Drm_Device + * + * @param dev The Ecore_Drm_Device to get pointer position for + * @param *x The parameter in which output x co-ordinate is stored + * @param *y The parameter in which output y co-ordinate is stored + * + * @ingroup Ecore_Drm_Device_Group + * @since 1.14 + */ + EAPI void ecore_drm_device_pointer_xy_get(Ecore_Drm_Device *dev, int *x, int *y); + + /** + * Get the list of drm devices which are allocated. + * + * @return Eina_List of drm devices, NULL otherwise + * + * @ingroup Ecore_Drm_Device_Group + * @since 1.14 + */ + EAPI const Eina_List *ecore_drm_devices_get(void); + + /** + * Get the minimum and maximum screen size range + * + * @param dev The Ecore_Drm_Device to get screen size range from + * @param *minw The parameter in which smallest width is stored + * @param *minh The parameter in which smallest height is stored + * @param *maxw The parameter in which largest width is stored + * @param *maxh The parameter in which largest height is stored + * + * @ingroup Ecore_Drm_Device_Group + * @since 1.15 + */ + EAPI void ecore_drm_screen_size_range_get(Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh); + + /** + * Get if a given output is connected + * + * @param output The Ecore_Drm_Output to get the connected status of + * + * @return EINA_TRUE if output is connected, EINA_FALSE otherwise + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI Eina_Bool ecore_drm_output_connected_get(Ecore_Drm_Output *output); + + /** + * Get the connector type of a given Ecore_Drm_Output + * + * @param output The Ecore_Drm_Output to get the connector type of + * + * @return An unsigned integer representing the type of connector for this output + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI unsigned int ecore_drm_output_connector_type_get(Ecore_Drm_Output *output); + + /** + * Get if a given output has a backlight + * + * @param output The Ecore_Drm_Output to get the backlight of + * + * @return EINA_TRUE if this output has a backlight, EINA_FALSE otherwise + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI Eina_Bool ecore_drm_output_backlight_get(Ecore_Drm_Output *output); + + /** + * Get the edid of a given output + * + * @param output The Ecore_Drm_Output to get the backlight of + * + * @return A string representing the edid + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI char *ecore_drm_output_edid_get(Ecore_Drm_Output *output); + + /** + * Get a list of the modes supported on a given output + * + * @param output The Ecore_Drm_Output to get the modes for + * + * @return An Eina_List of the modes supported for this output + * + * @note The returned list should not be freed + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI Eina_List *ecore_drm_output_modes_get(Ecore_Drm_Output *output); + + /** + * Get the output which is marked as primary + * + * @param dev The Ecore_Drm_Device to get the primary output from + * + * @return The primary Ecore_Drm_Output or NULL if no primary output is set + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev); + + /** + * Set a given output as primary + * + * @param output The Ecore_Drm_Output to set as primary + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI void ecore_drm_output_primary_set(Ecore_Drm_Output *output); + + /** + * Get the size of the crtc for a given output + * + * @param output The Ecore_Drm_Output to get the crtc size of + * @param *width The parameter in which width is stored + * @param *height The parameter in which height is stored + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI void ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int *height); + + /** + * Find an Ecore_Drm_Output which has the given name + * + * This function will loop all the existing outputs in Ecore_Drm_Device and + * return an output if one exists that matches the given name. + * + * @param dev The Ecore_Drm_Device to search + * @param name The Ecore_Drm_Output matching this name + * + * @return An Ecore_Drm_Output if one exists at these coordinates or NULL + * + * @ingroup Ecore_Drm_Device_Group + * @since 1.15 + */ + EAPI Ecore_Drm_Output *ecore_drm_device_output_name_find(Ecore_Drm_Device *dev, const char *name); + + /** + * Get if an Ecore_Drm_Output can be used on a given crtc + * + * This function will loop the possible crtcs of an encoder to determine if + * a given output can be assigned to a given crtc + * + * @param output The Ecore_Drm_Output to test if can be used on crtc + * @param crtc The crtc to test an Ecore_Drm_Output against + * + * @return EINA_TRUE if the output can be assigned to given crtc, EINA_FALSE otherwise + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI Eina_Bool ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsigned int crtc); + + /** + * Set a given mode to be used on an Ecore_Drm_Output + * + * This function will set the given mode to be used on a given Ecore_Drm_Output + * + * @param output The Ecore_Drm_Output to set the mode on + * @param mode A valid Ecore_Drm_Output_Mode to set or NULL to disable the output + * @param X The X position to set this output to + * @param Y The Y position to set this output to + * + * @return EINA_TRUE on success, EINA_FALSE on failure + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ + EAPI Eina_Bool ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y); + ++/** + * @since tizen 3.0 + */ +EAPI Eina_List *ecore_drm_seat_evdev_list_get(Ecore_Drm_Seat *seat); +EAPI const char *ecore_drm_evdev_name_get(Ecore_Drm_Evdev *evdev); +EAPI const char *ecore_drm_evdev_sysname_get(Ecore_Drm_Evdev *evdev); + ++/* This is ugly, will remove after rebaseing on 1.14 */ ++EAPI unsigned int ecore_drm_output_crtc_id_get(Ecore_Drm_Output *output); ++EAPI void ecore_drm_output_current_fb_info_set(Ecore_Drm_Output *output, unsigned int handle, int w, int h, unsigned int format); ++EAPI void ecore_drm_output_current_fb_info_get(Ecore_Drm_Output *output, unsigned int *handle, int *w, int *h, unsigned int *format); ++ + # ifdef __cplusplus + } + # endif + + # undef EAPI + # define EAPI + #endif diff --cc src/lib/ecore_drm/ecore_drm.c index 9d5a659,6bbbde0..0e12d26 --- a/src/lib/ecore_drm/ecore_drm.c +++ b/src/lib/ecore_drm/ecore_drm.c @@@ -12,10 -11,6 +11,8 @@@ static int _ecore_drm_init_count = 0 int _ecore_drm_log_dom = -1; EAPI int ECORE_DRM_EVENT_ACTIVATE = 0; - EAPI int ECORE_DRM_EVENT_PAGE_FLIP = 0; - EAPI int ECORE_DRM_EVENT_VBLANK = 0; +EAPI int ECORE_DRM_EVENT_INPUT_DEVICE_ADD = 0; +EAPI int ECORE_DRM_EVENT_INPUT_DEVICE_DEL = 0; static void _ecore_drm_event_activate_free(void *data EINA_UNUSED, void *event) @@@ -90,11 -88,8 +87,10 @@@ ecore_drm_init(void if (!eeze_init()) goto eeze_err; ECORE_DRM_EVENT_ACTIVATE = ecore_event_type_new(); - ECORE_DRM_EVENT_PAGE_FLIP = ecore_event_type_new(); - ECORE_DRM_EVENT_VBLANK = ecore_event_type_new(); ECORE_DRM_EVENT_OUTPUT = ecore_event_type_new(); + ECORE_DRM_EVENT_SEAT_ADD = ecore_event_type_new(); + ECORE_DRM_EVENT_INPUT_DEVICE_ADD = ecore_event_type_new(); + ECORE_DRM_EVENT_INPUT_DEVICE_DEL = ecore_event_type_new(); /* return init count */ return _ecore_drm_init_count; diff --cc src/lib/ecore_drm/ecore_drm_fb.c index af05c17,385d3ea..41942a0 --- a/src/lib/ecore_drm/ecore_drm_fb.c +++ b/src/lib/ecore_drm/ecore_drm_fb.c @@@ -95,3 -135,138 +135,141 @@@ ecore_drm_fb_destroy(Ecore_Drm_Fb *fb drmIoctl(fb->fd, DRM_IOCTL_MODE_DESTROY_DUMB, &darg); free(fb); } + + EAPI void + ecore_drm_fb_dirty(Ecore_Drm_Fb *fb, Eina_Rectangle *rects, unsigned int count) + { + EINA_SAFETY_ON_NULL_RETURN(fb); + + if ((!rects) || (!count)) return; + + #ifdef DRM_MODE_FEATURE_DIRTYFB + drmModeClip *clip; + unsigned int i = 0; + int ret; + + clip = alloca(count * sizeof(drmModeClip)); + for (i = 0; i < count; i++) + { + clip[i].x1 = rects[i].x; + clip[i].y1 = rects[i].y; + clip[i].x2 = rects[i].w; + clip[i].y2 = rects[i].h; + } + + ret = drmModeDirtyFB(fb->fd, fb->id, clip, count); + if (ret) + { + if (ret == -EINVAL) + ERR("Could not mark FB as Dirty: %m"); + } + #endif + } + + EAPI void + ecore_drm_fb_set(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb) + { + Ecore_Drm_Output *output; + Eina_List *l; + + EINA_SAFETY_ON_NULL_RETURN(dev); + EINA_SAFETY_ON_NULL_RETURN(fb); + + if (dev->dumb[0]) + { + if ((fb->w != dev->dumb[0]->w) || (fb->h != dev->dumb[0]->h)) + { + /* we need to copy from fb to dev->dumb */ + WRN("Trying to set a Framebuffer of improper size !!"); + return; + } + } + + if (!dev->next) dev->next = fb; + if (!dev->next) return; + + EINA_LIST_FOREACH(dev->outputs, l, output) + { + int x = 0, y = 0; + + if ((!output->enabled) || (!output->current_mode)) continue; + + if (!output->cloned) + { + x = output->x; + y = output->y; + } + + if ((!dev->current) || + (dev->current->stride != dev->next->stride)) + { + if (drmModeSetCrtc(dev->drm.fd, output->crtc_id, dev->next->id, + x, y, &output->conn_id, 1, + &output->current_mode->info)) + { + ERR("Failed to set Mode %dx%d for Output %s: %m", + output->current_mode->width, output->current_mode->height, + output->name); + } + + /* TODO: set dpms on ?? */ + } + } + } + + EAPI void + ecore_drm_fb_send(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb func, void *data) + { + Ecore_Drm_Output *output; + Eina_List *l; + Ecore_Drm_Pageflip_Callback *cb; + + EINA_SAFETY_ON_NULL_RETURN(dev); + EINA_SAFETY_ON_NULL_RETURN(fb); + EINA_SAFETY_ON_NULL_RETURN(func); + + if (eina_list_count(dev->outputs) < 1) return; + + if (fb->pending_flip) return; + + if (!(cb = calloc(1, sizeof(Ecore_Drm_Pageflip_Callback)))) + return; + + cb->dev = dev; + cb->func = func; + cb->data = data; + + EINA_LIST_FOREACH(dev->outputs, l, output) + if (output->enabled) cb->count++; + + EINA_LIST_FOREACH(dev->outputs, l, output) + { + if ((!output->enabled) || (!output->current_mode)) continue; + ++ ecore_drm_output_current_fb_info_set(output, fb->hdl, fb->w, fb->h, ++ DRM_FORMAT_ARGB8888); ++ + if (drmModePageFlip(dev->drm.fd, output->crtc_id, fb->id, + DRM_MODE_PAGE_FLIP_EVENT, cb) < 0) + { + ERR("Cannot flip crtc %u for connector %u: %m", + output->crtc_id, output->conn_id); + continue; + } + + fb->pending_flip = EINA_TRUE; + } + + while (fb->pending_flip) + { + int ret = 0; + + ret = drmHandleEvent(dev->drm.fd, &dev->drm_ctx); + if (ret < 0) + { + ERR("drmHandleEvent Failed: %m"); + free(cb); + break; + } + } + } diff --cc src/lib/ecore_drm/ecore_drm_inputs.c index e0773ff,75655ec..78683eb --- a/src/lib/ecore_drm/ecore_drm_inputs.c +++ b/src/lib/ecore_drm/ecore_drm_inputs.c @@@ -81,32 -80,19 +80,45 @@@ _seat_create(Ecore_Drm_Input *input, co return s; } +static void +_ecore_drm_event_input_device_add_free(void *data EINA_UNUSED, void *ev) +{ + Ecore_Drm_Event_Input_Device_Add *e; + + e = ev; + eina_stringshare_del(e->name); + eina_stringshare_del(e->sysname); + eina_stringshare_del(e->seatname); + + free(e); +} + +static void +_ecore_drm_event_input_device_del_free(void *data EINA_UNUSED, void *ev) +{ + Ecore_Drm_Event_Input_Device_Del *e; + + e = ev; + eina_stringshare_del(e->name); + eina_stringshare_del(e->sysname); + eina_stringshare_del(e->seatname); + + free(e); +} + + static Ecore_Drm_Seat * + _seat_get(Ecore_Drm_Input *input, const char *seat) + { + Ecore_Drm_Seat *s; + Eina_List *l; + + /* search for this name in existing seats */ + EINA_LIST_FOREACH(input->dev->seats, l, s) + if (!strcmp(s->name, seat)) return s; + + return _seat_create(input, seat); + } + static void _device_added(Ecore_Drm_Input *input, struct libinput_device *device) { diff --cc src/lib/ecore_drm/ecore_drm_output.c index 35954aa,b0fdeb2..370fea5 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@@ -1046,28 -1229,255 +1233,281 @@@ ecore_drm_output_crtc_id_get(Ecore_Drm_ return output->crtc_id; } + EAPI unsigned int + ecore_drm_output_crtc_buffer_get(Ecore_Drm_Output *output) + { + drmModeCrtc *crtc; + unsigned int id = 0; + + EINA_SAFETY_ON_NULL_RETURN_VAL(output, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(output->dev, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(output->crtc, 0); + + if (!(crtc = drmModeGetCrtc(output->dev->drm.fd, output->crtc_id))) + return 0; + + id = crtc->buffer_id; + drmModeFreeCrtc(crtc); + + return id; + } + + EAPI unsigned int + ecore_drm_output_connector_id_get(Ecore_Drm_Output *output) + { + EINA_SAFETY_ON_NULL_RETURN_VAL(output, 0); + + return output->conn_id; + } + + EAPI char * + ecore_drm_output_name_get(Ecore_Drm_Output *output) + { + EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL); + + return strdup(output->name); + } + + EAPI Eina_Bool + ecore_drm_output_connected_get(Ecore_Drm_Output *output) + { + EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); + + return output->connected; + } + + EAPI unsigned int + ecore_drm_output_connector_type_get(Ecore_Drm_Output *output) + { + EINA_SAFETY_ON_NULL_RETURN_VAL(output, 0); + + return output->conn_type; + } + + EAPI Eina_Bool + ecore_drm_output_backlight_get(Ecore_Drm_Output *output) + { + EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); + return (output->backlight != NULL); + } + + EAPI char * + ecore_drm_output_edid_get(Ecore_Drm_Output *output) + { + char *edid_str = NULL; + + EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL); + EINA_SAFETY_ON_NULL_RETURN_VAL(output->edid_blob, NULL); + + edid_str = malloc((128 * 2) + 1); + if (edid_str) + { + unsigned int k, kk; + const char *hexch = "0123456789abcdef"; + + for (kk = 0, k = 0; k < 128; k++) + { + edid_str[kk] = hexch[(output->edid_blob[k] >> 4) & 0xf]; + edid_str[kk + 1] = hexch[output->edid_blob[k] & 0xf]; + kk += 2; + } + edid_str[kk] = 0; + } + + return edid_str; + } + + EAPI Eina_List * + ecore_drm_output_modes_get(Ecore_Drm_Output *output) + { + EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL); + EINA_SAFETY_ON_NULL_RETURN_VAL(output->modes, NULL); + + return output->modes; + } + + EAPI Ecore_Drm_Output * + ecore_drm_output_primary_get(Ecore_Drm_Device *dev) + { + Ecore_Drm_Output *ret; + const Eina_List *l; + + EINA_SAFETY_ON_NULL_RETURN_VAL(dev, NULL); + + EINA_LIST_FOREACH(dev->outputs, l, ret) + if (ret->primary) return ret; + + return NULL; + } + + EAPI void + ecore_drm_output_primary_set(Ecore_Drm_Output *output) + { + const Eina_List *l; + Ecore_Drm_Output *out; + + EINA_SAFETY_ON_NULL_RETURN(output); + + /* unmark all outputs as primary */ + EINA_LIST_FOREACH(output->dev->outputs, l, out) + out->primary = EINA_FALSE; + + /* mark this output as primary */ + output->primary = EINA_TRUE; + } + + EAPI void + ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int *height) + { + if (width) *width = 0; + if (height) *height = 0; + + EINA_SAFETY_ON_NULL_RETURN(output); + + if (width) *width = output->crtc->width; + if (height) *height = output->crtc->height; + } + + EAPI Eina_Bool + ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsigned int crtc) + { + Ecore_Drm_Device *dev; + drmModeRes *res; + drmModeConnector *conn; + drmModeEncoder *enc; + int i, j, k; + unsigned int p; + Eina_Bool ret = EINA_FALSE; + + EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(output->dev, EINA_FALSE); + + dev = output->dev; + EINA_SAFETY_ON_TRUE_RETURN_VAL(dev->drm.fd < 0, EINA_FALSE); + + /* get the resources */ + if (!(res = drmModeGetResources(dev->drm.fd))) + { + ERR("Could not get resources for drm card: %m"); + return EINA_FALSE; + } + + for (i = 0; i < res->count_connectors; i++) + { + /* get the connector */ + if (!(conn = drmModeGetConnector(dev->drm.fd, res->connectors[i]))) + continue; + + for (j = 0; j < conn->count_encoders; j++) + { + /* get the encoder on this connector */ + if (!(enc = drmModeGetEncoder(dev->drm.fd, conn->encoders[j]))) + { + WRN("Failed to get encoder: %m"); + continue; + } + + /* get the encoder for given crtc */ + if (enc->crtc_id != crtc) goto next; + + p = enc->possible_crtcs; + + for (k = 0; k < res->count_crtcs; k++) + { + if (res->crtcs[k] != output->crtc_id) continue; + if (p & (1 << k)) + { + ret = EINA_TRUE; + break; + } + } + + next: + drmModeFreeEncoder(enc); + if (ret) break; + } + + /* free the connector */ + drmModeFreeConnector(conn); + if (ret) break; + } + + /* free resources */ + drmModeFreeResources(res); + + return ret; + } + + EAPI Eina_Bool + ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y) + { + Ecore_Drm_Device *dev; + Eina_Bool ret = EINA_TRUE; + unsigned int buffer = 0; + + EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(output->dev, EINA_FALSE); + + dev = output->dev; + + output->x = x; + output->y = y; + output->current_mode = mode; + + if (mode) + { + if (dev->current) + buffer = dev->current->id; + else if (dev->next) + buffer = dev->next->id; + else + buffer = output->crtc->buffer_id; + + if (drmModeSetCrtc(dev->drm.fd, output->crtc_id, buffer, + output->x, output->y, + &output->conn_id, 1, &mode->info) < 0) + { + ERR("Failed to set Mode %dx%d for Output %s: %m", + mode->width, mode->height, output->name); + ret = EINA_FALSE; + } + } + else + { + if (drmModeSetCrtc(dev->drm.fd, output->crtc_id, + 0, 0, 0, 0, 0, NULL) < 0) + { + ERR("Failed to set Mode %dx%d for Output %s: %m", + mode->width, mode->height, output->name); + ret = EINA_FALSE; + } + } + + return ret; + } ++ +EAPI void +ecore_drm_output_current_fb_info_set(Ecore_Drm_Output *output, unsigned int handle, int w, int h, unsigned int format) +{ + EINA_SAFETY_ON_NULL_RETURN(output); + + output->curr_fb_handle = handle; + output->curr_fb_w = w; + output->curr_fb_h = h; + output->curr_fb_format = format; +} + +EAPI void +ecore_drm_output_current_fb_info_get(Ecore_Drm_Output *output, unsigned int *handle, int *w, int *h, unsigned int *format) +{ + EINA_SAFETY_ON_NULL_RETURN(output); + + if (handle) + *handle = output->curr_fb_handle; + if (w) + *w = output->curr_fb_w; + if (h) + *h = output->curr_fb_h; + if (format) + *format = output->curr_fb_format; - } ++} diff --cc src/lib/ecore_drm/ecore_drm_private.h index 536f03d,0153fb3..a856aeb --- a/src/lib/ecore_drm/ecore_drm_private.h +++ b/src/lib/ecore_drm/ecore_drm_private.h @@@ -133,15 -124,27 +124,33 @@@ struct _Ecore_Drm_Outpu Ecore_Drm_Output_Mode *current_mode; Eina_List *modes; - Ecore_Drm_Fb *current, *next; - Ecore_Drm_Fb *dumb[NUM_FRAME_BUFFERS]; + unsigned char *edid_blob; + + struct + { + char eisa[13]; + char monitor[13]; + char pnp[5]; + char serial[13]; + } edid; + Ecore_Drm_Backlight *backlight; + Eina_Bool primary : 1; + Eina_Bool connected : 1; + Eina_Bool enabled : 1; + Eina_Bool cloned : 1; + Eina_Bool need_repaint : 1; + Eina_Bool repaint_scheduled : 1; + Eina_Bool pending_destroy : 1; + Eina_Bool pending_flip : 1; + Eina_Bool pending_vblank : 1; ++ + /* this is ugly */ + unsigned int curr_fb_handle; + int curr_fb_w; + int curr_fb_h; + int curr_fb_format; }; struct _Ecore_Drm_Seat diff --cc src/lib/ecore_wayland/Ecore_Wayland.h index 15e6803,1735014..c41595f --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h @@@ -12,7 -12,6 +12,7 @@@ # include # include # include - # include ++# include "xdg-shell-client-protocol.h" # ifdef EAPI # undef EAPI diff --cc src/lib/ecore_wayland/ecore_wl.c index 1f97462,f6e7109..3f6f24f --- a/src/lib/ecore_wayland/ecore_wl.c +++ b/src/lib/ecore_wayland/ecore_wl.c @@@ -81,24 -66,7 +82,25 @@@ static const struct wl_callback_listene _ecore_wl_animator_callback }; -static void +// TIZEN_ONLY(20150722): Add ecore_wl_window_keygrab_* APIs +static const struct tizen_keyrouter_listener _ecore_tizen_keyrouter_listener = +{ + _ecore_wl_cb_keygrab_notify +}; +// + +static const struct tizen_policy_listener _ecore_tizen_policy_listener = +{ + _ecore_wl_cb_conformant, + _ecore_wl_cb_conformant_area, + _ecore_wl_cb_notification_done, + _ecore_wl_cb_transient_for_done, + _ecore_wl_cb_scr_mode_done, + _ecore_wl_cb_supported_aux_hints, + _ecore_wl_cb_allowed_aux_hint, +}; ++ +static void xdg_shell_ping(void *data EINA_UNUSED, struct xdg_shell *shell, uint32_t serial) { xdg_shell_pong(shell, serial); @@@ -215,11 -183,9 +234,11 @@@ ecore_wl_init(const char *name ECORE_WL_EVENT_SELECTION_DATA_READY = ecore_event_type_new(); ECORE_WL_EVENT_DATA_SOURCE_CANCELLED = ecore_event_type_new(); ECORE_WL_EVENT_INTERFACES_BOUND = ecore_event_type_new(); + ECORE_WL_EVENT_CONFORMANT_CHANGE = ecore_event_type_new(); + ECORE_WL_EVENT_AUX_HINT_ALLOWED = ecore_event_type_new(); } - if (!(_ecore_wl_disp = malloc(sizeof(Ecore_Wl_Display)))) + if (!(_ecore_wl_disp = calloc(1, sizeof(Ecore_Wl_Display)))) { ERR("Could not allocate memory for Ecore_Wl_Display structure"); goto exit_ecore_disp; @@@ -305,14 -272,19 +325,20 @@@ ecore_wl_flush(void EAPI void ecore_wl_sync(void) { - int ret = 0; ++ + int ret; if ((!_ecore_wl_disp) || (!_ecore_wl_disp->wl.display)) return; _ecore_wl_sync_wait(_ecore_wl_disp); - while (_ecore_wl_disp->sync_ref_count > 0 && ret != -1) + while (_ecore_wl_disp->sync_ref_count > 0) { ret = wl_display_dispatch(_ecore_wl_disp->wl.display); - if (ret == -1) - CRI("dispatch failed: %s(%d)", strerror(errno), errno); + if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL))) + { + /* raise exit signal */ + ERR("Wayland socket error: %s", strerror(errno)); + abort(); + break; + } } } @@@ -584,10 -554,8 +626,12 @@@ _ecore_wl_shutdown(Eina_Bool close wl_compositor_destroy(_ecore_wl_disp->wl.compositor); if (_ecore_wl_disp->wl.subcompositor) wl_subcompositor_destroy(_ecore_wl_disp->wl.subcompositor); +// TIZEN_ONLY(20150722): Add ecore_wl_window_keygrab_* APIs + if (_ecore_wl_disp->wl.keyrouter) + tizen_keyrouter_destroy(_ecore_wl_disp->wl.keyrouter); +// + if (_ecore_wl_disp->cursor_theme) + wl_cursor_theme_destroy(_ecore_wl_disp->cursor_theme); if (_ecore_wl_disp->wl.display) { wl_registry_destroy(_ecore_wl_disp->wl.registry); diff --cc src/lib/ecore_wayland/ecore_wl_input.c index f7c8e9d,f189235..d7c0be0 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@@ -222,6 -224,8 +224,9 @@@ ecore_wl_input_cursor_size_set(Ecore_Wl EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm); + if (input->display->cursor_theme) + wl_cursor_theme_destroy(input->display->cursor_theme); ++ input->display->cursor_theme = wl_cursor_theme_load(NULL, input->cursor_size, input->display->wl.shm); } @@@ -384,7 -380,28 +381,29 @@@ _ecore_wl_input_setup(Ecore_Wl_Input *i cursor_theme_name = getenv("ECORE_WL_CURSOR_THEME_NAME"); ecore_wl_input_cursor_theme_name_set(input, cursor_theme_name); + } + + void + _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) + { + Ecore_Wl_Input *input; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(input = calloc(1, sizeof(Ecore_Wl_Input)))) return; + + input->display = ewd; + input->pointer_focus = NULL; + input->keyboard_focus = NULL; + input->touch_focus = NULL; + + input->repeat.enabled = EINA_TRUE; + input->repeat.rate = 0.025; + input->repeat.delay = 0.4; + + if (ewd->wl.shm) + _ecore_wl_input_setup(input); + input->seat = wl_registry_bind(ewd->wl.registry, id, &wl_seat_interface, 1); ewd->inputs = eina_inlist_append(ewd->inputs, EINA_INLIST_GET(input)); @@@ -849,22 -832,11 +875,23 @@@ _ecore_wl_input_cb_keyboard_key(void *d strcpy((char *)e->key, key); if (strlen(compose)) strcpy((char *)e->compose, compose); - e->window = win->id; - e->event_window = win->id; + // TIZEN_ONLY(20150911): Deal with key event if window is not exist. + if (win) + { + // + e->window = win->id; + e->event_window = win->id; + // TIZEN_ONLY(20150911): Deal with key event if window is not exist. + } + else + { + e->window = NULL; + e->event_window = NULL; + } + // e->timestamp = timestamp; e->modifiers = input->modifiers; + e->keycode = code; if (state) ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL); diff --cc src/lib/ecore_wayland/ecore_wl_private.h index 0a23ded,6d4f677..fd91a68 --- a/src/lib/ecore_wayland/ecore_wl_private.h +++ b/src/lib/ecore_wayland/ecore_wl_private.h @@@ -12,10 -12,6 +12,10 @@@ # define IVI_SURFACE_ID 6000 # endif - # include ++# include "xdg-shell-client-protocol.h" +# include +# include "tizen-policy-ext-client-protocol.h" + //# define LOGFNS 1 # ifdef LOGFNS @@@ -124,19 -117,9 +125,16 @@@ struct _Ecore_Wl_Windo struct ivi_surface *ivi_surface; int ivi_surface_id; # endif + struct tizen_visibility *tz_visibility; + struct tizen_position *tz_position; + struct tizen_rotation *tz_rotation; + struct tizen_resource *tz_resource; + unsigned int resource_id; + unsigned int tz_rotation_serial; - struct wl_region *opaque_region; - struct wl_region *input_region; - struct xdg_surface *xdg_surface; struct xdg_popup *xdg_popup; + Eina_Bool visible : 1; Eina_Bool focused : 1; Eina_Bool resizing : 1; @@@ -327,7 -283,7 +327,10 @@@ extern Ecore_Wl_Display *_ecore_wl_disp void _ecore_wl_window_init(void); void _ecore_wl_window_shutdown(void); Eina_Hash *_ecore_wl_window_hash_get(void); ++// TIZEN_ONLY(20150722): Add ecore_wl_window_keygrab_* APIs +Eina_Hash *_ecore_wl_keygrab_hash_get(void); ++// + void _ecore_wl_window_shell_surface_init(Ecore_Wl_Window *win); void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id); void _ecore_wl_output_del(Ecore_Wl_Output *output); diff --cc src/lib/ecore_wayland/ecore_wl_window.c index cd13bab,9751fa2..873f707 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@@ -3,28 -3,19 +3,29 @@@ #endif #include "ecore_wl_private.h" - #include + #include "xdg-shell-client-protocol.h" + #include "session-recovery-client-protocol.h" +#include /* local function prototypes */ static void _ecore_wl_window_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial); static void _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface EINA_UNUSED, unsigned int edges, int w, int h); static void _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface EINA_UNUSED); - static void _ecore_wl_window_cb_surface_enter(void *data, struct wl_surface *surface, struct wl_output *output EINA_UNUSED); - static void _ecore_wl_window_cb_surface_leave(void *data, struct wl_surface *surface, struct wl_output *output EINA_UNUSED); - static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int x, int y, int w, int h, int edges); + static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, int edges); +static void _ecore_wl_window_show_send(Ecore_Wl_Window *win); +static void _ecore_wl_window_hide_send(Ecore_Wl_Window *win); static char *_ecore_wl_window_id_str_get(unsigned int win_id); static void _ecore_xdg_handle_surface_configure(void *data, struct xdg_surface *xdg_surface, int32_t width, int32_t height,struct wl_array *states, uint32_t serial); static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface); - static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup, unsigned int serial); ++static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface); + static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup); + static void _ecore_session_recovery_uuid(void *data, struct session_recovery *session_recovery, const char *uuid); +static void _ecore_wl_window_cb_visibility_change(void *data, struct tizen_visibility *tizen_visibility, uint32_t visibility); +static void _ecore_wl_window_cb_position_change(void *data, struct tizen_position *tizen_position, int32_t x, int32_t y); +static void _ecore_wl_window_cb_available_angles_done(void *data, struct tizen_rotation *tizen_rotation, uint32_t angles); +static void _ecore_wl_window_cb_preferred_angle_done(void *data, struct tizen_rotation *tizen_rotation, uint32_t angle); +static void _ecore_wl_window_cb_angle_change(void *data, struct tizen_rotation *tizen_rotation, uint32_t angle, uint32_t serial); +static void _ecore_wl_window_cb_resource_id(void *data, struct tizen_resource *tizen_resource, uint32_t id); /* local variables */ static Eina_Hash *_windows = NULL; @@@ -54,32 -39,16 +49,37 @@@ static const struct xdg_popup_listener _ecore_xdg_handle_popup_done, }; +static const struct tizen_visibility_listener _ecore_tizen_visibility_listener = +{ + _ecore_wl_window_cb_visibility_change, +}; + +static const struct tizen_position_listener _ecore_tizen_position_listener = +{ + _ecore_wl_window_cb_position_change, +}; +static const struct tizen_rotation_listener _ecore_tizen_rotation_listener = +{ + _ecore_wl_window_cb_available_angles_done, + _ecore_wl_window_cb_preferred_angle_done, + _ecore_wl_window_cb_angle_change, +}; + +static const struct tizen_resource_listener _ecore_tizen_resource_listener = +{ + _ecore_wl_window_cb_resource_id, +}; + + static const struct session_recovery_listener _ecore_session_recovery_listener = + { + _ecore_session_recovery_uuid, + }; + /* internal functions */ - void + void _ecore_wl_window_init(void) { - if (!_windows) + if (!_windows) _windows = eina_hash_string_superfast_new(NULL); } @@@ -96,6 -65,131 +96,216 @@@ _ecore_wl_window_hash_get(void return _windows; } + void + _ecore_wl_window_shell_surface_init(Ecore_Wl_Window *win) + { + #ifdef USE_IVI_SHELL + char *env; + #endif + + if ((win->type == ECORE_WL_WINDOW_TYPE_DND) || + (win->type == ECORE_WL_WINDOW_TYPE_NONE)) return; + #ifdef USE_IVI_SHELL + if ((!win->ivi_surface) && (_ecore_wl_disp->wl.ivi_application)) + { + if (win->parent && win->parent->ivi_surface) + win->ivi_surface_id = win->parent->ivi_surface_id + 1; + else if ((env = getenv("ECORE_IVI_SURFACE_ID"))) + win->ivi_surface_id = atoi(env); + else + win->ivi_surface_id = IVI_SURFACE_ID + getpid(); + + win->ivi_surface = + ivi_application_surface_create(_ecore_wl_disp->wl.ivi_application, + win->ivi_surface_id, win->surface); + } + + if (!win->ivi_surface) + { + #endif + if (_ecore_wl_disp->wl.xdg_shell) + { + if (win->xdg_surface) return; + win->xdg_surface = + xdg_shell_get_xdg_surface(_ecore_wl_disp->wl.xdg_shell, + win->surface); + if (!win->xdg_surface) return; + if (win->title) + xdg_surface_set_title(win->xdg_surface, win->title); + if (win->class_name) + xdg_surface_set_app_id(win->xdg_surface, win->class_name); + xdg_surface_set_user_data(win->xdg_surface, win); + xdg_surface_add_listener(win->xdg_surface, + &_ecore_xdg_surface_listener, win); + } + else if (_ecore_wl_disp->wl.shell) + { + if (win->shell_surface) return; + win->shell_surface = + wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, + win->surface); + if (!win->shell_surface) return; + + if (win->title) + wl_shell_surface_set_title(win->shell_surface, win->title); + + if (win->class_name) + wl_shell_surface_set_class(win->shell_surface, win->class_name); + } + + if (win->shell_surface) + wl_shell_surface_add_listener(win->shell_surface, + &_ecore_wl_shell_surface_listener, win); + #ifdef USE_IVI_SHELL + } + #endif + ++ if (_ecore_wl_disp->wl.tz_policy) ++ { ++ if (!win->tz_visibility) ++ { ++ win->tz_visibility = ++ tizen_policy_get_visibility(_ecore_wl_disp->wl.tz_policy, ++ win->surface); ++ if (!win->tz_visibility) return; ++ tizen_visibility_add_listener(win->tz_visibility, ++ &_ecore_tizen_visibility_listener, ++ win); ++ } ++ if (!win->tz_position) ++ { ++ ++ win->tz_position = ++ tizen_policy_get_position(_ecore_wl_disp->wl.tz_policy, ++ win->surface); ++ ++ if (!win->tz_position) return; ++ tizen_position_add_listener(win->tz_position, ++ &_ecore_tizen_position_listener, win); ++ if (win->surface) ++ tizen_position_set(win->tz_position, ++ win->allocation.x, win->allocation.y); ++ } ++ if (win->role) ++ { ++ if (win->surface) ++ tizen_policy_set_role(_ecore_wl_disp->wl.tz_policy, ++ win->surface, ++ win->role); ++ } ++ if (win->focus_skip) ++ { ++ if (win->surface) ++ tizen_policy_set_focus_skip(_ecore_wl_disp->wl.tz_policy, win->surface); ++ } ++ else ++ { ++ if (win->surface) ++ tizen_policy_unset_focus_skip(_ecore_wl_disp->wl.tz_policy, win->surface); ++ } ++ } ++ if ((!win->tz_rotation) && (_ecore_wl_disp->wl.tz_policy_ext)) ++ { ++ int i = 0, w, h, rot; ++ win->tz_rotation = ++ tizen_policy_ext_get_rotation(_ecore_wl_disp->wl.tz_policy_ext, ++ win->surface); ++ if (!win->tz_rotation) return; ++ tizen_rotation_add_listener(win->tz_rotation, ++ &_ecore_tizen_rotation_listener, win); ++ ++ rot = ecore_wl_window_rotation_get(win); ++ if ((rot % 90 == 0) && (rot / 90 <= 3) && (rot >= 0)) ++ { ++ i = rot / 90; ++ w = win->rotation_geometry_hints[i].w; ++ h = win->rotation_geometry_hints[i].h; ++ ++ if ((win->rotation_geometry_hints[i].valid) && ++ ((win->allocation.w != w) || (win->allocation.h != h))) ++ { ++ _ecore_wl_window_configure_send(win, ++ w, h, 0); ++ } ++ } ++ } ++ ++ if ((!win->tz_resource) && (_ecore_wl_disp->wl.tz_surf)) ++ { ++ win->tz_resource = ++ tizen_surface_get_tizen_resource(_ecore_wl_disp->wl.tz_surf, win->surface); ++ if (!win->tz_resource) return; ++ tizen_resource_add_listener(win->tz_resource, ++ &_ecore_tizen_resource_listener, win); ++ } ++ + /* trap for valid shell surface */ + if ((!win->xdg_surface) && (!win->shell_surface)) return; + + switch (win->type) + { + case ECORE_WL_WINDOW_TYPE_FULLSCREEN: + if (win->xdg_surface) + xdg_surface_set_fullscreen(win->xdg_surface, NULL); + else if (win->shell_surface) + wl_shell_surface_set_fullscreen(win->shell_surface, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, + 0, NULL); + break; + case ECORE_WL_WINDOW_TYPE_MAXIMIZED: + if (win->xdg_surface) + xdg_surface_set_maximized(win->xdg_surface); + else if (win->shell_surface) + wl_shell_surface_set_maximized(win->shell_surface, NULL); + break; + case ECORE_WL_WINDOW_TYPE_TRANSIENT: + if (win->xdg_surface) + xdg_surface_set_parent(win->xdg_surface, win->parent->xdg_surface); + else if (win->shell_surface) + wl_shell_surface_set_transient(win->shell_surface, + win->parent->surface, + win->allocation.x, + win->allocation.y, 0); + break; + case ECORE_WL_WINDOW_TYPE_MENU: + if (win->xdg_surface) + { + win->xdg_popup = + xdg_shell_get_xdg_popup(_ecore_wl_disp->wl.xdg_shell, + win->surface, + win->parent->surface, + _ecore_wl_disp->input->seat, + _ecore_wl_disp->serial, + win->allocation.x, win->allocation.y); + if (!win->xdg_popup) return; + xdg_popup_set_user_data(win->xdg_popup, win); + xdg_popup_add_listener(win->xdg_popup, + &_ecore_xdg_popup_listener, win); + } + else if (win->shell_surface) + wl_shell_surface_set_popup(win->shell_surface, + _ecore_wl_disp->input->seat, + _ecore_wl_disp->serial, + win->parent->surface, + win->allocation.x, win->allocation.y, 0); + break; + case ECORE_WL_WINDOW_TYPE_TOPLEVEL: + if (win->xdg_surface) + xdg_surface_set_parent(win->xdg_surface, NULL); + else if (win->shell_surface) + wl_shell_surface_set_toplevel(win->shell_surface); + break; + default: + break; + } ++ ++ if (!win->visible) ++ { ++ _ecore_wl_window_show_send(win); ++ win->visible = EINA_TRUE; ++ } + } + EAPI Ecore_Wl_Window * ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type) { @@@ -132,24 -223,8 +340,10 @@@ win->opaque.w = w; win->opaque.h = h; - wlcomp = _ecore_wl_compositor_get(); - if (!wlcomp) - { - ERR("Failed to get wl_compositor"); - free(win); - return NULL; - } - - win->opaque_region = - wl_compositor_create_region(wlcomp); - - win->input_region = - wl_compositor_create_region(wlcomp); - win->title = NULL; win->class_name = NULL; + win->role = NULL; + win->focus_skip = EINA_FALSE; eina_hash_add(_windows, _ecore_wl_window_id_str_get(win->id), win); return win; @@@ -359,8 -393,9 +536,12 @@@ ecore_wl_window_surface_create(Ecore_Wl if (!win) return NULL; if (win->surface) return win->surface; ++ + if (_ecore_wl_disp->wl.session_recovery) + session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, &_ecore_session_recovery_listener, win); - win->surface = wl_compositor_create_surface(_ecore_wl_compositor_get()); + wlcomp = _ecore_wl_compositor_get(); - if (wlcomp) win->surface = wl_compositor_create_surface(wlcomp); ++ if (wlcomp) ++ win->surface = wl_compositor_create_surface(wlcomp); if (!win->surface) return NULL; win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface); return win->surface; @@@ -695,23 -472,13 +667,19 @@@ ecore_wl_window_maximized_set(Ecore_Wl_ { xdg_surface_unset_maximized(win->xdg_surface); win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h, 0); + _ecore_wl_window_configure_send(win, - win->allocation.x, - win->allocation.y, + win->saved.w, + win->saved.h, + 0); } else if (win->shell_surface) { wl_shell_surface_set_toplevel(win->shell_surface); win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h, 0); + _ecore_wl_window_configure_send(win, - win->allocation.x, - win->allocation.y, + win->saved.w, + win->saved.h, + 0); } } } @@@ -758,9 -523,7 +724,8 @@@ ecore_wl_window_fullscreen_set(Ecore_Wl wl_shell_surface_set_toplevel(win->shell_surface); win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h, 0); + _ecore_wl_window_configure_send(win, - win->allocation.x, win->allocation.y, + win->saved.w, win->saved.h, 0); } } @@@ -809,14 -569,10 +771,14 @@@ ecore_wl_window_alpha_set(Ecore_Wl_Wind if (!win) return; win->alpha = alpha; if (!win->alpha) - ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y, + ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y, win->opaque.w, win->opaque.h); else - ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y, 0, 0); + { + ecore_wl_window_opaque_region_set(win, win->opaque.x, win->opaque.y, 0, 0); + if (win->surface) + wl_surface_set_opaque_region(win->surface, NULL); + } } EAPI Eina_Bool @@@ -971,51 -730,8 +936,51 @@@ ecore_wl_window_parent_set(Ecore_Wl_Win win->parent = parent; } +EAPI void +ecore_wl_window_position_set(Ecore_Wl_Window *win, int x EINA_UNUSED, int y EINA_UNUSED) +{ + if ((win->surface) && (win->tz_position)) + { + tizen_position_set(win->tz_position, win->allocation.x, win->allocation.y); + } +} + +EAPI void +ecore_wl_window_focus_skip_set(Ecore_Wl_Window *win, Eina_Bool focus_skip) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!win) return; + if (win->focus_skip == focus_skip) return; + + win->focus_skip = focus_skip; + + if (focus_skip) + { + if ((win->surface) && (_ecore_wl_disp->wl.tz_policy)) + tizen_policy_set_focus_skip(_ecore_wl_disp->wl.tz_policy, win->surface); + } + else + { + if ((win->surface) && (_ecore_wl_disp->wl.tz_policy)) + tizen_policy_unset_focus_skip(_ecore_wl_disp->wl.tz_policy, win->surface); + } + } + +EAPI void +ecore_wl_window_role_set(Ecore_Wl_Window *win, const char *role) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!win) return; + eina_stringshare_replace(&win->role, role); + + if ((win->surface) && (_ecore_wl_disp->wl.tz_policy)) + tizen_policy_set_role(_ecore_wl_disp->wl.tz_policy, win->surface, win->role); +} + /* @since 1.12 */ - EAPI void + EAPI void ecore_wl_window_iconified_set(Ecore_Wl_Window *win, Eina_Bool iconified) { struct wl_array states; @@@ -1062,9 -768,7 +1027,8 @@@ { wl_shell_surface_set_toplevel(win->shell_surface); win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h, 0); + _ecore_wl_window_configure_send(win, - win->allocation.x, win->allocation.y, + win->saved.w, win->saved.h, 0); } } } @@@ -1261,109 -966,9 +1230,108 @@@ ecore_wl_window_keyboard_get(Ecore_Wl_W return win->keyboard_device; } +EAPI void +ecore_wl_window_rotation_preferred_rotation_set(Ecore_Wl_Window *win, int rot) +{ + enum tizen_rotation_angle angle = TIZEN_ROTATION_ANGLE_NONE; + + if (!win) return; + if (!win->tz_rotation) return; + + switch (rot) + { + case 0: + angle = TIZEN_ROTATION_ANGLE_0; + break; + case 90: + angle = TIZEN_ROTATION_ANGLE_90; + break; + case 180: + angle = TIZEN_ROTATION_ANGLE_180; + break; + case 270: + angle = TIZEN_ROTATION_ANGLE_270; + break; + default: + break; + } + + tizen_rotation_set_preferred_angle(win->tz_rotation, (uint32_t)angle); +} + +EAPI void +ecore_wl_window_rotation_available_rotations_set(Ecore_Wl_Window *win, const int *rots, unsigned int count) +{ + uint32_t angles = 0; + unsigned int i = 0; + + if (!win) return; + if (!win->tz_rotation) return; + + + for (i = 0; i < count ; i++) + { + switch (rots[i]) + { + case 0: + angles |= (uint32_t)TIZEN_ROTATION_ANGLE_0; + break; + case 90: + angles |= (uint32_t)TIZEN_ROTATION_ANGLE_90; + break; + case 180: + angles |= (uint32_t)TIZEN_ROTATION_ANGLE_180; + break; + case 270: + angles |= (uint32_t)TIZEN_ROTATION_ANGLE_270; + break; + default: + break; + } + } + + tizen_rotation_set_available_angles(win->tz_rotation, angles); +} + +EAPI void +ecore_wl_window_rotation_change_done_send(Ecore_Wl_Window *win) +{ + if (!win) return; + if (!win->tz_rotation) return; + + tizen_rotation_ack_angle_change(win->tz_rotation, win->tz_rotation_serial); +} + + +EAPI void +ecore_wl_window_rotation_geometry_set(Ecore_Wl_Window *win, int rot, int x, int y, int w, int h) +{ + int i = 0; + int rotation = 0; + if (!win) return; + + if ((rot % 90 != 0) || (rot / 90 > 3) || (rot < 0)) return; + + i = rot / 90; + win->rotation_geometry_hints[i].x = x; + win->rotation_geometry_hints[i].y = y; + win->rotation_geometry_hints[i].w = w; + win->rotation_geometry_hints[i].h = h; + win->rotation_geometry_hints[i].valid = EINA_TRUE; + + if (!win->tz_rotation) return; + rotation = ecore_wl_window_rotation_get(win); + if ((rotation % 90 != 0) || (rotation / 90 > 3) || (rotation < 0)) return; + if ((i == (rotation / 90)) && + ((win->allocation.w != w) || (win->allocation.h != h))) + { + _ecore_wl_window_configure_send(win, - win->allocation.x, win->allocation.y, + w, h, 0); + } +} /* local functions */ - static void + static void _ecore_wl_window_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial) { if (!shell_surface) return; @@@ -1382,11 -987,7 +1350,10 @@@ _ecore_wl_window_cb_configure(void *dat if ((w <= 0) || (h <= 0)) return; if ((win->allocation.w != w) || (win->allocation.h != h)) - _ecore_wl_window_configure_send(win, w, h, edges); + { + _ecore_wl_window_configure_send(win, - win->allocation.x, win->allocation.y, + w, h, edges); + } } static void @@@ -1444,178 -1034,7 +1400,127 @@@ _ecore_xdg_handle_surface_configure(voi xdg_surface_ack_configure(win->xdg_surface, serial); } - //static void - //_ecore_wl_window_cb_xdg_surface_activate(void *data, struct xdg_surface *xdg_surface) - //{ - // Ecore_Wl_Window *win; - // Ecore_Wl_Event_Window_Activate *ev; - // - // LOGFN(__FILE__, __LINE__, __FUNCTION__); - // - // if (!xdg_surface) return; - // if (!(win = data)) return; - // - // if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Activate)))) return; - // ev->win = win->id; - // if (win->parent) - // ev->parent_win = win->parent->id; - // else - // ev->parent_win = 0; - // ev->event_win = win->id; - // ev->fobscured = EINA_FALSE; - // ecore_event_add(ECORE_WL_EVENT_WINDOW_ACTIVATE, ev, NULL, NULL); - //} - // - //static void - //_ecore_wl_window_cb_xdg_surface_deactivate(void *data, struct xdg_surface *xdg_surface) - //{ - // Ecore_Wl_Window *win; - // Ecore_Wl_Event_Window_Deactivate *ev; - // - // LOGFN(__FILE__, __LINE__, __FUNCTION__); - // - // if (!xdg_surface) return; - // if (!(win = data)) return; - // - // if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Deactivate)))) return; - // ev->win = win->id; - // if (win->parent) - // ev->parent_win = win->parent->id; - // else - // ev->parent_win = 0; - // ev->event_win = win->id; - // ev->fobscured = EINA_FALSE; - // ecore_event_add(ECORE_WL_EVENT_WINDOW_DEACTIVATE, ev, NULL, NULL); - //} - static void +_ecore_wl_window_cb_position_change(void *data, struct tizen_position *tizen_position EINA_UNUSED, int32_t x, int32_t y) +{ + Ecore_Wl_Window *win; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(win = data)) return; + + if ((x != win->allocation.x) || (y != win->allocation.y)) + { + ecore_wl_window_update_location(win, x, y); + _ecore_wl_window_configure_send(win, - x, - y, + win->allocation.w, + win->allocation.h, + 0); + } +} + +static void +_ecore_wl_window_cb_visibility_change(void *data, struct tizen_visibility *tizen_visibility EINA_UNUSED, uint32_t visibility) +{ + Ecore_Wl_Window *win; + Ecore_Wl_Event_Window_Visibility_Change *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(win = data)) return; + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Visibility_Change)))) return; + + ev->win = win->id; + if (visibility == TIZEN_VISIBILITY_VISIBILITY_FULLY_OBSCURED) + ev->fully_obscured = 1; + else + ev->fully_obscured = 0; + + ecore_event_add(ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE, ev, NULL, NULL); +} + +static void +_ecore_wl_window_cb_available_angles_done(void *data EINA_UNUSED, struct tizen_rotation *tizen_rotation EINA_UNUSED, uint32_t angles EINA_UNUSED) +{ + return; +} + +static void +_ecore_wl_window_cb_preferred_angle_done(void *data EINA_UNUSED, struct tizen_rotation *tizen_rotation EINA_UNUSED, uint32_t angle EINA_UNUSED) +{ + return; +} + +static void +_ecore_wl_window_cb_angle_change(void *data, struct tizen_rotation *tizen_rotation EINA_UNUSED, uint32_t angle, uint32_t serial) +{ + Ecore_Wl_Window *win; + Ecore_Wl_Event_Window_Rotate *ev; + int i = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(win = data)) return; + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Rotate)))) return; + + win->tz_rotation_serial = serial; + + ev->win = win->id; + ev->w = win->allocation.w; + ev->h = win->allocation.h; + + switch (angle) + { + case TIZEN_ROTATION_ANGLE_0: + ev->angle = 0; + break; + case TIZEN_ROTATION_ANGLE_90: + ev->angle = 90; + break; + case TIZEN_ROTATION_ANGLE_180: + ev->angle = 180; + break; + case TIZEN_ROTATION_ANGLE_270: + ev->angle = 270; + break; + default: + ev->angle = 0; + break; + } + + i = ev->angle / 90; + if (win->rotation_geometry_hints[i].valid) + { + ev->w = win->rotation_geometry_hints[i].w; + ev->h = win->rotation_geometry_hints[i].h; + } + + ecore_event_add(ECORE_WL_EVENT_WINDOW_ROTATE, ev, NULL, NULL); + ecore_wl_window_rotation_set(win, ev->angle); +} + +static void +_ecore_wl_window_cb_resource_id(void *data, struct tizen_resource *tizen_resource EINA_UNUSED, uint32_t id) +{ + Ecore_Wl_Window *win; + Ecore_Wl_Event_Window_Show *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(win = data)) return; + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Show)))) return; + ev->win = win->id; + if (win->parent) + ev->parent_win = win->parent->id; + else + ev->parent_win = 0; + ev->event_win = win->id; + ev->data[0] = (unsigned int)id; + win->resource_id = (unsigned int)id; + ecore_event_add(ECORE_WL_EVENT_WINDOW_SHOW, ev, NULL, NULL); +} + - //static void - //_ecore_wl_window_cb_xdg_surface_delete(void *data EINA_UNUSED, struct xdg_surface *xdg_surface EINA_UNUSED) - //{ - //} - +static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface EINA_UNUSED) { Ecore_Wl_Window *win; diff --cc src/lib/ector/software/ector_drawhelper_neon.c index 0000000,59e032f..ccc6c4c mode 000000,100644..100644 --- a/src/lib/ector/software/ector_drawhelper_neon.c +++ b/src/lib/ector/software/ector_drawhelper_neon.c @@@ -1,0 -1,231 +1,237 @@@ ++#if 0 ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + + #include + #include "ector_drawhelper_private.h" + + #ifdef BUILD_NEON + #include + + static void + comp_func_solid_source_over_neon(uint * __restrict dest, int length, uint color, uint const_alpha) + { + uint16x8_t temp00_16x8; + uint16x8_t temp01_16x8; + uint16x8_t temp10_16x8; + uint16x8_t temp11_16x8; + uint32x4_t temp0_32x4; + uint32x4_t temp1_32x4; + uint32x4_t c_32x4; + uint32x4_t d0_32x4; + uint32x4_t d1_32x4; + uint8x16_t d0_8x16; + uint8x16_t d1_8x16; + uint8x16_t temp0_8x16; + uint8x16_t temp1_8x16; + uint8x8_t alpha_8x8; + uint8x8_t d00_8x8; + uint8x8_t d01_8x8; + uint8x8_t d10_8x8; + uint8x8_t d11_8x8; + uint8x8_t temp00_8x8; + uint8x8_t temp01_8x8; + uint8x8_t temp10_8x8; + uint8x8_t temp11_8x8; + + if (const_alpha != 255) + color = BYTE_MUL(color, const_alpha); + + // alpha can only be 0 if color is 0x0. In that case we can just return. + // Otherwise we can assume alpha != 0. This allows more optimization in + // NEON code. + if (!color) + return; + + DATA32 *start = dest; + int size = length; + DATA32 *end = start + (size & ~7); + + unsigned char alpha; + alpha = ~(color >> 24) + 1; + alpha_8x8 = vdup_n_u8(alpha); + + c_32x4 = vdupq_n_u32(color); + + while (start < end) + { + d0_32x4 = vld1q_u32(start); + d1_32x4 = vld1q_u32(start+4); + d0_8x16 = vreinterpretq_u8_u32(d0_32x4); + d1_8x16 = vreinterpretq_u8_u32(d1_32x4); + + d00_8x8 = vget_low_u8(d0_8x16); + d01_8x8 = vget_high_u8(d0_8x16); + d10_8x8 = vget_low_u8(d1_8x16); + d11_8x8 = vget_high_u8(d1_8x16); + + temp00_16x8 = vmull_u8(alpha_8x8, d00_8x8); + temp01_16x8 = vmull_u8(alpha_8x8, d01_8x8); + temp10_16x8 = vmull_u8(alpha_8x8, d10_8x8); + temp11_16x8 = vmull_u8(alpha_8x8, d11_8x8); + + temp00_8x8 = vshrn_n_u16(temp00_16x8,8); + temp01_8x8 = vshrn_n_u16(temp01_16x8,8); + temp10_8x8 = vshrn_n_u16(temp10_16x8,8); + temp11_8x8 = vshrn_n_u16(temp11_16x8,8); + + temp0_8x16 = vcombine_u8(temp00_8x8, temp01_8x8); + temp1_8x16 = vcombine_u8(temp10_8x8, temp11_8x8); + + temp0_32x4 = vreinterpretq_u32_u8(temp0_8x16); + temp1_32x4 = vreinterpretq_u32_u8(temp1_8x16); + + d0_32x4 = vaddq_u32(c_32x4, temp0_32x4); + d1_32x4 = vaddq_u32(c_32x4, temp1_32x4); + + vst1q_u32(start, d0_32x4); + vst1q_u32(start+4, d1_32x4); + start+=8; + } + + end += (size & 7); + while (start < end) + { + *start = color + MUL_256(alpha, *start); + start++; + } + } + + /* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of + * reads, then two writes, a miss on read is 'just' two reads */ + static void + comp_func_source_over_sse2(uint * __restrict dest, const uint * __restrict src, int length, uint color, uint const_alpha) + { + uint16x8_t ad0_16x8; + uint16x8_t ad1_16x8; + uint16x8_t sc0_16x8; + uint16x8_t sc1_16x8; + uint16x8_t x255_16x8; + uint32x2_t c_32x2; + uint32x4_t ad_32x4; + uint32x4_t alpha_32x4; + uint32x4_t cond_32x4; + uint32x4_t d_32x4; + uint32x4_t s_32x4; + uint32x4_t sc_32x4; + uint32x4_t x0_32x4; + uint32x4_t x1_32x4; + uint8x16_t ad_8x16; + uint8x16_t alpha_8x16; + uint8x16_t d_8x16; + uint8x16_t s_8x16; + uint8x16_t sc_8x16; + uint8x16_t x0_8x16; + uint8x16_t x1_8x16; + uint8x8_t ad0_8x8; + uint8x8_t ad1_8x8; + uint8x8_t alpha0_8x8; + uint8x8_t alpha1_8x8; + uint8x8_t c_8x8; + uint8x8_t d0_8x8; + uint8x8_t d1_8x8; + uint8x8_t s0_8x8; + uint8x8_t s1_8x8; + uint8x8_t sc0_8x8; + uint8x8_t sc1_8x8; + int size; + DATA32 *start; + DATA32 *end; + + if (const_alpha != 255) + color = BYTE_MUL(color, const_alpha); + + c_32x2 = vdup_n_u32(color); + c_8x8 = vreinterpret_u8_u32(c_32x2); + x255_16x8 = vdupq_n_u16(0xff); + x0_8x16 = vdupq_n_u8(0x0); + x0_32x4 = vreinterpretq_u32_u8(x0_8x16); + x1_8x16 = vdupq_n_u8(0x1); + x1_32x4 = vreinterpretq_u32_u8(x1_8x16); + start = dest; + size = l; + end = start + (size & ~3); + + while (start < end) + { + s_32x4 = vld1q_u32(src); + s_8x16 = vreinterpretq_u8_u32(s_32x4); + + d_32x4 = vld1q_u32(start); + d_8x16 = vreinterpretq_u8_u32(d_32x4); + d0_8x8 = vget_low_u8(d_8x16); + d1_8x8 = vget_high_u8(d_8x16); + + s0_8x8 = vget_low_u8(s_8x16); + s1_8x8 = vget_high_u8(s_8x16); + + sc0_16x8 = vmull_u8(s0_8x8, c_8x8); + sc1_16x8 = vmull_u8(s1_8x8, c_8x8); + sc0_16x8 = vaddq_u16(sc0_16x8, x255_16x8); + sc1_16x8 = vaddq_u16(sc1_16x8, x255_16x8); + sc0_8x8 = vshrn_n_u16(sc0_16x8, 8); + sc1_8x8 = vshrn_n_u16(sc1_16x8, 8); + sc_8x16 = vcombine_u8(sc0_8x8, sc1_8x8); + + alpha_32x4 = vreinterpretq_u32_u8(sc_8x16); + alpha_32x4 = vshrq_n_u32(alpha_32x4, 24); + alpha_32x4 = vmulq_u32(x1_32x4, alpha_32x4); + alpha_8x16 = vreinterpretq_u8_u32(alpha_32x4); + alpha_8x16 = vsubq_u8(x0_8x16, alpha_8x16); + alpha0_8x8 = vget_low_u8(alpha_8x16); + alpha1_8x8 = vget_high_u8(alpha_8x16); + + ad0_16x8 = vmull_u8(alpha0_8x8, d0_8x8); + ad1_16x8 = vmull_u8(alpha1_8x8, d1_8x8); + ad0_8x8 = vshrn_n_u16(ad0_16x8,8); + ad1_8x8 = vshrn_n_u16(ad1_16x8,8); + ad_8x16 = vcombine_u8(ad0_8x8, ad1_8x8); + ad_32x4 = vreinterpretq_u32_u8(ad_8x16); + + alpha_32x4 = vreinterpretq_u32_u8(alpha_8x16); + cond_32x4 = vceqq_u32(alpha_32x4, x0_32x4); + ad_32x4 = vbslq_u32(cond_32x4, d_32x4 , ad_32x4); + + sc_32x4 = vreinterpretq_u32_u8(sc_8x16); + d_32x4 = vaddq_u32(sc_32x4, ad_32x4); + + vst1q_u32(start, d_32x4); + + src+=4; + start+=4; + } + + end += (size & 3); + while (start < end) + { + DATA32 sc = MUL4_SYM(color, *s); + DATA32 alpha = 256 - (sc >> 24); + *start = sc + MUL_256(alpha, *start); + start++; + src++; + } + } + #endif ++#endif + + void + init_draw_helper_neon() + { ++#if 0 + #ifdef BUILD_NEON + if (eina_cpu_features_get() & EINA_CPU_NEON) + { + // update the comp_function table for solid color + //func_for_mode_solid[ECTOR_ROP_COPY] = comp_func_solid_source_sse2; + func_for_mode_solid[ECTOR_ROP_BLEND] = comp_func_solid_source_over_neon; + + // update the comp_function table for source data + //func_for_mode[ECTOR_ROP_COPY] = comp_func_source_sse2; + func_for_mode[ECTOR_ROP_BLEND] = comp_func_source_over_neon; + } + #endif ++#endif + } ++ diff --cc src/lib/ector/software/ector_drawhelper_private.h index 8f741b5,e446ed2..e446ed2 mode 100644,100644..100755 --- a/src/lib/ector/software/ector_drawhelper_private.h +++ b/src/lib/ector/software/ector_drawhelper_private.h diff --cc src/lib/ector/software/ector_renderer_software_shape.c index 3c2b963,acbc5fa..38b1df4 --- a/src/lib/ector/software/ector_renderer_software_shape.c +++ b/src/lib/ector/software/ector_renderer_software_shape.c @@@ -31,6 -31,8 +31,8 @@@ typedef struct _Outlin }Outline; -#define TO_FT_COORD(x) ((x) * 64); // to freetype 26.6 coordinate. ++#define TO_FT_COORD(x) ((x) * 64) // to freetype 26.6 coordinate. + static inline void _grow_outline_contour(Outline *outline, int num) { @@@ -171,24 -182,19 +183,19 @@@ static void _outline_cubic_to(Outline * static void _outline_transform(Outline *outline, Eina_Matrix3 *m) { int i; + double x, y; SW_FT_Outline *ft_outline = &outline->ft_outline; -- if (m) ++ if (m && (eina_matrix3_type_get(m) != EINA_MATRIX_TYPE_IDENTITY)) { - double x, y; for (i = 0; i < ft_outline->n_points; i++) { - eina_matrix3_point_transform(m, ft_outline->points[i].x, ft_outline->points[i].y, &x, &y); - ft_outline->points[i].x = (int)(x * 64);// to freetype 26.6 coordinate. - ft_outline->points[i].y = (int)(y * 64); - } - } - else - { - for (i = 0; i < ft_outline->n_points; i++) - { - ft_outline->points[i].x = ft_outline->points[i].x <<6;// to freetype 26.6 coordinate. - ft_outline->points[i].y = ft_outline->points[i].y <<6; + eina_matrix3_point_transform(m, - ft_outline->points[i].x/64,/* convert back to normal coord.*/ - ft_outline->points[i].y/64,/* convert back to normal coord.*/ ++ ft_outline->points[i].x/64.0,/* convert back to normal coord.*/ ++ ft_outline->points[i].y/64.0,/* convert back to normal coord.*/ + &x, &y); + ft_outline->points[i].x = TO_FT_COORD(x); + ft_outline->points[i].y = TO_FT_COORD(y); } } } diff --cc src/lib/ector/software/sw_ft_math.c index 9b3894f,268c875..268c875 mode 100755,100644..100755 --- a/src/lib/ector/software/sw_ft_math.c +++ b/src/lib/ector/software/sw_ft_math.c diff --cc src/lib/edje/Edje_Common.h index fe40935,9d55b18..b867220 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@@ -1864,15 -1767,8 +1771,15 @@@ typedef enum _Edje_Action_Typ EDJE_ACTION_TYPE_PHYSICS_STOP = 22, /**< @since 1.8 @brief Physics stop action value */ EDJE_ACTION_TYPE_PHYSICS_ROT_SET = 23, /**< @since 1.8 @brief Physics rotation set action value */ EDJE_ACTION_TYPE_VIBRATION_SAMPLE = 24, /**< @since 1.10 @brief vibration sample action value */ + // TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + EDJE_ACTION_TYPE_RUN_PLUGIN = 25, - EDJE_ACTION_TYPE_LAST = 26 ++ EDJE_ACTION_TYPE_MO = 26, /**< @since 1.15 @brief Mo action value */ ++ EDJE_ACTION_TYPE_LAST = 27 +#else - EDJE_ACTION_TYPE_LAST = 25 /**< Last action value */ + EDJE_ACTION_TYPE_MO = 25, /**< @since 1.15 @brief Mo action value */ + EDJE_ACTION_TYPE_LAST = 26 /**< Last action value */ +#endif - // - //EDJE_ACTION_TYPE_LAST = 25 /**< Last action value */ } Edje_Action_Type; /** diff --cc src/lib/edje/edje_data.c index 0c84d22,1dc890b..230cd4a --- a/src/lib/edje/edje_data.c +++ b/src/lib/edje/edje_data.c @@@ -1,14 -1,9 +1,14 @@@ #include "edje_private.h" - EAPI Eet_Data_Descriptor *_edje_edd_edje_file = NULL; - EAPI Eet_Data_Descriptor *_edje_edd_edje_part_collection = NULL; + EAPI Eet_Data_Descriptor * _edje_edd_edje_file = NULL; + EAPI Eet_Data_Descriptor * _edje_edd_edje_part_collection = NULL; Eet_Data_Descriptor *_edje_edd_edje_string = NULL; +// TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN +Eet_Data_Descriptor *_edje_edd_edje_plugin = NULL; +#endif +// Eet_Data_Descriptor *_edje_edd_edje_style = NULL; Eet_Data_Descriptor *_edje_edd_edje_style_tag = NULL; Eet_Data_Descriptor *_edje_edd_edje_color_class = NULL; @@@ -452,12 -551,11 +573,16 @@@ _edje_edd_init(void EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_file, Edje_File, "base_scale", base_scale, EDJE_T_FLOAT); EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "external_dir", external_dir, _edje_edd_edje_external_directory); EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "image_dir", image_dir, _edje_edd_edje_image_directory); + EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "model_dir", model_dir, _edje_edd_edje_model_directory); EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "sound_dir", sound_dir, _edje_edd_edje_sound_directory); + // TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_file, Edje_File, "plugins", plugins, _edje_edd_edje_plugin); +#endif + // + EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "mo_dir", mo_dir, _edje_edd_edje_mo_directory); + EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "filter_dir", filter_dir, _edje_edd_edje_filter_directory); + EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_file, Edje_File, "vibration_dir", vibration_dir, _edje_edd_edje_vibration_directory); EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_file, Edje_File, "styles", styles, _edje_edd_edje_style); EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_file, Edje_File, "color_classes", color_classes, _edje_edd_edje_color_class); diff --cc src/lib/edje/edje_edit.c index 728ce77,8d09e45..2fa00ed --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@@ -10960,50 -11131,94 +11131,130 @@@ _edje_generate_source_of_state(Evas_Obj if (rp->part->type == EDJE_PART_TYPE_TEXT || rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) { - Edje_Part_Description_Text *txt; + Edje_Part_Description_Text *txt; + + txt = (Edje_Part_Description_Text *)pd; + + if (txt->text.color3.r != 0 || txt->text.color3.g != 0 || + txt->text.color3.b != 0 || txt->text.color3.a != 128) + BUF_APPENDF(I5 "color3: %d %d %d %d;\n", + txt->text.color3.r, txt->text.color3.g, txt->text.color3.b, txt->text.color3.a); + } + + if (rp->part->type == EDJE_PART_TYPE_BOX) + { + Edje_Part_Description_Box *box; + + box = (Edje_Part_Description_Box *)pd; + + if ((box->box.layout && box->box.alt_layout) || + box->box.align.x != 0.5 || box->box.align.y != 0.5 || + box->box.padding.x != 0 || box->box.padding.y != 0 || + !box->box.min.h || !box->box.min.v) + { + BUF_APPEND(I5 "box {\n"); + + if (box->box.layout && box->box.alt_layout) + BUF_APPENDF(I6 "layout: \"%s\" \"%s\";\n", box->box.layout, box->box.alt_layout); + else if (!box->box.layout && box->box.alt_layout) + BUF_APPENDF(I6 "layout: \"horizontal\" \"%s\";\n", box->box.alt_layout); + else if (box->box.layout && !box->box.alt_layout) + BUF_APPENDF(I6 "layout: \"%s\";\n", box->box.layout); + + if (box->box.align.x != 0.5 || box->box.align.y != 0.5) + _edje_source_with_double_values_append(I6 "align", 2, + TO_DOUBLE(box->box.align.x), + TO_DOUBLE(box->box.align.y), + buf, &ret); + + if (box->box.padding.x != 0 || box->box.padding.y != 0) + BUF_APPENDF(I6 "padding: %d %d;\n", box->box.padding.x, box->box.padding.y); + + if (box->box.min.h || box->box.min.v) + BUF_APPENDF(I6 "min: %d %d;\n", box->box.min.h, box->box.min.v); + + BUF_APPEND(I5 "}\n"); + } + } + + if (rp->part->type == EDJE_PART_TYPE_TABLE) + { + Edje_Part_Description_Table *table; + + table = (Edje_Part_Description_Table *)pd; + + if ((table->table.homogeneous != EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE) || + table->table.align.x != 0.5 || table->table.align.y != 0.5 || + table->table.padding.x != 0 || table->table.padding.y != 0 || + !table->table.min.h || !table->table.min.v) + { + BUF_APPEND(I5 "table {\n"); + + switch (table->table.homogeneous) + { + case EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE: + { + BUF_APPENDF(I6 "homogeneous: TABLE;\n"); + break; + } + + case EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM: + { + BUF_APPENDF(I6 "homogeneous: ITEM;\n"); + break; + } + } + + if (table->table.align.x != 0.5 || table->table.align.y != 0.5) + _edje_source_with_double_values_append(I6 "align", 2, + TO_DOUBLE(table->table.align.x), + TO_DOUBLE(table->table.align.y), + buf, &ret); + + if (table->table.padding.x != 0 || table->table.padding.y != 0) + BUF_APPENDF(I6 "padding: %d %d;\n", table->table.padding.x, table->table.padding.y); - txt = (Edje_Part_Description_Text *) pd; + if (table->table.min.h || table->table.min.v) + BUF_APPENDF(I6 "min: %d %d;\n", table->table.min.h, table->table.min.v); - if (txt->text.color3.r != 0 || txt->text.color3.g != 0 || - txt->text.color3.b != 0 || txt->text.color3.a != 128) - BUF_APPENDF(I5"color3: %d %d %d %d;\n", - txt->text.color3.r, txt->text.color3.g, txt->text.color3.b, txt->text.color3.a); + BUF_APPEND(I5 "}\n"); + } + } + + if (rp->part->type == EDJE_PART_TYPE_BOX) + { + Edje_Part_Description_Box *box; + + box = (Edje_Part_Description_Box *) pd; + + if ((box->box.layout && box->box.alt_layout) || + box->box.align.x != 0.5 || box->box.align.y != 0.5 || + box->box.padding.x != 0 || box->box.padding.y != 0 || + !box->box.min.h || !box->box.min.v) + { + BUF_APPEND(I5"box {\n"); + + if (box->box.layout && box->box.alt_layout) + BUF_APPENDF(I6"layout: \"%s\" \"%s\";\n", box->box.layout, box->box.alt_layout); + else if (!box->box.layout && box->box.alt_layout) + BUF_APPENDF(I6"layout: \"horizontal\" \"%s\";\n", box->box.alt_layout); + else if (box->box.layout && !box->box.alt_layout) + BUF_APPENDF(I6"layout: \"%s\";\n", box->box.layout); + + if (box->box.align.x != 0.5 || box->box.align.y != 0.5) + _edje_source_with_double_values_append(I6"align", 2, + TO_DOUBLE(box->box.align.x), + TO_DOUBLE(box->box.align.y), + buf, &ret); + + if (box->box.padding.x != 0 || box->box.padding.y != 0) + BUF_APPENDF(I6"padding: %d %d;\n", box->box.padding.y, box->box.padding.y); + + if (box->box.min.h || box->box.min.v) + BUF_APPENDF(I6"min: %d %d;\n", box->box.min.h, box->box.min.v); + + BUF_APPEND(I5"}\n"); + } } //Rel1 diff --cc src/lib/edje/edje_load.c index 3ee1504,f79072c..0de791d --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@@ -1535,21 -1730,20 +1730,35 @@@ _edje_file_free(Edje_File *edf free(edf->vibration_dir); } + // TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + Edje_Plugin *plugin; + EINA_LIST_FREE(edf->plugins, plugin) + { + if (edf->free_strings) + { + if (plugin->name) eina_stringshare_del(plugin->name); + if (plugin->source) eina_stringshare_del(plugin->source); + if (plugin->param)eina_stringshare_del(plugin->param); + } + free(plugin); + } +#endif + // + if (edf->mo_dir) + { + unsigned int i; + if (edf->free_strings) + { + for (i = 0; i < edf->mo_dir->mo_entries_count; ++i) + { + eina_stringshare_del(edf->mo_dir->mo_entries[i].locale); + eina_stringshare_del(edf->mo_dir->mo_entries[i].mo_src); + } + } + free(edf->mo_dir->mo_entries); + free(edf->mo_dir); + } if (edf->external_dir) { @@@ -1590,16 -1785,11 +1800,16 @@@ _edje_program_free(Edje_Program *pr, Ei if (pr->state2) eina_stringshare_del(pr->state2); if (pr->sample_name) eina_stringshare_del(pr->sample_name); if (pr->tone_name) eina_stringshare_del(pr->tone_name); + // TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + if (pr->plugin_name) eina_stringshare_del(pr->plugin_name); +#endif + // } EINA_LIST_FREE(pr->targets, prt) - free(prt); + free(prt); EINA_LIST_FREE(pr->after, pa) - free(pa); + free(pa); free(pr); } diff --cc src/lib/edje/edje_private.h index c715776,87ecce4..13e7143 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@@ -508,13 -535,10 +540,15 @@@ struct _Edje_Fil Edje_Model_Directory *model_dir; Edje_Sound_Directory *sound_dir; Edje_Vibration_Directory *vibration_dir; + Edje_Mo_Directory *mo_dir; + Edje_Gfx_Filter_Directory *filter_dir; Eina_List *styles; + // TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + Eina_List *plugins; +#endif + // Eina_List *color_classes; Eina_Hash *color_hash; @@@ -2811,12 -2887,15 +2918,21 @@@ void _animation_get(Eo *obj, void *_pd void edje_signal_init(void); void edje_signal_shutdown(void); +// TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN +typedef Eina_Bool (*Edje_Module_Plugin_Run) (const Evas_Object *obj, const char *name, const char *param); +#endif +// + + Eina_Bool _edje_part_mouse_events_get(Edje *ed, Edje_Real_Part *rp); + void _edje_part_mouse_events_set(Edje *ed, Edje_Real_Part *rp, Eina_Bool mouse_events); + Eina_Bool _edje_part_repeat_events_get(Edje *ed, Edje_Real_Part *rp); + void _edje_part_repeat_events_set(Edje *ed, Edje_Real_Part *rp, Eina_Bool repeat_events); + Evas_Event_Flags _edje_part_ignore_flags_get(Edje *ed, Edje_Real_Part *rp); + void _edje_part_ignore_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_Flags ignore_flags); + Evas_Event_Flags _edje_part_mask_flags_get(Edje *ed, Edje_Real_Part *rp); + void _edje_part_mask_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_Flags mask_flags); + #ifdef HAVE_LIBREMIX #include #endif diff --cc src/lib/edje/edje_program.c index b62c568,0c97e21..b8d6675 --- a/src/lib/edje/edje_program.c +++ b/src/lib/edje/edje_program.c @@@ -626,477 -656,499 +656,505 @@@ _edje_program_run(Edje *ed, Edje_Progra switch (pr->action) { case EDJE_ACTION_TYPE_STATE_SET: - if ((pr->tween.time > ZERO) && (!ed->no_anim)) - { - Edje_Running_Program *runp; - - runp = calloc(1, sizeof(Edje_Running_Program)); - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if (rp) - { - if ((rp->object) && (pr->tween.mode & EDJE_TWEEN_MODE_OPT_FROM_CURRENT)) - { - Edje_Calc_Params *tmp; - - tmp = calloc(1, sizeof(Edje_Calc_Params)); - if (!tmp) goto low_mem_current; - tmp->map = eina_cow_alloc(_edje_calc_params_map_cow); + if ((pr->tween.time > ZERO) && (!ed->no_anim)) + { + Edje_Running_Program *runp; + + runp = calloc(1, sizeof(Edje_Running_Program)); + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if (rp) + { + if ((rp->object) && (pr->tween.mode & EDJE_TWEEN_MODE_OPT_FROM_CURRENT)) + { + Edje_Calc_Params *tmp; + + tmp = calloc(1, sizeof(Edje_Calc_Params)); + if (!tmp) goto low_mem_current; + tmp->map = eina_cow_alloc(_edje_calc_params_map_cow); #ifdef HAVE_EPHYSICS - tmp->physics = eina_cow_alloc(_edje_calc_params_physics_cow); + tmp->physics = eina_cow_alloc(_edje_calc_params_physics_cow); #endif - _edje_part_recalc(ed, rp, FLAG_XY, tmp); + _edje_part_recalc(ed, rp, FLAG_XY, tmp); - if (rp->current) - { - eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->current->map); + if (rp->current) + { + eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map); #ifdef HAVE_EPHYSICS - eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->current->physics); + eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics); #endif - free(rp->current); - } - rp->current = tmp; - } - else - { + free(rp->current); + } + rp->current = tmp; + } + else + { low_mem_current: - if (rp->current) - { - eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->current->map); + if (rp->current) + { + eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map); #ifdef HAVE_EPHYSICS - eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->current->physics); + eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics); #endif - free(rp->current); - } - rp->current = NULL; - } - - if (rp->program) - _edje_program_end(ed, rp->program); - _edje_part_description_apply(ed, rp, - rp->param1.description->state.name, - rp->param1.description->state.value, - pr->state, - pr->value); - _edje_part_pos_set(ed, rp, pr->tween.mode, ZERO, - pr->tween.v1, - pr->tween.v2, - pr->tween.v3, - pr->tween.v4); - rp->program = runp; - } - } - } - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) - { - ed->actions = eina_list_append(ed->actions, runp); - goto break_prog; - } - if (!ed->actions) - _edje_animators = eina_list_append(_edje_animators, ed); - ed->actions = eina_list_append(ed->actions, runp); - runp->start_time = ecore_loop_time_get(); - runp->edje = ed; - runp->program = pr; - if (!_edje_timer) - _edje_timer = ecore_animator_add(_edje_timer_cb, NULL); - _edje_anim_count++; - } - else - { - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if (rp) - { - if (rp->program) - _edje_program_end(ed, rp->program); - _edje_part_description_apply(ed, rp, - pr->state, - pr->value, - NULL, - 0.0); - _edje_part_pos_set(ed, rp, pr->tween.mode, ZERO, - pr->tween.v1, - pr->tween.v2, - pr->tween.v3, - pr->tween.v4); - } - } - } - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - - EINA_LIST_FOREACH(pr->after, l, pa) - { - if (pa->id >= 0) - { - pr2 = ed->collection->patterns.table_programs[pa->id % ed->collection->patterns.table_programs_size]; - if (pr2) _edje_program_run(ed, pr2, 0, "", ""); - if (_edje_block_break(ed)) goto break_prog; - } - } - _edje_recalc(ed); - } - break; + free(rp->current); + } + rp->current = NULL; + } + + if (rp->program) + _edje_program_end(ed, rp->program); + _edje_part_description_apply(ed, rp, + rp->param1.description->state.name, + rp->param1.description->state.value, + pr->state, + pr->value); + _edje_part_pos_set(ed, rp, pr->tween.mode, ZERO, + pr->tween.v1, + pr->tween.v2, + pr->tween.v3, + pr->tween.v4); + rp->program = runp; + } + } + } + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) + { + ed->actions = eina_list_append(ed->actions, runp); + goto break_prog; + } + if (!ed->actions) + _edje_animators = eina_list_append(_edje_animators, ed); + ed->actions = eina_list_append(ed->actions, runp); + runp->start_time = ecore_loop_time_get(); + runp->edje = ed; + runp->program = pr; + if (!_edje_timer) + _edje_timer = ecore_animator_add(_edje_timer_cb, NULL); + _edje_anim_count++; + } + else + { + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if (rp) + { + if (rp->program) + _edje_program_end(ed, rp->program); + _edje_part_description_apply(ed, rp, + pr->state, + pr->value, + NULL, + 0.0); + _edje_part_pos_set(ed, rp, pr->tween.mode, ZERO, + pr->tween.v1, + pr->tween.v2, + pr->tween.v3, + pr->tween.v4); + } + } + } + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + + EINA_LIST_FOREACH(pr->after, l, pa) + { + if (pa->id >= 0) + { + pr2 = ed->collection->patterns.table_programs[pa->id % ed->collection->patterns.table_programs_size]; + if (pr2) _edje_program_run(ed, pr2, 0, "", ""); + if (_edje_block_break(ed)) goto break_prog; + } + } + _edje_recalc(ed); + } + break; + case EDJE_ACTION_TYPE_ACTION_STOP: - // _edje_emit(ed, "program,start", pr->name); - EINA_LIST_FOREACH(pr->targets, l, pt) - { - Eina_List *ll; - Edje_Running_Program *runp; - Edje_Pending_Program *pp; - - for (ll = ed->actions; ll; ) - { - runp = ll->data; - ll = ll->next; - if (pt->id == runp->program->id) - { - _edje_program_end(ed, runp); - // goto done; - } - } - for (ll = ed->pending_actions; ll; ) - { - pp = ll->data; - ll = ll->next; - if (pt->id == pp->program->id) - { - ed->pending_actions = eina_list_remove(ed->pending_actions, pp); - ecore_timer_del(pp->timer); - free(pp); - // goto done; - } - } - // done: - // continue; - } - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - break; + // _edje_emit(ed, "program,start", pr->name); + EINA_LIST_FOREACH(pr->targets, l, pt) + { + Eina_List *ll; + Edje_Running_Program *runp; + Edje_Pending_Program *pp; + + for (ll = ed->actions; ll; ) + { + runp = ll->data; + ll = ll->next; + if (pt->id == runp->program->id) + { + _edje_program_end(ed, runp); + // goto done; + } + } + for (ll = ed->pending_actions; ll; ) + { + pp = ll->data; + ll = ll->next; + if (pt->id == pp->program->id) + { + ed->pending_actions = eina_list_remove(ed->pending_actions, pp); + ecore_timer_del(pp->timer); + free(pp); + // goto done; + } + } + // done: + // continue; + } + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + break; + case EDJE_ACTION_TYPE_SIGNAL_EMIT: - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; - if (pr->targets) - { - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id < 0) continue; - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if (!rp) continue; - if (!_edje_emit_aliased(ed, rp->part->name, pr->state, pr->state2)) - { - Eina_Bool broadcast; - - broadcast = _edje_emit_child(ed, rp, rp->part->name, pr->state, pr->state2); - _edje_emit_send(ed, broadcast, pr->state, pr->state2, NULL, NULL); - } - } - } - else - _edje_emit(ed, pr->state, pr->state2); - if (_edje_block_break(ed)) goto break_prog; - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - break; + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; + if (pr->targets) + { + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id < 0) continue; + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if (!rp) continue; + if (!_edje_emit_aliased(ed, rp->part->name, pr->state, pr->state2)) + { + Eina_Bool broadcast; + + broadcast = _edje_emit_child(ed, rp, rp->part->name, pr->state, pr->state2); + _edje_emit_send(ed, broadcast, pr->state, pr->state2, NULL, NULL); + } + } + } + else + _edje_emit(ed, pr->state, pr->state2); + if (_edje_block_break(ed)) goto break_prog; + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + break; + case EDJE_ACTION_TYPE_DRAG_VAL_SET: - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if ((rp) && (rp->drag) && (rp->drag->down.count == 0)) - { - rp->drag->val.x = pr->value; - rp->drag->val.y = pr->value2; - if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0; - else if (rp->drag->val.x > 1.0) rp->drag->val.x = 1.0; - if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0; - else if (rp->drag->val.y > 1.0) rp->drag->val.y = 1.0; - _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); - _edje_emit(ed, "drag,set", rp->part->name); - if (_edje_block_break(ed)) goto break_prog; - } - } - } - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - break; + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if ((rp) && (rp->drag) && (rp->drag->down.count == 0)) + { + rp->drag->val.x = pr->value; + rp->drag->val.y = pr->value2; + if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0; + else if (rp->drag->val.x > 1.0) + rp->drag->val.x = 1.0; + if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0; + else if (rp->drag->val.y > 1.0) + rp->drag->val.y = 1.0; + _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); + _edje_emit(ed, "drag,set", rp->part->name); + if (_edje_block_break(ed)) goto break_prog; + } + } + } + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + break; + case EDJE_ACTION_TYPE_DRAG_VAL_STEP: - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if ((rp) && (rp->drag) && (rp->drag->down.count == 0)) - { - rp->drag->val.x += pr->value * rp->drag->step.x * rp->part->dragable.x; - rp->drag->val.y += pr->value2 * rp->drag->step.y * rp->part->dragable.y; - if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0; - else if (rp->drag->val.x > 1.0) rp->drag->val.x = 1.0; - if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0; - else if (rp->drag->val.y > 1.0) rp->drag->val.y = 1.0; - _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); - _edje_emit(ed, "drag,step", rp->part->name); - if (_edje_block_break(ed)) goto break_prog; - } - } - } - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - break; + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if ((rp) && (rp->drag) && (rp->drag->down.count == 0)) + { + rp->drag->val.x += pr->value * rp->drag->step.x * rp->part->dragable.x; + rp->drag->val.y += pr->value2 * rp->drag->step.y * rp->part->dragable.y; + if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0; + else if (rp->drag->val.x > 1.0) + rp->drag->val.x = 1.0; + if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0; + else if (rp->drag->val.y > 1.0) + rp->drag->val.y = 1.0; + _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); + _edje_emit(ed, "drag,step", rp->part->name); + if (_edje_block_break(ed)) goto break_prog; + } + } + } + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + break; + case EDJE_ACTION_TYPE_DRAG_VAL_PAGE: + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if ((rp) && (rp->drag) && (rp->drag->down.count == 0)) + { + rp->drag->val.x += pr->value * rp->drag->page.x * rp->part->dragable.x; + rp->drag->val.y += pr->value2 * rp->drag->page.y * rp->part->dragable.y; + if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0; + else if (rp->drag->val.x > 1.0) + rp->drag->val.x = 1.0; + if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0; + else if (rp->drag->val.y > 1.0) + rp->drag->val.y = 1.0; + _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); + _edje_emit(ed, "drag,page", rp->part->name); + if (_edje_block_break(ed)) goto break_prog; + } + } + } + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + break; + + case EDJE_ACTION_TYPE_SCRIPT: + { + char fname[128]; + // _edje_emit(ed, "program,start", pr->name); if (_edje_block_break(ed)) goto break_prog; - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if ((rp) && (rp->drag) && (rp->drag->down.count == 0)) - { - rp->drag->val.x += pr->value * rp->drag->page.x * rp->part->dragable.x; - rp->drag->val.y += pr->value2 * rp->drag->page.y * rp->part->dragable.y; - if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0; - else if (rp->drag->val.x > 1.0) rp->drag->val.x = 1.0; - if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0; - else if (rp->drag->val.y > 1.0) rp->drag->val.y = 1.0; - _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); - _edje_emit(ed, "drag,page", rp->part->name); - if (_edje_block_break(ed)) goto break_prog; - } - } - } + snprintf(fname, sizeof(fname), "_p%i", pr->id); + _edje_embryo_test_run(ed, fname, ssig, ssrc); // _edje_emit(ed, "program,stop", pr->name); if (_edje_block_break(ed)) goto break_prog; - break; - case EDJE_ACTION_TYPE_SCRIPT: - { - char fname[128]; - - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; - snprintf(fname, sizeof(fname), "_p%i", pr->id); - _edje_embryo_test_run(ed, fname, ssig, ssrc); - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - _edje_recalc_do(ed); - } - break; + _edje_recalc_do(ed); + } + break; + case EDJE_ACTION_TYPE_FOCUS_SET: - if (!pr->targets) - { - if (ed->focused_part) - _edje_emit(ed, "focus,part,out", - ed->focused_part->part->name); - ed->focused_part = NULL; - } - else - { - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if (rp) - { - if (ed->focused_part != rp) - { - if (ed->focused_part) - _edje_emit(ed, "focus,part,out", - ed->focused_part->part->name); - ed->focused_part = rp; - _edje_emit(ed, "focus,part,in", - ed->focused_part->part->name); - } - } - } - } - } - break; + if (!pr->targets) + { + if (ed->focused_part) + _edje_emit(ed, "focus,part,out", + ed->focused_part->part->name); + ed->focused_part = NULL; + } + else + { + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if (rp) + { + if (ed->focused_part != rp) + { + if (ed->focused_part) + _edje_emit(ed, "focus,part,out", + ed->focused_part->part->name); + ed->focused_part = rp; + _edje_emit(ed, "focus,part,in", + ed->focused_part->part->name); + } + } + } + } + } + break; + case EDJE_ACTION_TYPE_FOCUS_OBJECT: - if (!pr->targets) - { - Evas_Object *focused; - - focused = evas_focus_get(evas_object_evas_get(ed->obj)); - if (focused) - { - unsigned int i; - - /* Check if the current swallowed object is one of my child. */ - for (i = 0; i < ed->table_parts_size; ++i) - { - rp = ed->table_parts[i]; - if ((rp) && - ((rp->type == EDJE_RP_TYPE_SWALLOW) && - (rp->typedata.swallow)) && - (rp->typedata.swallow->swallowed_object == focused)) - { - evas_object_focus_set(focused, EINA_FALSE); - break; - } - } - } - } - else - { - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if (rp && - ((rp->type == EDJE_RP_TYPE_SWALLOW) && - (rp->typedata.swallow)) && - (rp->typedata.swallow->swallowed_object)) - evas_object_focus_set(rp->typedata.swallow->swallowed_object, EINA_TRUE); - } - } - } - break; + if (!pr->targets) + { + Evas_Object *focused; + + focused = evas_focus_get(evas_object_evas_get(ed->obj)); + if (focused) + { + unsigned int i; + + /* Check if the current swallowed object is one of my child. */ + for (i = 0; i < ed->table_parts_size; ++i) + { + rp = ed->table_parts[i]; + if ((rp) && + ((rp->type == EDJE_RP_TYPE_SWALLOW) && + (rp->typedata.swallow)) && + (rp->typedata.swallow->swallowed_object == focused)) + { + evas_object_focus_set(focused, EINA_FALSE); + break; + } + } + } + } + else + { + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if (rp && + ((rp->type == EDJE_RP_TYPE_SWALLOW) && + (rp->typedata.swallow)) && + (rp->typedata.swallow->swallowed_object)) + evas_object_focus_set(rp->typedata.swallow->swallowed_object, EINA_TRUE); + } + } + } + break; + case EDJE_ACTION_TYPE_SOUND_SAMPLE: - if (_edje_block_break(ed)) - goto break_prog; - _edje_multisense_internal_sound_sample_play(ed, pr->sample_name, pr->speed, pr->channel); - break; + if (_edje_block_break(ed)) + goto break_prog; + _edje_multisense_internal_sound_sample_play(ed, pr->sample_name, pr->speed, pr->channel); + break; + case EDJE_ACTION_TYPE_SOUND_TONE: - if (_edje_block_break(ed)) - goto break_prog; - _edje_multisense_internal_sound_tone_play(ed, pr->tone_name, pr->duration, pr->channel); + if (_edje_block_break(ed)) + goto break_prog; + _edje_multisense_internal_sound_tone_play(ed, pr->tone_name, pr->duration, pr->channel); + break; + // TIZEN_ONLY(20150110): Add plugin keyword. +#ifdef PLUGIN + case EDJE_ACTION_TYPE_RUN_PLUGIN: + // DO NOTHING! break; - +#endif + // case EDJE_ACTION_TYPE_VIBRATION_SAMPLE: - if (_edje_block_break(ed)) - goto break_prog; - _edje_multisense_internal_vibration_sample_play(ed, pr->vibration_name, pr->vibration_repeat); - break; + if (_edje_block_break(ed)) + goto break_prog; + _edje_multisense_internal_vibration_sample_play(ed, pr->vibration_name, pr->vibration_repeat); + break; + case EDJE_ACTION_TYPE_PARAM_COPY: - { - Edje_Real_Part *src_part, *dst_part; + { + Edje_Real_Part *src_part, *dst_part; - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; - src_part = ed->table_parts[pr->param.src % ed->table_parts_size]; - dst_part = ed->table_parts[pr->param.dst % ed->table_parts_size]; - _edje_param_copy(ed, src_part, pr->state, dst_part, pr->state2); + src_part = ed->table_parts[pr->param.src % ed->table_parts_size]; + dst_part = ed->table_parts[pr->param.dst % ed->table_parts_size]; + _edje_param_copy(ed, src_part, pr->state, dst_part, pr->state2); + + if (_edje_block_break(ed)) goto break_prog; + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + } + break; - if (_edje_block_break(ed)) goto break_prog; - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - } - break; case EDJE_ACTION_TYPE_PARAM_SET: - { - Edje_Real_Part *part; + { + Edje_Real_Part *part; - // _edje_emit(ed, "program,start", pr->name); - if (_edje_block_break(ed)) goto break_prog; + // _edje_emit(ed, "program,start", pr->name); + if (_edje_block_break(ed)) goto break_prog; - part = ed->table_parts[pr->param.dst % ed->table_parts_size]; - _edje_param_set(ed, part, pr->state, pr->state2); + part = ed->table_parts[pr->param.dst % ed->table_parts_size]; + _edje_param_set(ed, part, pr->state, pr->state2); + + if (_edje_block_break(ed)) goto break_prog; + // _edje_emit(ed, "program,stop", pr->name); + if (_edje_block_break(ed)) goto break_prog; + } + break; - if (_edje_block_break(ed)) goto break_prog; - // _edje_emit(ed, "program,stop", pr->name); - if (_edje_block_break(ed)) goto break_prog; - } - break; #ifdef HAVE_EPHYSICS case EDJE_ACTION_TYPE_PHYSICS_IMPULSE: - if (!_edje_physics_action_set(ed, pr, ephysics_body_central_impulse_apply)) - goto break_prog; - break; + if (!_edje_physics_action_set(ed, pr, ephysics_body_central_impulse_apply)) + goto break_prog; + break; + case EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE: - if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_impulse_apply)) - goto break_prog; - break; + if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_impulse_apply)) + goto break_prog; + break; + case EDJE_ACTION_TYPE_PHYSICS_FORCE: - if (!_edje_physics_action_set(ed, pr, ephysics_body_central_force_apply)) - goto break_prog; - break; + if (!_edje_physics_action_set(ed, pr, ephysics_body_central_force_apply)) + goto break_prog; + break; + case EDJE_ACTION_TYPE_PHYSICS_TORQUE: - if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_apply)) - goto break_prog; - break; + if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_apply)) + goto break_prog; + break; + case EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR: - if (_edje_block_break(ed)) - goto break_prog; - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if ((rp) && (rp->body)) - ephysics_body_forces_clear(rp->body); - } - } - break; + if (_edje_block_break(ed)) + goto break_prog; + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if ((rp) && (rp->body)) + ephysics_body_forces_clear(rp->body); + } + } + break; + case EDJE_ACTION_TYPE_PHYSICS_VEL_SET: - if (!_edje_physics_action_set(ed, pr, ephysics_body_linear_velocity_set)) - goto break_prog; - break; + if (!_edje_physics_action_set(ed, pr, ephysics_body_linear_velocity_set)) + goto break_prog; + break; + case EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET: - if (!_edje_physics_action_set(ed, pr, ephysics_body_angular_velocity_set)) - goto break_prog; - break; + if (!_edje_physics_action_set(ed, pr, ephysics_body_angular_velocity_set)) + goto break_prog; + break; + case EDJE_ACTION_TYPE_PHYSICS_STOP: - if (_edje_block_break(ed)) - goto break_prog; - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if ((rp) && (rp->body)) - ephysics_body_stop(rp->body); - } - } - break; + if (_edje_block_break(ed)) + goto break_prog; + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if ((rp) && (rp->body)) + ephysics_body_stop(rp->body); + } + } + break; + case EDJE_ACTION_TYPE_PHYSICS_ROT_SET: - if (_edje_block_break(ed)) - goto break_prog; - EINA_LIST_FOREACH(pr->targets, l, pt) - { - if (pt->id >= 0) - { - rp = ed->table_parts[pt->id % ed->table_parts_size]; - if ((rp) && (rp->body)) - { - EPhysics_Quaternion quat; - ephysics_quaternion_set(&quat, pr->physics.x, - pr->physics.y, pr->physics.z, - pr->physics.w); - ephysics_quaternion_normalize(&quat); - ephysics_body_rotation_set(rp->body, &quat); - } - } - } - break; + if (_edje_block_break(ed)) + goto break_prog; + EINA_LIST_FOREACH(pr->targets, l, pt) + { + if (pt->id >= 0) + { + rp = ed->table_parts[pt->id % ed->table_parts_size]; + if ((rp) && (rp->body)) + { + EPhysics_Quaternion quat; + ephysics_quaternion_set(&quat, pr->physics.x, + pr->physics.y, pr->physics.z, + pr->physics.w); + ephysics_quaternion_normalize(&quat); + ephysics_body_rotation_set(rp->body, &quat); + } + } + } + break; + #endif default: - // _edje_emit(ed, "program,start", pr->name); - // _edje_emit(ed, "program,stop", pr->name); - break; + // _edje_emit(ed, "program,start", pr->name); + // _edje_emit(ed, "program,stop", pr->name); + break; } if (!((pr->action == EDJE_ACTION_TYPE_STATE_SET) /* hmm this fucks somethgin up. must look into it later */ diff --cc src/lib/efl/interfaces/efl_gfx_shape.c index 15a93df,7533040..741e819 --- a/src/lib/efl/interfaces/efl_gfx_shape.c +++ b/src/lib/efl/interfaces/efl_gfx_shape.c @@@ -1178,7 -829,9 +1182,12 @@@ static voi _efl_gfx_shape_append_circle(Eo *obj, Efl_Gfx_Shape_Data *pd, double xc, double yc, double radius) { + _efl_gfx_shape_append_arc(obj, pd, xc - radius, yc - radius, 2*radius, 2*radius, 0, 360); ++#if 0 + _efl_gfx_shape_append_move_to(obj, pd, xc - radius, yc); + _efl_gfx_shape_append_arc_to(obj, pd, xc + radius, yc, radius, radius, 0, EINA_TRUE, EINA_TRUE); + _efl_gfx_shape_append_arc_to(obj, pd, xc - radius, yc, radius, radius, 0, EINA_TRUE, EINA_TRUE); ++#endif } static void @@@ -1186,17 -839,22 +1195,35 @@@ _efl_gfx_shape_append_rect(Eo *obj, Efl double x, double y, double w, double h, double rx, double ry) { + // clamp the rx and ry radius value. + rx = 2*rx; + ry = 2*ry; + if (rx > w) rx = w; + if (ry > h) ry = h; + + _efl_gfx_shape_append_move_to(obj, pd, x, y + h/2); + _efl_gfx_shape_append_arc(obj, pd, x, y, rx, ry, 180, -90); + _efl_gfx_shape_append_arc(obj, pd, x + w - rx, y, rx, ry, 90, -90); + _efl_gfx_shape_append_arc(obj, pd, x + w - rx, y + h - ry, rx, ry, 0, -90); + _efl_gfx_shape_append_arc(obj, pd, x, y + h - ry, rx, ry, 270, -90); ++#if 0 + // clamp the x and y radius value. + if (rx > w/2) rx = w/2; + if (ry > h/2) ry = h/2; + + _efl_gfx_shape_append_move_to(obj, pd, x, y + ry); + // Top left corner + _efl_gfx_shape_append_arc_to(obj, pd, x + rx, y, rx, ry, 0, EINA_FALSE, EINA_TRUE); + _efl_gfx_shape_append_line_to(obj, pd, x + w - rx, y); + // Top right corner + _efl_gfx_shape_append_arc_to(obj, pd, x + w, y + ry, rx, ry, 0, EINA_FALSE, EINA_TRUE); + _efl_gfx_shape_append_line_to(obj, pd, x + w, y + h - ry); + // Bottom right corner + _efl_gfx_shape_append_arc_to(obj, pd, x + w - rx, y + h, rx, ry, 0, EINA_FALSE, EINA_TRUE); + _efl_gfx_shape_append_line_to(obj, pd, x + rx, y + h); + // Bottom left corner + _efl_gfx_shape_append_arc_to(obj, pd, x, y + h - ry, rx, ry, 0, EINA_FALSE, EINA_TRUE); ++#endif _efl_gfx_shape_append_close(obj, pd); } diff --cc src/lib/efl/interfaces/efl_gfx_shape.eo index b4ca763,959b413..ab6b04b --- a/src/lib/efl/interfaces/efl_gfx_shape.eo +++ b/src/lib/efl/interfaces/efl_gfx_shape.eo @@@ -300,65 -285,48 +285,63 @@@ mixin Efl.Gfx.Shap } } append_arc_to { - /*@ - Append an arc that connects from the current point int the point list + [[Append an arc that connects from the current point int the point list to the given point (x,y). The arc is defined by the given radius in - x-direction (rx) and radius in y direction (ry) . + x-direction (rx) and radius in y direction (ry). - @note Use this api if you know the end point's of the arc otherwise - use more convenient function efl_gfx_path_append_arc() + Use this api if you know the end point's of the arc otherwise use + more convenient function @.append_arc_to. - @see efl_gfx_path_append_arc() @since 1.14 - */ + ]] params { - @in double x; /*@ X co-ordinate of end point of the arc.*/ - @in double y; /*@ Y co-ordinate of end point of the arc.*/ - @in double rx; /*@ radius of arc in x direction.*/ - @in double ry; /*@ radius of arc in y direction.*/ - @in double angle; /*@ x-axis rotation , normally 0.*/ - @in bool large_arc; /*@ Defines whether to draw the larger arc or smaller arc joining two point.*/ - @in bool sweep; /*@ Defines whether the arc will be drawn counter-clockwise or clockwise from current point to the end point taking into account the large_arc property.*/ + @in x: double; [[X co-ordinate of end point of the arc.]] + @in y: double; [[Y co-ordinate of end point of the arc.]] + @in rx: double; [[radius of arc in x direction.]] + @in ry: double; [[radius of arc in y direction.]] + @in angle: double; [[x-axis rotation , normally 0.]] + @in large_arc: bool; [[Defines whether to draw the larger arc or + smaller arc joining two point.]] + @in sweep: bool; [[Defines whether the arc will be drawn + counter-clockwise or clockwise from current point + to the end point taking into account the large_arc + property.]] } } + append_arc { - /*@ - Append an arc that enclosed in the given rectangle (x, y, w, h). ++ [[Append an arc that enclosed in the given rectangle (x, y, w, h). + The angle is defined in counter clock wise , use -ve angle for clockwise arc. + + @since 1.14 - */ ++ ]] + params { - @in double x; /*@ X co-ordinate of the rect.*/ - @in double y; /*@ Y co-ordinate of the rect.*/ - @in double w; /*@ width of the rect.*/ - @in double h; /*@ height of the rect.*/ - @in double start_angle; /*@ Angle at which the arc will start*/ - @in double sweep_length; /*@ Length of the arc.*/ ++ @in x: double; [[@ X co-ordinate of the rect.]] ++ @in y: double; [[@ Y co-ordinate of the rect.]] ++ @in w: double; [[@ width of the rect.]] ++ @in h: double; [[@ height of the rect.]] ++ @in start_angle: double; [[@ Angle at which the arc will start]] ++ @in sweep_length: double; [[@ Length of the arc.]] + } + } - append_close { - /*@ - Closes the current subpath by drawing a line to the beginning of the subpath, - automatically starting a new path. The current point of the new path is - (0, 0). + [[Closes the current subpath by drawing a line to the beginning of the + subpath, automatically starting a new path. The current point of the + new path is (0, 0). - @note If the subpath does not contain any points, this function does nothing. + If the subpath does not contain any points, this function does nothing. @since 1.14 - */ + ]] } append_circle { - /*@ - Append a circle with given center and radius. + [[Append a circle with given center and radius. @since 1.14 - */ + ]] params { - @in double x; /*@ X co-ordinate of the center of the circle.*/ - @in double y; /*@ Y co-ordinate of the center of the circle.*/ - @in double radius; /*@ radius of the circle.*/ + @in x: double; [[X co-ordinate of the center of the circle.]] + @in y: double; [[Y co-ordinate of the center of the circle.]] + @in radius: double; [[radius of the circle.]] } } append_rect { diff --cc src/lib/evas/Evas_Common.h index 6be6052,5da6437..af8f5ca mode 100755,100644..100755 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@@ -479,11 -306,8 +306,9 @@@ typedef enum _Evas_Native_Surface_Typ EVAS_NATIVE_SURFACE_X11, /**< X Window system based type. pixmap id or visual of the pixmap */ EVAS_NATIVE_SURFACE_OPENGL, /**< OpenGL system based type. texture or framebuffer id*/ EVAS_NATIVE_SURFACE_WL, /**< Wayland system based type. buffer of surface */ - // TIZEN ONLY (20150112) : NOT FIXED - EVAS_NATIVE_SURFACE_TIZEN, - EVAS_NATIVE_SURFACE_TBM, /**< Tizen system based type. This is used for tizen buffer manager. */ - EVAS_NATIVE_SURFACE_EVASGL, /**< Evas GL based type. evas gl surface */ - // ++ EVAS_NATIVE_SURFACE_TIZEN, /**< @deprecated Kept for ABI compatibility. DO NOT USE. */ + EVAS_NATIVE_SURFACE_TBM, /**< Tizen system based type. tbm surface @since 1.14 */ + EVAS_NATIVE_SURFACE_EVASGL, /**< Evas GL based type. evas gl surface @since 1.14 */ } Evas_Native_Surface_Type; /** diff --cc src/lib/evas/Evas_Legacy.h index d4b8c0f,cc61fbd..2e1aff4 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@@ -567,87 -567,242 +567,322 @@@ EAPI void evas_object_show( */ EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1); + /** + * + * Sets the general/main color of the given Evas object to the given + * one. + * + * @see evas_object_color_get() (for an example) + * @note These color values are expected to be premultiplied by @p a. + * + * @ingroup Evas_Object_Group_Basic + * + * @param[in] r The red component of the given color. + * @param[in] g The green component of the given color. + * @param[in] b The blue component of the given color. + * @param[in] a The alpha component of the given color. + */ + EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a); + + /** + * + * Retrieves the general/main color of the given Evas object. + * + * Retrieves the “main” color's RGB component (and alpha channel) + * values, which range from 0 to 255. For the alpha channel, + * which defines the object's transparency level, 0 means totally + * transparent, while 255 means opaque. These color values are + * premultiplied by the alpha value. + * + * Usually you’ll use this attribute for text and rectangle objects, + * where the “main” color is their unique one. If set for objects + * which themselves have colors, like the images one, those colors get + * modulated by this one. + * + * @note All newly created Evas rectangles get the default color + * values of 255 255 255 255 (opaque white). + * + * @note Use @c NULL pointers on the components you're not interested + * in: they'll be ignored by the function. + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip int alpha, r, g, b; + * @until return + * + * See the full @ref Example_Evas_Object_Manipulation "example". + * + * @ingroup Evas_Object_Group_Basic + * + * @param[out] r The red component of the given color. + * @param[out] g The green component of the given color. + * @param[out] b The blue component of the given color. + * @param[out] a The alpha component of the given color. + */ + EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a); + + /** + * + * Move the given Evas object to the given location inside its canvas' viewport. + * + * @param[in] x in + * @param[in] y in + */ + EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y); + + /** + * + * Changes the size of the given Evas object. + * + * @param[in] w in + * @param[in] h in + */ + EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); + + /** + * + * Retrieves whether or not the given Evas object is visible. + * + */ + EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj); + + /** + * + * Sets the layer of its canvas that the given object will be part of. + * + * If you don't use this function, you'll be dealing with an @b unique + * layer of objects, the default one. Additional layers are handy when + * you don't want a set of objects to interfere with another set with + * regard to @b stacking. Two layers are completely disjoint in that + * matter. + * + * This is a low-level function, which you'd be using when something + * should be always on top, for example. + * + * @warning Be careful, it doesn't make sense to change the layer of + * smart objects' children. Smart objects have a layer of their own, + * which should contain all their children objects. + * + * @see evas_object_layer_get() + * + * @param[in] l The number of the layer to place the object on. + Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX. + */ + EAPI void evas_object_layer_set(Evas_Object *obj, short l); + + /** + * + * Retrieves the layer of its canvas that the given object is part of. + * + * @return Number of its layer + * + * @see evas_object_layer_set() + * + */ + EAPI short evas_object_layer_get(const Evas_Object *obj); + + /** + * + * Get the Evas object stacked right below @p obj + * + * @return the #Evas_Object directly below @p obj, if any, or @c NULL, + * if none + * + * This function will traverse layers in its search, if there are + * objects on layers below the one @p obj is placed at. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_below_get() + * + */ + EAPI Evas_Object *evas_object_below_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; + + /** + * + * Get the Evas object stacked right above @p obj + * + * @return the #Evas_Object directly above @p obj, if any, or @c NULL, + * if none + * + * This function will traverse layers in its search, if there are + * objects on layers above the one @p obj is placed at. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_below_get() + * + */ + EAPI Evas_Object *evas_object_above_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; + + /** + * + * Stack @p obj immediately below @p below + * + * Objects, in a given canvas, are stacked in the order they get added + * to it. This means that, if they overlap, the highest ones will + * cover the lowest ones, in that order. This function is a way to + * change the stacking order for the objects. + * + * This function is intended to be used with objects belonging to + * the same layer in a given canvas, otherwise it will fail (and + * accomplish nothing). + * + * If you have smart objects on your canvas and @p obj is a member of + * one of them, then @p below must also be a member of the same + * smart object. + * + * Similarly, if @p obj is not a member of a smart object, @p below + * must not be either. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_stack_below() + * + * + * @param[in] below the object below which to stack + */ + EAPI void evas_object_stack_below(Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(2); + + /** + * + * Raise @p obj to the top of its layer. + * + * @p obj will, then, be the highest one in the layer it belongs + * to. Object on other layers won't get touched. + * + * @see evas_object_stack_above() + * @see evas_object_stack_below() + * @see evas_object_lower() + * + * + */ + EAPI void evas_object_raise(Evas_Object *obj); + + /** + * + * Stack @p obj immediately above @p above + * + * Objects, in a given canvas, are stacked in the order they get added + * to it. This means that, if they overlap, the highest ones will + * cover the lowest ones, in that order. This function is a way to + * change the stacking order for the objects. + * + * This function is intended to be used with objects belonging to + * the same layer in a given canvas, otherwise it will fail (and + * accomplish nothing). + * + * If you have smart objects on your canvas and @p obj is a member of + * one of them, then @p above must also be a member of the same + * smart object. + * + * Similarly, if @p obj is not a member of a smart object, @p above + * must not be either. + * + * @see evas_object_layer_get() + * @see evas_object_layer_set() + * @see evas_object_stack_below() + * + * + * @param[in] above the object above which to stack + */ + EAPI void evas_object_stack_above(Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(2); + + /** + * + * Lower @p obj to the bottom of its layer. + * + * @p obj will, then, be the lowest one in the layer it belongs + * to. Objects on other layers won't get touched. + * + * @see evas_object_stack_above() + * @see evas_object_stack_below() + * @see evas_object_raise() + * + * + */ + EAPI void evas_object_lower(Evas_Object *obj); +/** + * + * Sets the general/main color of the given Evas object to the given + * one. + * + * @see evas_object_color_get() (for an example) + * @note These color values are expected to be premultiplied by @p a. + * + * @ingroup Evas_Object_Group_Basic + * + * @param[in] r The red component of the given color. + * @param[in] g The green component of the given color. + * @param[in] b The blue component of the given color. + * @param[in] a The alpha component of the given color. + */ +EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a); + +/** + * + * Retrieves the general/main color of the given Evas object. + * + * Retrieves the “main” color's RGB component (and alpha channel) + * values, which range from 0 to 255. For the alpha channel, + * which defines the object's transparency level, 0 means totally + * transparent, while 255 means opaque. These color values are + * premultiplied by the alpha value. + * + * Usually you’ll use this attribute for text and rectangle objects, + * where the “main” color is their unique one. If set for objects + * which themselves have colors, like the images one, those colors get + * modulated by this one. + * + * @note All newly created Evas rectangles get the default color + * values of 255 255 255 255 (opaque white). + * + * @note Use @c NULL pointers on the components you're not interested + * in: they'll be ignored by the function. + * + * Example: + * @dontinclude evas-object-manipulation.c + * @skip int alpha, r, g, b; + * @until return + * + * See the full @ref Example_Evas_Object_Manipulation "example". + * + * @ingroup Evas_Object_Group_Basic + * + * @param[out] r The red component of the given color. + * @param[out] g The green component of the given color. + * @param[out] b The blue component of the given color. + * @param[out] a The alpha component of the given color. + */ +EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a); + +/** + * + * Move the given Evas object to the given location inside its canvas' viewport. + * + * @param[in] x in + * @param[in] y in + */ +EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y); + +/** + * + * Changes the size of the given Evas object. + * + * @param[in] w in + * @param[in] h in + */ +EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); + +/** + * + * Retrieves whether or not the given Evas object is visible. + * + */ +EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj); + + #include "canvas/evas_common_interface.eo.legacy.h" #include "canvas/evas_object.eo.legacy.h" diff --cc src/lib/evas/canvas/evas_canvas.eo index 652351d,6e2a1b3f..c3fd2d5 --- a/src/lib/evas/canvas/evas_canvas.eo +++ b/src/lib/evas/canvas/evas_canvas.eo @@@ -1506,52 -1368,26 +1368,44 @@@ class Evas.Canvas (Eo.Base, Evas.Common } } render_dump { - /*@ - Make the canvas discard as much data as possible used by the engine at - runtime. - - This function will unload images, delete textures and much more, where - possible. You may also want to call evas_render_idle_flush() immediately - prior to this to perhaps discard a little more, though evas_render_dump() - should implicitly delete most of what evas_render_idle_flush() might - discard too. - - @ingroup Evas_Canvas */ + [[Make the canvas discard as much data as possible used by the + engine at runtime. + This function will unload images, delete textures and much more, + where possible. You may also want to call @.render_idle_flush + immediately prior to this to perhaps discard a little more, + though this function should implicitly delete most of what + @.render_idle_flush might discard too. + ]] } + render_copy { - /*@ - Get a image from evas - - @ingroup Evas_Canvas */ - ++ [[Get a image from evas]] + params { - @in void *buffer; - @in int stride; - @in int width; - @in int height; - @in uint format; - @in int sx; - @in int sy; - @in int sw; - @in int sh; - @in int dx; - @in int dy; - @in int dw; - @in int dh; ++ @in buffer: void *; ++ @in stride: int; ++ @in width: int; ++ @in height: int; ++ @in format: uint; ++ @in sx: int; ++ @in sy: int; ++ @in sw: int; ++ @in sh: int; ++ @in dx: int; ++ @in dy: int; ++ @in dw: int; ++ @in dh: int; + } + } event_feed_mouse_in { - /*@ - Mouse in event feed. - - This function will set some evas properties that is necessary when - the mouse in event happens. It prepares information to be treated - by the callback function. */ + [[Mouse in event feed. + This function will set some evas properties that is necessary + when the mouse in event happens. It prepares information to be + treated by the callback function. + ]] params { - @in uint timestamp; /*@ The timestamp of the mouse up event. */ - @in const(void)* data; /*@ The data for canvas. */ + @in timestamp: uint; [[The timestamp of the mouse up event.]] + @in data: const(void)*; [[The data for canvas.]] } } object_top_in_rectangle_get @const { diff --cc src/lib/evas/canvas/evas_object_image.c index d0af8eb,e174353..f86deeb mode 100755,100644..100755 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@@ -2825,9 -3039,9 +3039,9 @@@ evas_process_dirty_pixels(Evas_Object * // Check if we can do direct rendering... if (ENFN->gl_direct_override_get) - ENFN->gl_direct_override_get(output, &direct_override, &direct_force_off); + ENFN->gl_direct_override_get(output, NULL /*&direct_override*/, &direct_force_off); if (ENFN->gl_surface_direct_renderable_get) - direct_renderable = ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override); + direct_renderable = ENFN->gl_surface_direct_renderable_get(output, ns, &direct_override, surface); if ( ((direct_override) || ((direct_renderable) && diff --cc src/lib/evas/canvas/evas_object_vg.c index a0e6d45,e50d787..aff87f8 --- a/src/lib/evas/canvas/evas_object_vg.c +++ b/src/lib/evas/canvas/evas_object_vg.c @@@ -23,7 -23,7 +23,9 @@@ struct _Evas_VG_Dat unsigned int width, height; + Eina_Array cleanup; ++ Eina_Bool content_changed; + void *backing_store; }; static void evas_object_vg_render(Evas_Object *eo_obj, @@@ -96,12 -113,12 +115,17 @@@ _cleanup_reference(void *data void _evas_vg_eo_base_destructor(Eo *eo_obj, Evas_VG_Data *pd) { + if (pd->backing_store) { + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); + obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, + pd->backing_store); + } + Evas *e = evas_object_evas_get(eo_obj); + + eo_do(e, eo_event_callback_del(EVAS_CANVAS_EVENT_RENDER_POST, _cleanup_reference, pd)); + eo_unref(pd->root); + pd->root = NULL; eo_do_super(eo_obj, MY_CLASS, eo_destructor()); } @@@ -161,11 -194,7 +201,12 @@@ evas_object_vg_render(Evas_Object *eo_o int x, int y, Eina_Bool do_async) { Evas_VG_Data *vd = type_private_data; - - vd->backing_store = obj->layer->evas->engine.func->ector_surface_create(output, - vd->backing_store, - obj->cur->geometry.w, - obj->cur->geometry.h); + Ector_Surface *ector = evas_ector_get(obj->layer->evas); ++ if (vd->content_changed || !vd->backing_store) ++ vd->backing_store = obj->layer->evas->engine.func->ector_surface_create(output, ++ vd->backing_store, ++ obj->cur->geometry.w, ++ obj->cur->geometry.h); // FIXME: Set context (that should affect Ector_Surface) and // then call Ector_Renderer render from bottom to top. Get the // Ector_Surface that match the output from Evas engine API. @@@ -190,30 -219,15 +231,34 @@@ obj->cur->anti_alias); obj->layer->evas->engine.func->context_render_op_set(output, context, obj->cur->render_op); - obj->layer->evas->engine.func->ector_begin(output, context, - ector, surface, - obj->cur->geometry.x + x, obj->cur->geometry.y + y, - do_async); - _evas_vg_render(obj, vd, - output, context, surface, - vd->root, NULL, - do_async); - obj->layer->evas->engine.func->ector_end(output, context, ector, surface, do_async); + if (!vd->backing_store) + { - obj->layer->evas->engine.func->ector_begin(output, context, surface, ++ obj->layer->evas->engine.func->ector_begin(output, context, ector, surface, + obj->cur->geometry.x + x, obj->cur->geometry.y + y, + do_async); - _evas_vg_render(obj, output, context, surface, vd->root, NULL, do_async); - obj->layer->evas->engine.func->ector_end(output, context, surface, do_async); ++ _evas_vg_render(obj, vd, output, context, surface, vd->root, NULL, do_async); ++ obj->layer->evas->engine.func->ector_end(output, context, ector, surface, do_async); + } + else + { + if (vd->content_changed) + { - obj->layer->evas->engine.func->ector_begin(output, context, vd->backing_store, 0, 0, do_async); - _evas_vg_render(obj, output, context, vd->backing_store, vd->root, NULL,do_async); ++ obj->layer->evas->engine.func->ector_begin(output, context, ector, vd->backing_store, 0, 0, do_async); ++ _evas_vg_render(obj, vd, output, context, vd->backing_store, vd->root, NULL,do_async); + obj->layer->evas->engine.func->image_dirty_region(obj->layer->evas->engine.data.output, vd->backing_store, + 0, 0, 0, 0); - obj->layer->evas->engine.func->ector_end(output, context, surface, do_async); ++ obj->layer->evas->engine.func->ector_end(output, context, ector, surface, do_async); + } + obj->layer->evas->engine.func->image_draw(output, context, surface, + vd->backing_store, 0, 0, + obj->cur->geometry.w, obj->cur->geometry.h, obj->cur->geometry.x + x, + obj->cur->geometry.y + y, obj->cur->geometry.w, obj->cur->geometry.h, + EINA_TRUE, do_async); + } ++ // reset the content change flag ++ // don't move this to render_pre as there is no guarentee that ++ // each render_pre() will be followed by a render() call. ++ vd->content_changed = EINA_FALSE; } static void @@@ -245,41 -258,36 +289,44 @@@ evas_object_vg_render_pre(Evas_Object * obj->cur->clipper, obj->cur->clipper->private_data); } - /* now figure what changed and add draw rects */ - /* if it just became visible or invisible */ - is_v = evas_object_is_visible(eo_obj, obj); - was_v = evas_object_was_visible(eo_obj,obj); - if (!(is_v | was_v)) goto done; -- // FIXME: handle damage only on changed renderer. - s = e->engine.func->ector_get(e->engine.data.output); - s = evas_ector_get(obj->layer->evas); -- if (vd->root && s) -- _evas_vg_render_pre(vd->root, s, NULL); ++ // handle the vg root node tree. ++ if (vd->root) ++ { ++ // FIXME: handle damage only on changed renderer. ++ s = evas_ector_get(obj->layer->evas); ++ if (s) ++ _evas_vg_render_pre(vd->root, s, NULL); + - // FIXME: for now the walking Evas_VG_Node tree doesn't trigger any damage - // So just forcing it here if necessary - rnd = eo_data_scope_get(vd->root, EFL_VG_BASE_CLASS); ++ // FIXME: for now the walking Evas_VG_Node tree doesn't trigger any damage ++ // So just forcing it here if necessary ++ rnd = eo_data_scope_get(vd->root, EFL_VG_BASE_CLASS); + - //FIXME find the reason for NULL Base Class in some case? - if (!rnd) return; ++ //FIXME find the reason for NULL Base Class in some case? ++ if (!rnd) return; + - if (rnd->changed) - { - vd->content_changed = EINA_TRUE; - rnd->changed = EINA_FALSE; - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); - goto done; - } - else - { - // if size got changed , force a redraw. - if ((obj->cur->geometry.w != obj->prev->geometry.w) || - (obj->cur->geometry.h != obj->prev->geometry.h)) - vd->content_changed = EINA_TRUE; - else - vd->content_changed = EINA_FALSE; ++ if (rnd->changed) ++ { ++ vd->content_changed = EINA_TRUE; ++ rnd->changed = EINA_FALSE; ++ evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); ++ goto done; ++ } ++ else ++ { ++ // if size got changed , force a redraw. ++ if ((obj->cur->geometry.w != obj->prev->geometry.w) || ++ (obj->cur->geometry.h != obj->prev->geometry.h)) ++ vd->content_changed = EINA_TRUE; ++ } + } + /* now figure what changed and add draw rects */ + /* if it just became visible or invisible */ + is_v = evas_object_is_visible(eo_obj, obj); + was_v = evas_object_was_visible(eo_obj,obj); + if (!(is_v | was_v)) goto done; + - // FIXME: for now the walking Evas_VG_Node tree doesn't trigger any damage - // So just forcing it here if necessary - rnd = eo_data_scope_get(vd->root, EFL_VG_BASE_CLASS); - - // Once the destructor has been called, root node will be zero - // and a full redraw is still necessary. - if (!rnd) - { - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); - goto done; - } - else if (rnd->changed) - { - rnd->changed = EINA_FALSE; - evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); - goto done; - } - if (is_v != was_v) { evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, eo_obj, is_v, was_v); diff --cc src/lib/evas/canvas/evas_render.c index 46e11fb,bdac680..e2ef459 mode 100644,100644..100755 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c diff --cc src/lib/evas/common/evas_font_draw.c index ea6d498,bbeecf6..361b690 --- a/src/lib/evas/common/evas_font_draw.c +++ b/src/lib/evas/common/evas_font_draw.c @@@ -174,20 -168,7 +170,20 @@@ evas_common_font_rgba_draw(RGBA_Image * else _evas_font_image_draw (dc, dst, fg->ext_dat, 0, 0, w, h, - chr_x, y - (chr_y - y), draw_w, draw_h, EINA_TRUE); + chr_x, y - (chr_y - y), w, h, EINA_TRUE); + */ + int draw_w = w * fg->fi->scale_factor; + int draw_h = h * fg->fi->scale_factor; + + if (dc->font_ext.func.gl_image_draw) + dc->font_ext.func.gl_image_draw + (dc->font_ext.data, fg->ext_dat, 0, 0, w, h, + chr_x, y - (chr_y - y), draw_w, draw_h, EINA_TRUE); + else + _evas_font_image_draw + (dc, dst, fg->ext_dat, 0, 0, w, h, + chr_x, y - (chr_y - y), draw_w, draw_h, EINA_TRUE); + // } } } diff --cc src/lib/evas/include/evas_private.h index fb96e10,f01c931..cd2569f mode 100755,100644..100755 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@@ -1326,25 -1433,26 +1433,28 @@@ struct _Evas_Fun void *(*image_drawable_set) (void *data, void *image, void *drawable); void (*drawable_scene_render) (void *data, void *drawable, void *scene_data); + Eina_Bool (*drawable_scene_render_to_texture) (void *data, void *drawable, void *scene_data); - void *(*texture_new) (void *data); + int (*drawable_texture_color_pick_id_get) (void *drawable); + void (*drawable_texture_pixel_color_get) (unsigned int tex EINA_UNUSED, int x, int y, Evas_Color *color, void *drawable); + + void *(*texture_new) (void *data, Eina_Bool use_atlas); void (*texture_free) (void *data, void *texture); - void (*texture_data_set) (void *data, void *texture, Evas_3D_Color_Format format, Evas_3D_Pixel_Format pixel_format, int w, int h, const void *pixels); - void (*texture_file_set) (void *data, void *texture, const char *file, const char *key); - void (*texture_color_format_get) (void *data, void *texture, Evas_3D_Color_Format *format); void (*texture_size_get) (void *data, void *texture, int *w, int *h); - void (*texture_wrap_set) (void *data, void *texture, Evas_3D_Wrap_Mode s, Evas_3D_Wrap_Mode t); - void (*texture_wrap_get) (void *data, void *texture, Evas_3D_Wrap_Mode *s, Evas_3D_Wrap_Mode *t); - void (*texture_filter_set) (void *data, void *texture, Evas_3D_Texture_Filter min, Evas_3D_Texture_Filter mag); - void (*texture_filter_get) (void *data, void *texture, Evas_3D_Texture_Filter *min, Evas_3D_Texture_Filter *mag); + void (*texture_wrap_set) (void *data, void *texture, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t); + void (*texture_wrap_get) (void *data, void *texture, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t); + void (*texture_filter_set) (void *data, void *texture, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag); + void (*texture_filter_get) (void *data, void *texture, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag); void (*texture_image_set) (void *data, void *texture, void *image); + void *(*texture_image_get) (void *data, void *texture); + void (*output_copy) (void *data, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh); - Ector_Surface *(*ector_get) (void *data); - void (*ector_begin) (void *data, void *context, void *surface, int x, int y, Eina_Bool do_async); + Ector_Surface *(*ector_create) (void *data); + void (*ector_destroy) (void *data, Ector_Surface *surface); + void (*ector_begin) (void *data, void *context, Ector_Surface *ector, void *surface, int x, int y, Eina_Bool do_async); void (*ector_renderer_draw) (void *data, void *context, void *surface, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async); - void *(*ector_end) (void *data, void *context, void *surface, Eina_Bool do_async); - void *(*ector_surface_create) (void *data, void *surface, int w, int h); + void (*ector_end) (void *data, void *context, Ector_Surface *ector, void *surface, Eina_Bool do_async); ++ void *(*ector_surface_create) (void *data, void *surface, int w, int h); }; struct _Evas_Image_Save_Func diff --cc src/modules/ecore_buffer/x11_dri3/ecore_buffer_x11_dri3.c index 83d1f45,d3ab703..0593579 --- a/src/modules/ecore_buffer/x11_dri3/ecore_buffer_x11_dri3.c +++ b/src/modules/ecore_buffer/x11_dri3/ecore_buffer_x11_dri3.c @@@ -427,33 -427,10 +427,32 @@@ _ecore_buffer_x11_dri3_buffer_alloc(Eco } static Ecore_Buffer_Data +_ecore_buffer_x11_dri3_buffer_alloc_with_tbm_surface(Ecore_Buffer_Module_Data bmdata EINA_UNUSED, void *tbm_surface, int *ret_w, int *ret_h, Ecore_Buffer_Format *ret_format, unsigned int flags) +{ + Ecore_Buffer_X11_Dri3_Data *buf; + + buf = calloc(1, sizeof(Ecore_Buffer_X11_Dri3_Data)); + if (!buf) + return NULL; + + buf->w = tbm_surface_get_width(tbm_surface); + buf->h = tbm_surface_get_height(tbm_surface); + buf->format = tbm_surface_get_format(tbm_surface); + buf->flags = flags; + buf->is_imported = EINA_FALSE; + buf->tbm_surface = tbm_surface; + + if (ret_w) *ret_w = buf->w; + if (ret_h) *ret_h = buf->h; + if (ret_format) *ret_format = buf->format; + + return buf; +} + - static void - _ecore_buffer_x11_dri3_buffer_free(Ecore_Buffer_Module_Data bmdata EINA_UNUSED, Ecore_Buffer_Data data) + _ecore_buffer_x11_dri3_buffer_free(Ecore_Buffer_Module_Data bmdata EINA_UNUSED, Ecore_Buffer_Data bdata) { - Ecore_Buffer_X11_Dri3_Data *buf = data; + Ecore_Buffer_X11_Dri3_Data *buf = bdata; if (!buf) return; diff --cc src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index 302c077,f7cfc55..7b2a511 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@@ -568,81 -584,19 +580,24 @@@ dev_err static int _ecore_evas_drm_shutdown(void) { - unsigned int i; - if (--_ecore_evas_init_count != 0) return _ecore_evas_init_count; -- - ecore_drm_inputs_destroy(dev); - /* NB: No need to free outputs here. Is done in device free */ - ecore_drm_sprites_destroy(dev); - ecore_drm_device_close(dev); - ecore_drm_launcher_disconnect(dev); - ecore_drm_device_free(dev); - ecore_drm_shutdown(); + _ecore_evas_init_count--; + if (_ecore_evas_init_count == 0) + { - for (i = 0; i < sizeof(_ecore_evas_event_handlers) / sizeof(Ecore_Event_Handler*); i++) - { - if (_ecore_evas_event_handlers[i]) - ecore_event_handler_del(_ecore_evas_event_handlers[i]); - } - + ecore_drm_inputs_destroy(dev); + /* NB: No need to free outputs here. Is done in device free */ + ecore_drm_sprites_destroy(dev); + ecore_drm_device_close(dev); + ecore_drm_launcher_disconnect(dev); + ecore_drm_device_free(dev); + ecore_drm_shutdown(); + + ecore_event_evas_shutdown(); - + dev = NULL; + } - if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; - return _ecore_evas_init_count; - } - - static Eina_Bool - _ecore_evas_drm_event_page_flip(void *data, int type EINA_UNUSED, void *event) - { - Ecore_Evas *ee; - Ecore_Drm_Event_Page_Flip *e; - Ecore_Evas_Engine_Drm_Data *edata; - - e = event; - ee = data; - edata = ee->engine.data; - - if (edata->func.flip) - edata->func.flip(e->fd, e->sequence, e->sec, e->usec, e->data); - - if (edata->wait_for_flip_done) - { - if (edata->flip_done_timer) - { - ecore_timer_del(edata->flip_done_timer); - edata->flip_done_timer = NULL; - } - - edata->wait_for_flip_done = 0; - if (edata->need_render) - { - _ecore_evas_drm_render(ee); - edata->need_render = 0; - } - } - return ECORE_CALLBACK_PASS_ON; - } - - static Eina_Bool - _ecore_evas_drm_event_vblank(void *data, int type EINA_UNUSED, void *event) - { - Ecore_Evas *ee; - Ecore_Drm_Event_Vblank *e; - Ecore_Evas_Engine_Drm_Data *edata; - - e = event; - ee = data; - edata = ee->engine.data; - - if (edata->func.vblank) - edata->func.vblank(e->fd, e->sequence, e->sec, e->usec, e->data); - ecore_event_evas_shutdown(); ++ if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0; - return ECORE_CALLBACK_PASS_ON; + return _ecore_evas_init_count; } static Ecore_Evas_Interface_Drm * diff --cc src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c index 08c5e5a,245534f..b210e4e --- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c +++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c @@@ -35,26 -37,19 +37,22 @@@ _extnbuf_new(const char *base, int id, snprintf(file, sizeof(file), "/%s-%i.%i", base, id, num); b->file = eina_stringshare_add(file); if (!b->file) goto err; - - if (sys) mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; - + + + if (sys) mode |= S_IRGRP | S_IROTH; + + if (owner) + { + mode |= S_IWUSR; + prot |= PROT_WRITE; + } + if (b->am_owner) { - const char *s = NULL; - - #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) - if (getuid() == geteuid()) - #endif - { - s = getenv("XDG_RUNTIME_DIR"); - if (!s) s = getenv("TMPDIR"); - } - b->lockfd = eina_file_mkstemp("ee-lock-XXXXXX", &tmp); + //TIZEN ONLY (150908): security issue. To access any application, it needs smack rule. - //if (!s) s = "/tmp"; - s = "/run/.efl"; ++ //b->lockfd = eina_file_mkstemp("ee-lock-XXXXXX", &tmp); ++ b->lockfd = mkstemp("/run/.efl/ee-lock-XXXXXX"); + // - snprintf(file, sizeof(file), "%s/ee-lock-XXXXXX", s); - b->lockfd = mkstemp(file); if (b->lockfd < 0) goto err; b->lock = eina_stringshare_add(file); if (!b->lock) goto err; diff --cc src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 2b3fa2d,634343b..5880019 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@@ -45,18 -45,7 +45,9 @@@ static void _rotation_do(Ecore_Evas *ee static void _ecore_evas_wayland_alpha_do(Ecore_Evas *ee, int alpha); static void _ecore_evas_wayland_transparent_do(Ecore_Evas *ee, int transparent); static void _ecore_evas_wl_common_border_update(Ecore_Evas *ee); +static Eina_Bool _ecore_evas_wl_common_wm_rot_manual_rotation_done_timeout(void *data); +static void _ecore_evas_wl_common_wm_rot_manual_rotation_done_timeout_update(Ecore_Evas *ee); - /* Frame listener */ - static void _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t tm); - - /* Frame listener */ - static const struct wl_callback_listener frame_listener = - { - _ecore_evas_wl_frame_complete, - }; - /* local functions */ static void _ecore_evas_wl_common_state_update(Ecore_Evas *ee) @@@ -1676,6 -1264,36 +1545,36 @@@ _ecore_evas_wl_common_pre_render(Ecore_ return rend; } + static void + _anim_cb_animate(void *data, struct wl_callback *callback, uint32_t serial EINA_UNUSED) + { + Ecore_Evas *ee = data; + Ecore_Evas_Engine_Wl_Data *wdata; + + wdata = ee->engine.data; + wl_callback_destroy(callback); + wdata->anim_callback = NULL; - ecore_evas_manual_render_set(ee, 0); ++// ecore_evas_manual_render_set(ee, 0); + } + + static const struct wl_callback_listener _anim_listener = + { + _anim_cb_animate + }; + + void + _ecore_evas_wl_common_render_pre(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED) + { + Ecore_Evas *ee = data; + Ecore_Evas_Engine_Wl_Data *wdata; + + wdata = ee->engine.data; + wdata->anim_callback = + wl_surface_frame(ecore_wl_window_surface_get(wdata->win)); + wl_callback_add_listener(wdata->anim_callback, &_anim_listener, ee); - ecore_evas_manual_render_set(ee, 1); ++// ecore_evas_manual_render_set(ee, 1); + } + void _ecore_evas_wl_common_render_updates(void *data, Evas *evas EINA_UNUSED, void *event) { diff --cc src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h index 2f8585d,7929ab3..0c9a31d --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h @@@ -35,22 -35,7 +35,14 @@@ struct _Ecore_Evas_Engine_Wl_Dat #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL struct wl_egl_window *egl_win; #endif - #ifdef BUILD_ECORE_EVAS_WAYLAND_SHM - struct - { - Eina_Bool (*busy_check) (void *data); - } func; - Eina_Bool wait_buffer_release : 1; - #endif - Eina_Bool frame_pending : 1; - struct wl_callback *frame_callback; + struct + { + unsigned char supported: 1; + unsigned char request : 1; + unsigned char done : 1; + Ecore_Job *manual_mode_job; + } wm_rot; + struct wl_callback *anim_callback; }; Ecore_Evas_Interface_Wayland *_ecore_evas_wl_interface_new(void); @@@ -114,8 -92,6 +107,7 @@@ void _ecore_evas_wayland_shm_resize(Eco void _ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge); void _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent); void _ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int transparent); - void _ecore_evas_wayland_shm_buffer_released(void *data); +void _ecore_evas_wayland_shm_window_rotate(Ecore_Evas *ee, int rotation, int resize); #endif #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL diff --cc src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index b04c7e1,530b3ce..b589375 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@@ -507,35 -509,4 +527,12 @@@ _ecore_evas_wayland_shm_resize_edge_set einfo->info.edges = edge; } +void - _ecore_evas_wayland_shm_buffer_released(void *data) - { - Ecore_Evas_Engine_Wl_Data *wdata; - Ecore_Evas *ee = data; - - if (!ee) return; - wdata = ee->engine.data; - - if (!wdata->wait_buffer_release) - return; - else - wdata->wait_buffer_release = EINA_FALSE; - - /* reset previous render time - the delay for buffer release does NOT - * have to be considered as stuck of async - */ - if (!ee->in_async_render) - ee->async_render_start = ecore_loop_time_get(); - - _ecore_evas_wl_common_render(ee); - } - - void +_ecore_evas_wayland_shm_window_rotate(Ecore_Evas *ee, int rotation, int resize) +{ + if (!ee) return; + _ecore_evas_wl_rotation_set(ee, rotation, resize); + if (ee->func.fn_state_change) ee->func.fn_state_change(ee); +} + #endif diff --cc src/modules/ecore_imf/wayland/wayland_imcontext.c index e0f6a65,fa0b739..9ca8992 mode 100755,100644..100755 --- a/src/modules/ecore_imf/wayland/wayland_imcontext.c +++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c diff --cc src/modules/ecore_imf/wayland/wayland_module.c index 19316a0,f395faa..48feed0 --- a/src/modules/ecore_imf/wayland/wayland_module.c +++ b/src/modules/ecore_imf/wayland/wayland_module.c @@@ -148,12 -150,17 +150,21 @@@ im_module_init(void _ecore_imf_wayland_log_dom = eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW); + if (!getenv("WAYLAND_DISPLAY")) return EINA_FALSE; + if ((s = getenv("ELM_DISPLAY"))) + { + if (strcmp(s, "wl")) return EINA_FALSE; + } + + if (!ecore_wl_init(NULL)) + return EINA_FALSE; + ecore_imf_module_register(&wayland_im_info, im_module_create, im_module_exit); + + // TIZEN_ONLY(20150708): Support back key + register_key_handler(); + // EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initalized"); return EINA_TRUE; @@@ -162,10 -169,8 +173,11 @@@ static void im_module_shutdown(void) { + // TIZEN_ONLY(20150708): Support back key + unregister_key_handler(); + // EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module shutdown"); + ecore_wl_shutdown(); } EINA_MODULE_INIT(im_module_init); diff --cc src/modules/evas/engines/drm/evas_engine.c index 1daf8be,40365a9..13216c1 --- a/src/modules/evas/engines/drm/evas_engine.c +++ b/src/modules/evas/engines/drm/evas_engine.c @@@ -161,29 -133,17 +140,31 @@@ eng_setup(Evas *evas, void *einfo static void eng_output_free(void *data) { - Render_Engine *re = data; + Render_Engine *re; - evas_render_engine_software_generic_clean(&re->generic); - free(re); + if ((re = data)) + { + evas_render_engine_software_generic_clean(&re->generic); + free(re); + } - evas_common_font_shutdown(); - evas_common_image_shutdown(); + evas_common_shutdown(); } +static void +eng_output_copy(void *data, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) +{ + Render_Engine *re = (Render_Engine *)data; + Outbuf *ob; + + EINA_SAFETY_ON_NULL_RETURN(re); + + ob = eng_get_ob(re); + EINA_SAFETY_ON_NULL_RETURN(ob); + + evas_outbuf_copy(ob, buffer, stride, width, height, format, sx, sy, sw, sh, dx, dy, dw, dh); +} + /* module api functions */ static int module_open(Evas_Module *em) diff --cc src/modules/evas/engines/drm/evas_engine.h index 9c36ec3,d513911..f6f3c2d --- a/src/modules/evas/engines/drm/evas_engine.h +++ b/src/modules/evas/engines/drm/evas_engine.h @@@ -128,13 -66,5 +66,5 @@@ void *evas_outbuf_update_region_new(Out void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); void evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode); -- +void evas_outbuf_copy(Outbuf *ob, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh); - - Eina_Bool evas_drm_outbuf_setup(Outbuf *ob); - void evas_drm_outbuf_framebuffer_set(Outbuf *ob, Buffer *buffer); - Eina_Bool evas_drm_framebuffer_create(int fd, Buffer *buffer, int depth); - void evas_drm_framebuffer_destroy(int fd, Buffer *buffer); - Eina_Bool evas_drm_framebuffer_send(Outbuf *ob, Buffer *buffer); - #endif diff --cc src/modules/evas/engines/drm/evas_outbuf.c index 3e230c1,11d3dc6..09393c4 --- a/src/modules/evas/engines/drm/evas_outbuf.c +++ b/src/modules/evas/engines/drm/evas_outbuf.c @@@ -489,15 -451,7 +451,15 @@@ evas_outbuf_flush(Outbuf *ob, Tilebuf_R } int - evas_outbuf_get_rot(Outbuf *ob) + evas_outbuf_rot_get(Outbuf *ob) { - return ob->info->info.rotation; + return ob->rotation; } + +void +evas_outbuf_copy(Outbuf *ob, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) +{ - Buffer *buff = &(ob->priv.buffer[ob->priv.last]); ++ Ecore_Drm_Fb *buff = ob->priv.buffer[ob->priv.last]; + - memcpy (buffer, buff->data, stride * height); - } ++ memcpy (buffer, buff->mmap, stride * height); ++} diff --cc src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m index f869dee,882a7d7..4bc61b6 --- a/src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m +++ b/src/modules/evas/engines/gl_cocoa/evas_gl_cocoa_main.m @@@ -72,11 -96,11 +96,11 @@@ eng_window_new(void *window if (!gw->gl_context) { - free(gw); - return NULL; + free(gw); + return NULL; } evas_gl_common_context_use(gw->gl_context); - evas_gl_common_context_resize(gw->gl_context, w, h, 0); + evas_gl_common_context_resize(gw->gl_context, w, h, 0,1); return gw; } diff --cc src/modules/evas/engines/gl_common/evas_gl_context.c index 0fe91d8,5e33fbe..a1b8abd --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@@ -397,12 -484,9 +484,11 @@@ _evas_gl_common_version_check(int *gles return 0; } +//Tizen Only : when multi window are shown, latest window does not show. so force call glviewport when window resizing occur +//static void _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) static void -_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) +_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc, int force_update) { - GLfloat proj[16]; unsigned int i; int w = 1, h = 1, m = 1, rot = 1, foc = 0; @@@ -1133,24 -1145,17 +1147,20 @@@ evas_gl_common_context_newframe(Evas_En if (gc->state.current.cur_prog == PRG_INVALID) glUseProgram(gc->shared->shader[0].prog); else glUseProgram(gc->state.current.cur_prog); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); glActiveTexture(GL_TEXTURE0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - _evas_gl_common_viewport_set(gc); + _evas_gl_common_viewport_set(gc,1); } +//Tizen Only : when multi window are shown, latest window does not show. so force call glviewport when window resizing occur +//EAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) EAPI void -evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) +evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot, int force_update) { - if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; + if (!gc) return; + if ((!force_update) && (gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; evas_gl_common_context_flush(gc); gc->change.size = 1; gc->rot = rot; @@@ -1241,18 -1254,18 +1259,18 @@@ evas_gl_common_context_target_surface_s # endif #endif if (gc->pipe[0].shader.surface == gc->def_surface) - { - glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } + glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0); else - { - glsym_glBindFramebuffer(GL_FRAMEBUFFER, surface->tex->pt->fb); - _evas_gl_common_viewport_set(gc); + glsym_glBindFramebuffer(GL_FRAMEBUFFER, surface->tex->pt->fb); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } + _evas_gl_common_viewport_set(gc,0); } + #define VERTEX_CNT 3 + #define COLOR_CNT 4 + #define TEX_CNT 2 + #define SAM_CNT 2 + #define MASK_CNT 4 + #define PUSH_VERTEX(n, x, y, z) do { \ gc->pipe[n].array.vertex[nv++] = x; \ gc->pipe[n].array.vertex[nv++] = y; \ @@@ -2707,10 -2906,10 +2911,10 @@@ evas_gl_common_context_image_map_push(E gc->px = p[0].px >> FP; gc->py = p[0].py >> FP; gc->change.size = 1; - _evas_gl_common_viewport_set(gc); + _evas_gl_common_viewport_set(gc,0); } - pn = _evas_gl_common_context_push(RTYPE_MAP, + pn = _evas_gl_common_context_push(SHD_MAP, gc, tex, mtex, prog, x, y, w, h, diff --cc src/modules/evas/engines/gl_drm/evas_engine.c index cdd5fdd,145c5df..4d1d9cf mode 100644,100644..100755 --- a/src/modules/evas/engines/gl_drm/evas_engine.c +++ b/src/modules/evas/engines/gl_drm/evas_engine.c @@@ -72,12 -77,10 +77,13 @@@ glsym_func_void_ptr glsym_evas_gl_commo _eng_fn (*glsym_eglGetProcAddress)(const char *a) = NULL; void *(*glsym_eglCreateImage)(EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; void (*glsym_eglDestroyImage)(EGLDisplay a, void *b) = NULL; - void (*glsym_glEGLImageTargetTexture2DOES)(int a, void *b) = NULL; + void (*glsym_glEGLImageTargetTexture2DOES)(int a, void *b) = NULL; unsigned int (*glsym_eglSwapBuffersWithDamage)(EGLDisplay a, void *b, const EGLint *d, EGLint c) = NULL; + +unsigned int (*glsym_eglBindWaylandDisplayWL)(EGLDisplay dpy, struct wl_display *display) = NULL; +unsigned int (*glsym_eglUnbindWaylandDisplayWL)(EGLDisplay dpy, struct wl_display *display) = NULL; unsigned int (*glsym_eglQueryWaylandBufferWL)(EGLDisplay a, struct wl_resource *b, EGLint c, EGLint *d) = NULL; + unsigned int (*glsym_eglSetDamageRegionKHR)(EGLDisplay a, EGLSurface b, EGLint *c, EGLint d) = NULL; /* local function prototypes */ static void gl_symbols(void); @@@ -196,10 -230,9 +233,13 @@@ gl_symbols(void FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage", glsym_func_uint); + FINDSYM(glsym_eglBindWaylandDisplayWL, "eglBindWaylandDisplayWL", + glsym_func_uint); + FINDSYM(glsym_eglUnbindWaylandDisplayWL, "eglUnbindWaylandDisplayWL", + glsym_func_uint); + FINDSYM(glsym_eglSetDamageRegionKHR, "eglSetDamageRegionKHR", + glsym_func_uint); + FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL", glsym_func_uint); @@@ -868,118 -1021,6 +1028,20 @@@ eng_output_dump(void *data _re_winfree(re); } +static void +eng_output_copy(void *data, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) +{ + Render_Engine *re; + Outbuf *ob; + + if (!(re = (Render_Engine *)data)) return; + + ob = eng_get_ob(re); + EINA_SAFETY_ON_NULL_RETURN(ob); + + eng_outbuf_copy(ob, buffer, stride, width, height, format, sx, sy, sw, sh, dx, dy, dw, dh); +} + - static void - _native_cb_bind(void *data EINA_UNUSED, void *image) - { - Evas_GL_Image *img; - Native *n; - - if (!(img = image)) return; - if (!(n = img->native.data)) return; - - if (n->ns.type == EVAS_NATIVE_SURFACE_WL) - { - if (n->egl_surface) - { - if (glsym_glEGLImageTargetTexture2DOES) - { - glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, n->egl_surface); - if (eglGetError() != EGL_SUCCESS) - ERR("glEGLImageTargetTexture2DOES() failed."); - } - else - ERR("Try glEGLImageTargetTexture2DOES on EGL with no support"); - } - } - else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) - { - glBindTexture(GL_TEXTURE_2D, n->ns.data.opengl.texture_id); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - } - - static void - _native_cb_unbind(void *data EINA_UNUSED, void *image) - { - Evas_GL_Image *img; - Native *n; - - if (!(img = image)) return; - if (!(n = img->native.data)) return; - - if (n->ns.type == EVAS_NATIVE_SURFACE_WL) - { - //glBindTexture(GL_TEXTURE_2D, 0); //really need? - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) - { - glBindTexture(GL_TEXTURE_2D, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); - } - } - - static void - _native_cb_free(void *data, void *image) - { - Render_Engine *re; - Outbuf *ob; - Evas_GL_Image *img; - Native *n; - uint32_t texid; - void *wlid; - - if (!(re = (Render_Engine *)data)) return; - if (!(img = image)) return; - if (!(n = img->native.data)) return; - if (!(ob = eng_get_ob(re))) return; - - if (n->ns.type == EVAS_NATIVE_SURFACE_WL) - { - wlid = (void*)n->wl_buf; - eina_hash_del(ob->gl_context->shared->native_wl_hash, &wlid, img); - if (n->egl_surface) - { - if (glsym_eglDestroyImage) - { - glsym_eglDestroyImage(eng_get_ob(re)->egl_disp, - n->egl_surface); - if (eglGetError() != EGL_SUCCESS) - ERR("eglDestroyImage() failed."); - } - else - ERR("Try eglDestroyImage on EGL with no support"); - } - } - else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) - { - texid = n->ns.data.opengl.texture_id; - eina_hash_del(ob->gl_context->shared->native_tex_hash, &texid, img); - } - - img->native.data = NULL; - img->native.func.data = NULL; - img->native.func.bind = NULL; - img->native.func.unbind = NULL; - img->native.func.free = NULL; - - free(n); - } - static void * eng_image_native_set(void *data, void *image, void *native) { @@@ -1112,21 -1157,24 +1178,25 @@@ return NULL; } - attribs[0] = EGL_WAYLAND_PLANE_WL; + attribs[0] = EVAS_GL_WAYLAND_PLANE_WL; attribs[1] = 0; //if plane is 1 then 0, if plane is 2 then 1 - attribs[2] = EGL_NONE; + attribs[2] = EVAS_GL_NONE; memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); - glsym_eglQueryWaylandBufferWL(ob->egl_disp, wl_buf, EVAS_GL_WAYLAND_Y_INVERTED_WL, &yinvert); - eina_hash_add(ob->gl_context->shared->native_wl_hash, &wlid, img); + if (glsym_eglQueryWaylandBufferWL(ob->egl.disp, wl_buf, - EGL_WAYLAND_Y_INVERTED_WL, ++ EVAS_GL_WAYLAND_Y_INVERTED_WL, + &yinvert) == EGL_FALSE) + yinvert = 1; + eina_hash_add(ob->gl_context->shared->native_wl_hash, + &wlid, img); n->wl_buf = wl_buf; if (glsym_eglCreateImage) - n->egl_surface = glsym_eglCreateImage(ob->egl_disp, + n->egl_surface = glsym_eglCreateImage(ob->egl.disp, NULL, - EGL_WAYLAND_BUFFER_WL, - wl_buf, attribs); + EVAS_GL_WAYLAND_BUFFER_WL, + wl_buf, + attribs); else { ERR("Try eglCreateImage on EGL with no support"); @@@ -1217,33 -1272,23 +1291,34 @@@ module_open(Evas_Module *em func = pfunc; /* now to override methods */ - #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) - ORD(info); - ORD(info_free); - ORD(setup); - ORD(canvas_alpha_get); - ORD(output_free); - ORD(output_dump); - ORD(image_native_set); - ORD(output_copy); + EVAS_API_OVERRIDE(info, &func, eng_); + EVAS_API_OVERRIDE(info_free, &func, eng_); + EVAS_API_OVERRIDE(setup, &func, eng_); + EVAS_API_OVERRIDE(canvas_alpha_get, &func, eng_); + EVAS_API_OVERRIDE(output_free, &func, eng_); + EVAS_API_OVERRIDE(output_dump, &func, eng_); + EVAS_API_OVERRIDE(image_native_set, &func, eng_); ++ EVAS_API_OVERRIDE(output_copy, &func, eng_); /* Mesa's EGL driver loads wayland egl by default. (called by eglGetProcaddr() ) * implicit env set (EGL_PLATFORM=drm) prevent that. */ setenv("EGL_PLATFORM", "drm", 1); + gl_symbols(); + if (!((glsym_eglBindWaylandDisplayWL) && + (glsym_eglUnbindWaylandDisplayWL) && + (glsym_eglQueryWaylandBufferWL))) + { + EINA_LOG_ERR("GLES driver doesn't support EGL_WL_bind_wayland_display extension."); + eina_log_domain_unregister(_evas_engine_gl_drm_log_dom); + /* TODO: unload gl_generic engine too */ + return 0; + } + /* now advertise out own api */ em->functions = (void *)(&func); + return 1; } diff --cc src/modules/evas/engines/gl_drm/evas_engine.h index 8af84e8,1ef0e7c..2f1f2ef --- a/src/modules/evas/engines/gl_drm/evas_engine.h +++ b/src/modules/evas/engines/gl_drm/evas_engine.h @@@ -106,76 -75,61 +75,62 @@@ struct _Context_3 struct _Outbuf { - EGLContext egl_context[1]; - EGLSurface egl_surface[1]; - EGLConfig egl_config; - EGLDisplay egl_disp; - struct gbm_device *gbm; - struct gbm_surface *surface; - Evas *evas; - uint32_t format; - uint32_t flags; - Evas_Engine_GL_Context *gl_context; Evas_Engine_Info_GL_Drm *info; - Render_Engine_Swap_Mode swap_mode; + Evas_Engine_GL_Context *gl_context; + + Evas *evas; // used for pre_swap, post_swap + int w, h; - int depth, rot, screen, alpha; - int prev_age; - int frame_cnt; - int vsync; - Eina_Bool lost_back : 1; - Eina_Bool surf : 1; + unsigned int rotation, depth; + Render_Engine_Swap_Mode swap_mode; + + /* struct gbm_device *gbm; */ + struct gbm_surface *surface; - struct + struct { - Eina_Bool drew : 1; - } draw; + EGLContext context[1]; + EGLSurface surface[1]; + EGLConfig config; + EGLDisplay disp; + } egl; - struct + struct { - int fd; - unsigned int conn, crtc, fb; - Buffer buffer[NUM_BUFFERS]; - int curr, num; - drmModeModeInfo mode; - Eina_List *pending_writes; - Eina_List *planes; - Eina_Bool pending_flip : 1; + int prev_age, frame_cnt; + int curr, last, num; + struct gbm_bo *bo[4]; + Eina_List *pending_writes; } priv; - Ecore_Drm_Output *output; - }; - - struct _Context_3D - { - EGLDisplay display; - EGLContext context; - EGLSurface surface; + Eina_Bool destination_alpha : 1; + Eina_Bool vsync : 1; + Eina_Bool lost_back : 1; + Eina_Bool surf : 1; + Eina_Bool drew : 1; }; - Outbuf *eng_window_new(Evas_Engine_Info_GL_Drm *info, Evas *e, struct gbm_device *gbm, struct gbm_surface *surface, int screen, int depth, int w, int h, int indirect, int alpha, int rot, Render_Engine_Swap_Mode swap_mode); - void eng_window_free(Outbuf *gw); - void eng_window_use(Outbuf *gw); - void eng_window_unsurf(Outbuf *gw); - void eng_window_resurf(Outbuf *gw); - - void eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth); - int eng_outbuf_get_rot(Outbuf *ob); - Render_Engine_Swap_Mode eng_outbuf_swap_mode(Outbuf *ob); - Eina_Bool eng_outbuf_region_first_rect(Outbuf *ob); - void *eng_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); - void eng_outbuf_push_free_region_for_update(Outbuf *ob, RGBA_Image *update); - void eng_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); - void eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode); - Evas_Engine_GL_Context* eng_outbuf_gl_context_get(Outbuf *ob); - void *eng_outbuf_egl_display_get(Outbuf *ob); - - void eng_gl_context_free(Context_3D *context); - void eng_gl_context_use(Context_3D *context); - - Eina_Bool eng_preload_make_current(void *data, void *doit); - - Context_3D *eng_gl_context_new(Outbuf *win); + Eina_Bool eng_gbm_init(Evas_Engine_Info_GL_Drm *info); + Eina_Bool eng_gbm_shutdown(Evas_Engine_Info_GL_Drm *info); + + Outbuf *evas_outbuf_new(Evas_Engine_Info_GL_Drm *info, int w, int h, Render_Engine_Swap_Mode swap_mode); + void evas_outbuf_free(Outbuf *ob); + void evas_outbuf_use(Outbuf *ob); + void evas_outbuf_resurf(Outbuf *ob); + void evas_outbuf_unsurf(Outbuf *ob); + void evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth); + Render_Engine_Swap_Mode evas_outbuf_buffer_state_get(Outbuf *ob); + int evas_outbuf_rot_get(Outbuf *ob); + Eina_Bool evas_outbuf_update_region_first_rect(Outbuf *ob); + void *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); + void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); + void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); + void evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode); + Evas_Engine_GL_Context* evas_outbuf_gl_context_get(Outbuf *ob); + void *evas_outbuf_egl_display_get(Outbuf *ob); + Context_3D *evas_outbuf_gl_context_new(Outbuf *ob); + void evas_outbuf_gl_context_use(Context_3D *ctx); ++void eng_outbuf_copy(Outbuf *ob, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh); static inline Eina_Bool _re_wincheck(Outbuf *ob) diff --cc src/modules/evas/engines/gl_drm/evas_outbuf.c index 0000000,8c93988..c71c75b mode 000000,100644..100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@@ -1,0 -1,873 +1,929 @@@ + #include "evas_engine.h" ++#include + #include "../gl_common/evas_gl_define.h" + + /* local variables */ + static Outbuf *_evas_gl_drm_window = NULL; + static EGLContext context = EGL_NO_CONTEXT; + static int win_count = 0; + -#ifdef EGL_MESA_platform_gbm -static PFNEGLGETPLATFORMDISPLAYEXTPROC dlsym_eglGetPlatformDisplayEXT = NULL; -static PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC dlsym_eglCreatePlatformWindowSurfaceEXT = NULL; -#endif ++//#ifdef EGL_MESA_platform_gbm ++//static PFNEGLGETPLATFORMDISPLAYEXTPROC dlsym_eglGetPlatformDisplayEXT = NULL; ++//static PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC dlsym_eglCreatePlatformWindowSurfaceEXT = NULL; ++//#endif + + static void + _evas_outbuf_gbm_surface_destroy(Outbuf *ob) + { + if (!ob) return; + if (ob->surface) + { + gbm_surface_destroy(ob->surface); + ob->surface = NULL; + } + } + + static void + _evas_outbuf_gbm_surface_create(Outbuf *ob, int w, int h) + { + if (!ob) return; + + ob->surface = + gbm_surface_create(ob->info->info.gbm, w, h, + ob->info->info.format, ob->info->info.flags); + + if (!ob->surface) ERR("Failed to create gbm surface: %m"); + } + + static void + _evas_outbuf_fb_cb_destroy(struct gbm_bo *bo, void *data) + { + Ecore_Drm_Fb *fb; + + fb = data; + if (fb) + { + struct gbm_device *gbm; + + gbm = gbm_bo_get_device(bo); + drmModeRmFB(gbm_device_get_fd(gbm), fb->id); + free(fb); + } + } + + static Ecore_Drm_Fb * + _evas_outbuf_fb_get(Ecore_Drm_Device *dev, struct gbm_bo *bo) + { + int ret; + Ecore_Drm_Fb *fb; + uint32_t format; + uint32_t handles[4], pitches[4], offsets[4]; + + fb = gbm_bo_get_user_data(bo); + if (fb) return fb; + + if (!(fb = calloc(1, sizeof(Ecore_Drm_Fb)))) return NULL; + + format = gbm_bo_get_format(bo); + + fb->w = gbm_bo_get_width(bo); + fb->h = gbm_bo_get_height(bo); + fb->hdl = gbm_bo_get_handle(bo).u32; + fb->stride = gbm_bo_get_stride(bo); + fb->size = fb->stride * fb->h; + + handles[0] = fb->hdl; + pitches[0] = fb->stride; + offsets[0] = 0; + + ret = drmModeAddFB2(dev->drm.fd, fb->w, fb->h, format, + handles, pitches, offsets, &(fb->id), 0); + if (ret) + ret = drmModeAddFB(dev->drm.fd, fb->w, fb->h, 24, 32, + fb->stride, fb->hdl, &(fb->id)); + + if (ret) ERR("FAILED TO ADD FB: %m"); + + gbm_bo_set_user_data(bo, fb, _evas_outbuf_fb_cb_destroy); + + return fb; + } + + static void + _evas_outbuf_cb_pageflip(void *data) + { + Outbuf *ob; + Ecore_Drm_Fb *fb; + struct gbm_bo *bo; + + if (!(ob = data)) return; + + bo = ob->priv.bo[ob->priv.curr]; + if (!bo) return; + + fb = _evas_outbuf_fb_get(ob->info->info.dev, bo); + if (fb) fb->pending_flip = EINA_FALSE; + + gbm_surface_release_buffer(ob->surface, bo); + + ob->priv.last = ob->priv.curr; + ob->priv.curr = (ob->priv.curr + 1) % ob->priv.num; + } + + static void + _evas_outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, unsigned int count) + { + Ecore_Drm_Fb *fb; + + ob->priv.bo[ob->priv.curr] = gbm_surface_lock_front_buffer(ob->surface); + if (!ob->priv.bo[ob->priv.curr]) + { + WRN("Could not lock front buffer: %m"); + return; + } + + fb = _evas_outbuf_fb_get(ob->info->info.dev, ob->priv.bo[ob->priv.curr]); + if (fb) + { + ecore_drm_fb_dirty(fb, rects, count); + ecore_drm_fb_set(ob->info->info.dev, fb); + ecore_drm_fb_send(ob->info->info.dev, fb, _evas_outbuf_cb_pageflip, ob); + } + } + + static Eina_Bool + _evas_outbuf_make_current(void *data, void *doit) + { + Outbuf *ob; + + if (!(ob = data)) return EINA_FALSE; + + if (doit) + { + if (!eglMakeCurrent(ob->egl.disp, ob->egl.surface[0], + ob->egl.surface[0], ob->egl.context[0])) + return EINA_FALSE; + } + else + { + if (!eglMakeCurrent(ob->egl.disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT)) + return EINA_FALSE; + } + + return EINA_TRUE; + } + + static Eina_Bool + _evas_outbuf_init(void) + { + static int _init = 0; + if (_init) return EINA_TRUE; -#ifdef EGL_MESA_platform_gbm - dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) - eglGetProcAddress("eglGetPlatformDisplayEXT"); - EINA_SAFETY_ON_NULL_RETURN_VAL(dlsym_eglGetPlatformDisplayEXT, EINA_FALSE); - dlsym_eglCreatePlatformWindowSurfaceEXT = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) - eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); - EINA_SAFETY_ON_NULL_RETURN_VAL(dlsym_eglCreatePlatformWindowSurfaceEXT, EINA_FALSE); -#endif ++//#ifdef EGL_MESA_platform_gbm ++// dlsym_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) ++// eglGetProcAddress("eglGetPlatformDisplayEXT"); ++// EINA_SAFETY_ON_NULL_RETURN_VAL(dlsym_eglGetPlatformDisplayEXT, EINA_FALSE); ++// dlsym_eglCreatePlatformWindowSurfaceEXT = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) ++// eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); ++// EINA_SAFETY_ON_NULL_RETURN_VAL(dlsym_eglCreatePlatformWindowSurfaceEXT, EINA_FALSE); ++//#endif + _init = 1; + return EINA_TRUE; + } + + static Eina_Bool + _evas_outbuf_egl_setup(Outbuf *ob) + { + int ctx_attr[3]; + int cfg_attr[40]; + int maj = 0, min = 0, n = 0, i = 0; + EGLint ncfg; + EGLConfig *cfgs; + const GLubyte *vendor, *renderer, *version, *glslversion; + Eina_Bool blacklist = EINA_FALSE; + + if (!_evas_outbuf_init()) + { + ERR("Could not initialize engine!"); + return EINA_FALSE; + } + + /* setup gbm egl surface */ + ctx_attr[0] = EGL_CONTEXT_CLIENT_VERSION; + ctx_attr[1] = 2; + ctx_attr[2] = EGL_NONE; + + cfg_attr[n++] = EGL_RENDERABLE_TYPE; + cfg_attr[n++] = EGL_OPENGL_ES2_BIT; + cfg_attr[n++] = EGL_SURFACE_TYPE; + cfg_attr[n++] = EGL_WINDOW_BIT; + + cfg_attr[n++] = EGL_RED_SIZE; + cfg_attr[n++] = 1; + cfg_attr[n++] = EGL_GREEN_SIZE; + cfg_attr[n++] = 1; + cfg_attr[n++] = EGL_BLUE_SIZE; + cfg_attr[n++] = 1; + + + cfg_attr[n++] = EGL_ALPHA_SIZE; + if (ob->destination_alpha) cfg_attr[n++] = 1; + else cfg_attr[n++] = 0; + cfg_attr[n++] = EGL_NONE; + -#ifdef EGL_MESA_platform_gbm - ob->egl.disp = - dlsym_eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, ob->info->info.gbm, NULL); -#else ++//#ifdef EGL_MESA_platform_gbm ++// ob->egl.disp = ++// dlsym_eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_MESA, ob->info->info.gbm, NULL); ++//#else + ob->egl.disp = eglGetDisplay((EGLNativeDisplayType)ob->info->info.gbm); -#endif ++//#endif + if (ob->egl.disp == EGL_NO_DISPLAY) + { + ERR("eglGetDisplay() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + if (!eglInitialize(ob->egl.disp, &maj, &min)) + { + ERR("eglInitialize() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + eglBindAPI(EGL_OPENGL_ES_API); + if (eglGetError() != EGL_SUCCESS) + { + ERR("eglBindAPI() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + if (!eglGetConfigs(ob->egl.disp, NULL, 0, &ncfg) || (ncfg == 0)) + { + ERR("eglGetConfigs() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + cfgs = malloc(ncfg * sizeof(EGLConfig)); + if (!cfgs) + { + ERR("Failed to malloc space for egl configs"); + return EINA_FALSE; + } + + if (!eglChooseConfig(ob->egl.disp, cfg_attr, cfgs, + ncfg, &ncfg) || (ncfg == 0)) + { + ERR("eglChooseConfig() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + for (; i < ncfg; ++i) + { + EGLint format; + + if (!eglGetConfigAttrib(ob->egl.disp, cfgs[i], EGL_NATIVE_VISUAL_ID, + &format)) + { + ERR("eglGetConfigAttrib() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + DBG("Config Format: %d", format); + DBG("OB Format: %d", ob->info->info.format); + + if (format == (int)ob->info->info.format) + { + ob->egl.config = cfgs[i]; + break; + } + } + -#ifdef EGL_MESA_platform_gbm - ob->egl.surface[0] = - dlsym_eglCreatePlatformWindowSurfaceEXT(ob->egl.disp, ob->egl.config, - ob->surface, NULL); -#else ++//#ifdef EGL_MESA_platform_gbm ++// ob->egl.surface[0] = ++// dlsym_eglCreatePlatformWindowSurfaceEXT(ob->egl.disp, ob->egl.config, ++// ob->surface, NULL); ++//#else + ob->egl.surface[0] = + eglCreateWindowSurface(ob->egl.disp, ob->egl.config, + (EGLNativeWindowType)ob->surface, NULL); -#endif ++//#endif + if (ob->egl.surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %p. code=%#x", + ob->surface, eglGetError()); + return EINA_FALSE; + } + + ob->egl.context[0] = + eglCreateContext(ob->egl.disp, ob->egl.config, context, ctx_attr); + if (ob->egl.context[0] == EGL_NO_CONTEXT) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + if (context == EGL_NO_CONTEXT) context = ob->egl.context[0]; + + if (eglMakeCurrent(ob->egl.disp, ob->egl.surface[0], + ob->egl.surface[0], ob->egl.context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() fail. code=%#x", eglGetError()); + return EINA_FALSE; + } + + vendor = glGetString(GL_VENDOR); + renderer = glGetString(GL_RENDERER); + version = glGetString(GL_VERSION); + glslversion = glGetString(GL_SHADING_LANGUAGE_VERSION); + if (!vendor) vendor = (unsigned char *)"-UNKNOWN-"; + if (!renderer) renderer = (unsigned char *)"-UNKNOWN-"; + if (!version) version = (unsigned char *)"-UNKNOWN-"; + if (!glslversion) glslversion = (unsigned char *)"-UNKNOWN-"; + if (getenv("EVAS_GL_INFO")) + { + fprintf(stderr, "vendor : %s\n", vendor); + fprintf(stderr, "renderer: %s\n", renderer); + fprintf(stderr, "version : %s\n", version); + fprintf(stderr, "glsl ver: %s\n", glslversion); + } + + if (strstr((const char *)vendor, "Mesa Project")) + { + if (strstr((const char *)renderer, "Software Rasterizer")) + blacklist = EINA_TRUE; + } + if (strstr((const char *)renderer, "softpipe")) + blacklist = EINA_TRUE; + if (strstr((const char *)renderer, "llvmpipe")) + blacklist = EINA_TRUE; + + if ((blacklist) && (!getenv("EVAS_GL_NO_BLACKLIST"))) + { + ERR("OpenGL Driver blacklisted:"); + ERR("Vendor: %s", (const char *)vendor); + ERR("Renderer: %s", (const char *)renderer); + ERR("Version: %s", (const char *)version); + return EINA_FALSE; + } + + ob->gl_context = glsym_evas_gl_common_context_new(); + if (!ob->gl_context) return EINA_FALSE; + + #ifdef GL_GLES + ob->gl_context->egldisp = ob->egl.disp; + ob->gl_context->eglctxt = ob->egl.context[0]; + #endif + + evas_outbuf_use(ob); + glsym_evas_gl_common_context_resize(ob->gl_context, - ob->w, ob->h, ob->rotation); ++ ob->w, ob->h, ob->rotation, 1); + + ob->surf = EINA_TRUE; + + return EINA_TRUE; + } + ++Ecore_Drm_Output* ++_evas_outbuf_output_find(unsigned int crtc_id) ++{ ++ Ecore_Drm_Device *dev; ++ Ecore_Drm_Output *output; ++ Eina_List *devs = ecore_drm_devices_get(); ++ Eina_List *l, *ll; ++ ++ EINA_LIST_FOREACH(devs, l, dev) ++ EINA_LIST_FOREACH(dev->outputs, ll, output) ++ if (ecore_drm_output_crtc_id_get(output) == crtc_id) ++ return output; ++ ++ return NULL; ++} ++ + Outbuf * + evas_outbuf_new(Evas_Engine_Info_GL_Drm *info, int w, int h, Render_Engine_Swap_Mode swap_mode) + { + Outbuf *ob; + char *num; + + if (!info) return NULL; + + /* try to allocate space for outbuf */ + if (!(ob = calloc(1, sizeof(Outbuf)))) return NULL; + + win_count++; + + ob->w = w; + ob->h = h; + ob->info = info; + ob->depth = info->info.depth; + ob->rotation = info->info.rotation; + ob->destination_alpha = info->info.destination_alpha; + /* ob->vsync = info->info.vsync; */ + ob->swap_mode = swap_mode; - ob->priv.num = 2; ++ ob->priv.num = 4; + + if ((num = getenv("EVAS_GL_DRM_BUFFERS"))) + { + ob->priv.num = atoi(num); + if (ob->priv.num <= 0) ob->priv.num = 1; + else if (ob->priv.num > 4) ob->priv.num = 4; + } + + /* if ((num = getenv("EVAS_GL_DRM_VSYNC"))) */ + /* ob->vsync = atoi(num); */ + + if ((ob->rotation == 0) || (ob->rotation == 180)) + _evas_outbuf_gbm_surface_create(ob, w, h); + else if ((ob->rotation == 90) || (ob->rotation == 270)) + _evas_outbuf_gbm_surface_create(ob, h, w); + + if (!_evas_outbuf_egl_setup(ob)) + { + evas_outbuf_free(ob); + return NULL; + } + + return ob; + } + + void + evas_outbuf_free(Outbuf *ob) + { + int ref = 0; + + win_count--; + evas_outbuf_use(ob); + + if (ob == _evas_gl_drm_window) _evas_gl_drm_window = NULL; + + if (ob->gl_context) + { + ref = ob->gl_context->references - 1; + glsym_evas_gl_common_context_free(ob->gl_context); + } + + eglMakeCurrent(ob->egl.disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + + if (ob->egl.context[0] != context) + eglDestroyContext(ob->egl.disp, ob->egl.context[0]); + + if (ob->egl.surface[0] != EGL_NO_SURFACE) + eglDestroySurface(ob->egl.disp, ob->egl.surface[0]); + + _evas_outbuf_gbm_surface_destroy(ob); + + if (ref == 0) + { + if (context) eglDestroyContext(ob->egl.disp, context); + eglTerminate(ob->egl.disp); + eglReleaseThread(); + context = EGL_NO_CONTEXT; + } + + free(ob); + } + + void + evas_outbuf_use(Outbuf *ob) + { + Eina_Bool force = EINA_FALSE; + + glsym_evas_gl_preload_render_lock(_evas_outbuf_make_current, ob); + + if (_evas_gl_drm_window) + { + if (eglGetCurrentContext() != _evas_gl_drm_window->egl.context[0]) + force = EINA_TRUE; + } + + if ((_evas_gl_drm_window != ob) || (force)) + { + if (_evas_gl_drm_window) + { + glsym_evas_gl_common_context_use(_evas_gl_drm_window->gl_context); + glsym_evas_gl_common_context_flush(_evas_gl_drm_window->gl_context); + } + + _evas_gl_drm_window = ob; + + if (ob) + { + if (ob->egl.surface[0] != EGL_NO_SURFACE) + { + if (eglMakeCurrent(ob->egl.disp, ob->egl.surface[0], + ob->egl.surface[0], + ob->egl.context[0]) == EGL_FALSE) + ERR("eglMakeCurrent() failed!"); + } + } + } + + if (ob) glsym_evas_gl_common_context_use(ob->gl_context); + } + + void + evas_outbuf_resurf(Outbuf *ob) + { + if (ob->surf) return; + if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", ob); + + ob->egl.surface[0] = + eglCreateWindowSurface(ob->egl.disp, ob->egl.config, + (EGLNativeWindowType)ob->surface, NULL); + + if (ob->egl.surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %p. code=%#x", + ob->surface, eglGetError()); + return; + } + + if (eglMakeCurrent(ob->egl.disp, ob->egl.surface[0], ob->egl.surface[0], + ob->egl.context[0]) == EGL_FALSE) + ERR("eglMakeCurrent() failed!"); + + ob->surf = EINA_TRUE; + } + + void + evas_outbuf_unsurf(Outbuf *ob) + { + if (!ob->surf) return; + if (!getenv("EVAS_GL_WIN_RESURF")) return; + if (getenv("EVAS_GL_INFO")) printf("unsurf %p\n", ob); + + if (_evas_gl_drm_window) + glsym_evas_gl_common_context_flush(_evas_gl_drm_window->gl_context); + if (_evas_gl_drm_window == ob) + { + eglMakeCurrent(ob->egl.disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (ob->egl.surface[0] != EGL_NO_SURFACE) + eglDestroySurface(ob->egl.disp, ob->egl.surface[0]); + ob->egl.surface[0] = EGL_NO_SURFACE; + + _evas_gl_drm_window = NULL; + } + + ob->surf = EINA_FALSE; + } + + void + evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth) + { + Evas_Public_Data *epd; + Evas_Engine_Info_GL_Drm *einfo; + Render_Engine *re; + struct gbm_surface *osurface; + Outbuf *nob; + + if (depth == OUTBUF_DEPTH_INHERIT) depth = ob->depth; + + epd = eo_data_scope_get(ob->evas, EVAS_CANVAS_CLASS); + EINA_SAFETY_ON_NULL_RETURN(epd); + + re = epd->engine.data.output; + EINA_SAFETY_ON_NULL_RETURN(re); + + einfo = ob->info; + osurface = ob->surface; + + if ((ob->rotation == 0) || (ob->rotation == 180)) + nob = evas_outbuf_new(einfo, w, h, ob->swap_mode); + else + nob = evas_outbuf_new(einfo, h, w, ob->swap_mode); + + if (!nob) + { + ERR("Could not create new Outbuf"); + return; + } + + re->generic.software.ob->gl_context->references++; + + evas_outbuf_free(ob); + re->generic.software.ob = NULL; + + evas_outbuf_use(nob); + + evas_render_engine_software_generic_update(&re->generic.software, nob, w, h); + + re->generic.software.ob->gl_context->references--; + - glsym_evas_gl_common_context_resize(nob->gl_context, w, h, rot); ++ glsym_evas_gl_common_context_resize(nob->gl_context, w, h, rot, 1); + } + + Render_Engine_Swap_Mode + evas_outbuf_buffer_state_get(Outbuf *ob) + { + /* check for valid output buffer */ + if (!ob) return MODE_FULL; + + if (ob->swap_mode == MODE_AUTO && _extn_have_buffer_age) + { + Render_Engine_Swap_Mode swap_mode; + EGLint age = 0; + + if (!eglQuerySurface(ob->egl.disp, ob->egl.surface[0], + EGL_BUFFER_AGE_EXT, &age)) + age = 0; + + if (age == 1) swap_mode = MODE_COPY; + else if (age == 2) swap_mode = MODE_DOUBLE; + else if (age == 3) swap_mode = MODE_TRIPLE; + else if (age == 4) swap_mode = MODE_QUADRUPLE; + else swap_mode = MODE_FULL; + if ((int)age != ob->priv.prev_age) swap_mode = MODE_FULL; + ob->priv.prev_age = age; + + return swap_mode; + } - else ++ else if ((ob->swap_mode != MODE_AUTO) && ++ (ob->swap_mode != MODE_FULL)) + { + int delta; + + delta = (ob->priv.last - ob->priv.curr + + (ob->priv.last > ob->priv.last ? + 0 : ob->priv.num)) % ob->priv.num; + + switch (delta) + { + case 0: + return MODE_COPY; + case 1: + return MODE_DOUBLE; + case 2: + return MODE_TRIPLE; + case 3: + return MODE_QUADRUPLE; + default: + return MODE_FULL; + } + } + + return ob->swap_mode; + } + + int + evas_outbuf_rot_get(Outbuf *ob) + { + return ob->rotation; + } + + Eina_Bool + evas_outbuf_update_region_first_rect(Outbuf *ob) + { + /* ob->gl_context->preserve_bit = GL_COLOR_BUFFER_BIT0_QCOM; */ + + glsym_evas_gl_preload_render_lock(_evas_outbuf_make_current, ob); + evas_outbuf_use(ob); + + if (!_re_wincheck(ob)) return EINA_TRUE; + + /* glsym_evas_gl_common_context_resize(ob->gl_context, ob->w, ob->h, ob->rotation); */ + glsym_evas_gl_common_context_flush(ob->gl_context); + glsym_evas_gl_common_context_newframe(ob->gl_context); + + return EINA_FALSE; + } + + static void + _glcoords_convert(int *result, Outbuf *ob, int x, int y, int w, int h) + { + switch (ob->rotation) + { + case 0: + result[0] = x; + result[1] = ob->gl_context->h - (y + h); + result[2] = w; + result[3] = h; + break; + case 90: + result[0] = y; + result[1] = x; + result[2] = h; + result[3] = w; + break; + case 180: + result[0] = ob->gl_context->w - (x + w); + result[1] = y; + result[2] = w; + result[3] = h; + break; + case 270: + result[0] = ob->gl_context->h - (y + h); + result[1] = ob->gl_context->w - (x + w); + result[2] = h; + result[3] = w; + break; + default: + result[0] = x; + result[1] = ob->gl_context->h - (y + h); + result[2] = w; + result[3] = h; + break; + } + } + + static void + _damage_rect_set(Outbuf *ob, int x, int y, int w, int h) + { + int rects[4]; + + if ((x == 0) && (y == 0) && + (((w == ob->gl_context->w) && (h == ob->gl_context->h)) || + ((h == ob->gl_context->w) && (w == ob->gl_context->h)))) + return; + + _glcoords_convert(rects, ob, x, y, w, h); + glsym_eglSetDamageRegionKHR(ob->egl.disp, ob->egl.surface[0], rects, 1); + } + + void * + evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx EINA_UNUSED, int *cy EINA_UNUSED, int *cw EINA_UNUSED, int *ch EINA_UNUSED) + { + if ((w == ob->w) && (h == ob->h)) + ob->gl_context->master_clip.enabled = EINA_FALSE; + else + { + ob->gl_context->master_clip.enabled = EINA_TRUE; + ob->gl_context->master_clip.x = x; + ob->gl_context->master_clip.y = y; + ob->gl_context->master_clip.w = w; + ob->gl_context->master_clip.h = h; + + if (glsym_eglSetDamageRegionKHR) + _damage_rect_set(ob, x, y, w, h); + } + + return ob->gl_context->def_surface; + } + + void + evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED) + { + /* Is it really necessary to flush per region ? Shouldn't we be able to + still do that for the full canvas when doing partial update */ + if (!_re_wincheck(ob)) return; + ob->drew = EINA_TRUE; + glsym_evas_gl_common_context_flush(ob->gl_context); + } + + void + evas_outbuf_update_region_free(Outbuf *ob EINA_UNUSED, RGBA_Image *update EINA_UNUSED) + { + /* Nothing to do here as we don't really create an image per area */ + } + + void + evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode) + { + if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) goto end; + + if (!_re_wincheck(ob)) goto end; + if (!ob->drew) goto end; + + ob->drew = EINA_FALSE; + evas_outbuf_use(ob); + glsym_evas_gl_common_context_done(ob->gl_context); + + if (!ob->vsync) + { + if (ob->info->info.vsync) eglSwapInterval(ob->egl.disp, 1); + else eglSwapInterval(ob->egl.disp, 0); + ob->vsync = 1; + } + + if (ob->info->callback.pre_swap) + ob->info->callback.pre_swap(ob->info->callback.data, ob->evas); + + if ((glsym_eglSwapBuffersWithDamage) && (rects) && + (ob->swap_mode != MODE_FULL)) + { + EGLint num = 0, *result = NULL, i = 0; + Tilebuf_Rect *r; + + // if partial swaps can be done use re->rects + num = eina_inlist_count(EINA_INLIST_GET(rects)); + if (num > 0) + { + result = alloca(sizeof(EGLint) * 4 * num); + EINA_INLIST_FOREACH(EINA_INLIST_GET(rects), r) + { + _glcoords_convert(&result[i], ob, r->x, r->y, r->w, r->h); + i += 4; + } + glsym_eglSwapBuffersWithDamage(ob->egl.disp, ob->egl.surface[0], + result, num); + } + } + else + eglSwapBuffers(ob->egl.disp, ob->egl.surface[0]); + + if (ob->info->callback.post_swap) + ob->info->callback.post_swap(ob->info->callback.data, ob->evas); + + if (rects) + { + Tilebuf_Rect *r; + Eina_Rectangle *res; + int num, i = 0; + + num = eina_inlist_count(EINA_INLIST_GET(rects)); + res = alloca(sizeof(Eina_Rectangle) * num); + EINA_INLIST_FOREACH(EINA_INLIST_GET(rects), r) + { + res[i].x = r->x; + res[i].y = r->y; + res[i].w = r->w; + res[i].h = r->h; + i++; + } + + _evas_outbuf_buffer_swap(ob, res, num); + } + else + //Flush GL Surface data to Framebuffer + _evas_outbuf_buffer_swap(ob, NULL, 0); + + ob->priv.frame_cnt++; + + end: + //TODO: Need render unlock after drm page flip? + glsym_evas_gl_preload_render_unlock(_evas_outbuf_make_current, ob); + } + + Evas_Engine_GL_Context * + evas_outbuf_gl_context_get(Outbuf *ob) + { + return ob->gl_context; + } + + void * + evas_outbuf_egl_display_get(Outbuf *ob) + { + return ob->egl.disp; + } + + Context_3D * + evas_outbuf_gl_context_new(Outbuf *ob) + { + Context_3D *ctx; + int context_attrs[3] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; + + if (!ob) return NULL; + + ctx = calloc(1, sizeof(Context_3D)); + if (!ctx) return NULL; + + ctx->context = eglCreateContext(ob->egl.disp, ob->egl.config, + ob->egl.context[0], context_attrs); + + if (!ctx->context) + { + ERR("EGL context creation failed."); + goto error; + } + + ctx->display = ob->egl.disp; + ctx->surface = ob->egl.surface[0]; + + return ctx; + + error: + free(ctx); + return NULL; + } + + void + evas_outbuf_gl_context_free(Context_3D *ctx) + { + eglDestroyContext(ctx->display, ctx->context); + free(ctx); + } + + void + evas_outbuf_gl_context_use(Context_3D *ctx) + { + if (eglMakeCurrent(ctx->display, ctx->surface, + ctx->surface, ctx->context) == EGL_FALSE) + ERR("eglMakeCurrent() failed."); + } ++ ++void ++eng_outbuf_copy(Outbuf *ob, void *buffer, int stride, int width EINA_UNUSED, int height, uint format EINA_UNUSED, ++ int sx EINA_UNUSED, int sy EINA_UNUSED, int sw EINA_UNUSED, int sh EINA_UNUSED, ++ int dx EINA_UNUSED, int dy EINA_UNUSED, int dw EINA_UNUSED, int dh EINA_UNUSED) ++{ ++ Ecore_Drm_Output *output; ++ uint fb_handle, fb_fmt; ++ int fb_w, fb_h; ++ void *data; ++ struct drm_mode_map_dumb arg = {0,}; ++ int fd = -1; ++ ++ output = _evas_outbuf_output_find(ob->info->info.crtc_id); ++ ++ /* TODO: should find the better way to find current framebuffer */ ++ ecore_drm_output_current_fb_info_get(output, &fb_handle, &fb_w, &fb_h, &fb_fmt); ++ fd = ecore_drm_device_fd_get(ob->info->info.dev); ++ ++ arg.handle = fb_handle; ++ if (drmIoctl(fd, DRM_IOCTL_MODE_MAP_DUMB, &arg)) ++ { ++ DBG("dump map failed"); ++ return; ++ } ++ ++ data = mmap(NULL, fb_w * fb_h * 4, PROT_READ|PROT_WRITE, MAP_SHARED, ++ fd, arg.offset); ++ if (data == MAP_FAILED) ++ { ++ DBG("mmap failed"); ++ return; ++ } ++ ++ memcpy(buffer, data, stride * height); ++ ++ munmap(data, fb_w * fb_h * 4); ++} diff --cc src/modules/evas/engines/gl_generic/evas_engine.c index 3be84e7,72acaf6..acabaa9 mode 100755,100644..100755 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@@ -2031,20 -2432,61 +2432,21 @@@ _evas_render_op_to_ector_rop(Evas_Rende } static void - eng_ector_renderer_draw(void *data, void *context EINA_UNUSED, void *surface, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async EINA_UNUSED) -eng_ector_renderer_draw(void *data, void *context, void *surface, Ector_Renderer *renderer, Eina_Array *clips, Eina_Bool do_async EINA_UNUSED) ++eng_ector_renderer_draw(void *data, void *context, void *surface, Ector_Renderer *renderer, Eina_Array *clips EINA_UNUSED, Eina_Bool do_async EINA_UNUSED) { - Evas_GL_Image *dst = surface; + Evas_GL_Image *glimg = surface; + RGBA_Image *img = glimg->im; Evas_Engine_GL_Context *gc; Render_Engine_GL_Generic *re = data; - Eina_Rectangle *r; Eina_Array *c; - Eina_Rectangle clip; - Eina_Array_Iterator it; - unsigned int i; + Eina_Rectangle *r; + + //TODO handle, clips properly + c = eina_array_new(1); + eina_array_push(c, eina_rectangle_new(0, 0, img->cache_entry.w, img->cache_entry.h)); gc = re->window_gl_context_get(re->software.ob); + gc->dc = context; - if (gc->dc->clip.use) - { - clip.x = gc->dc->clip.x; - clip.y = gc->dc->clip.y; - clip.w = gc->dc->clip.w; - clip.h = gc->dc->clip.h; - } - else - { - clip.x = 0; - clip.y = 0; - clip.w = dst->w; - clip.h = dst->h; - } - - c = eina_array_new(8); - if (clips) - { - EINA_ARRAY_ITER_NEXT(clips, i, r, it) - { - Eina_Rectangle *rc; - - rc = eina_rectangle_new(r->x, r->y, r->w, r->h); - if (!rc) continue; - - if (eina_rectangle_intersection(rc, &clip)) - eina_array_push(c, rc); - else - eina_rectangle_free(rc); - } - - if (eina_array_count(c) == 0 && - eina_array_count(clips) > 0) - { - eina_array_free(c); - return; - } - } - - if (eina_array_count(c) == 0) - eina_array_push(c, eina_rectangle_new(clip.x, clip.y, clip.w, clip.h)); - eo_do(renderer, ector_renderer_draw(_evas_render_op_to_ector_rop(gc->dc->render_op), c, @@@ -2055,73 -2498,93 +2457,71 @@@ eina_array_free(c); } -static void *software_buffer = NULL; +static void * +eng_ector_surface_create(void *data, void *surface, int width, int height) +{ + Evas_GL_Image *glim; - //@TODO hack to force the texture not to created in a texture atlas - if (width < 256) width = 256; - if (height < 256) height = 256; + + if (!surface) + { + surface = eng_image_new_from_copied_data(data, width, height, NULL, EINA_TRUE, EVAS_COLORSPACE_ARGB8888); + } + else + { + int cur_w , cur_h; + glim = surface; + cur_w = glim->im->cache_entry.w; + cur_h = glim->im->cache_entry.h; + if (width != cur_w || height != cur_h) + { + eng_image_free(data, surface); + surface = eng_image_new_from_copied_data(data, width, height, NULL, EINA_TRUE, EVAS_COLORSPACE_ARGB8888); + } + } + // clear the buffer + glim = surface; + void *pixels = evas_cache_image_pixels(&glim->im->cache_entry); + memset(pixels, 0, width * height *4); + return surface; +} static void - eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface, int x, int y, Eina_Bool do_async EINA_UNUSED) + eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface *ector, + void *surface, int x, int y, Eina_Bool do_async EINA_UNUSED) { - Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; int w, h; - void *temp; - - re->window_use(re->software.ob); - gl_context = re->window_gl_context_get(re->software.ob); - evas_gl_common_context_target_surface_set(gl_context, surface); - gl_context->dc = context; - - w = gl_context->w; h = gl_context->h; - - temp = software_buffer; - software_buffer = realloc(software_buffer, sizeof (unsigned int) * w * h); - if (!software_buffer) - { - ERR("Realloc failed!!"); - software_buffer = temp; - return; - } - memset(software_buffer, 0, sizeof (unsigned int) * w * h); + Evas_GL_Image *glim = surface; + RGBA_Image *dst = glim->im; + w = dst->cache_entry.w; + h = dst->cache_entry.h; + void *pixels = evas_cache_image_pixels(&dst->cache_entry); if (use_cairo) { - eo_do(_software_ector, + eo_do(ector, - ector_cairo_software_surface_set(software_buffer, w, h), + ector_cairo_software_surface_set(pixels, w, h), ector_surface_reference_point_set(x, y)); } else { - eo_do(_software_ector, + eo_do(ector, - ector_software_surface_set(software_buffer, w, h), + ector_software_surface_set(pixels, w, h), ector_surface_reference_point_set(x, y)); } } static void - eng_ector_end(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface EINA_UNUSED, Eina_Bool do_async EINA_UNUSED) -eng_ector_end(void *data, void *context EINA_UNUSED, Ector_Surface *ector, - void *surface EINA_UNUSED, Eina_Bool do_async EINA_UNUSED) ++eng_ector_end(void *data EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface *ector, void *surface EINA_UNUSED, Eina_Bool do_async EINA_UNUSED) { - Evas_Engine_GL_Context *gl_context; - Render_Engine_GL_Generic *re = data; - Evas_GL_Image *im; - int w, h; - Eina_Bool mul_use; - - gl_context = re->window_gl_context_get(re->software.ob); - w = gl_context->w; h = gl_context->h; - mul_use = gl_context->dc->mul.use; - if (use_cairo) { - eo_do(_software_ector, + eo_do(ector, ector_cairo_software_surface_set(NULL, 0, 0)); } else { - eo_do(_software_ector, + eo_do(ector, ector_software_surface_set(NULL, 0, 0)); } - - im = evas_gl_common_image_new_from_copied_data(gl_context, w, h, software_buffer, 1, EVAS_COLORSPACE_ARGB8888); - - if (!mul_use) - { - // @hack as image_draw uses below fields to do colour multiplication. - gl_context->dc->mul.col = ector_color_multiply(0xffffffff,gl_context->dc->col.col); - gl_context->dc->mul.use = EINA_TRUE; - } - - // We actually just bluntly push the pixel all over the - // destination surface. We don't have the actual information - // of the widget size. This is not a problem. - // Later on, we don't want that information and today when - // using GL backend, you just need to turn on Evas_Map on - // the Evas_Object_VG. - evas_gl_common_image_draw(gl_context, im, 0, 0, w, h, 0, 0, w, h, 0); - - evas_gl_common_image_free(im); - - // restore gl state - gl_context->dc->mul.use = mul_use; } static Evas_Func func, pfunc; diff --cc src/modules/evas/engines/gl_sdl/evas_engine.c index 61ab67b,56a2c7d..98962fe mode 100644,100644..100755 --- a/src/modules/evas/engines/gl_sdl/evas_engine.c +++ b/src/modules/evas/engines/gl_sdl/evas_engine.c diff --cc src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h index db37cd0,ded7ca4..ded7ca4 mode 100644,100644..100755 --- a/src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h +++ b/src/modules/evas/engines/gl_x11/Evas_Engine_GL_X11.h diff --cc src/modules/evas/engines/gl_x11/evas_engine.c index 7cfa631,7713c21..7713c21 mode 100755,100644..100755 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c diff --cc src/modules/evas/engines/gl_x11/evas_x_main.c index 55145ac,d2a0617..275611d mode 100644,100644..100755 --- a/src/modules/evas/engines/gl_x11/evas_x_main.c +++ b/src/modules/evas/engines/gl_x11/evas_x_main.c diff --cc src/modules/evas/engines/software_generic/evas_engine.c index c63de51,267867b..e51d49b --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@@ -3638,14 -3864,8 +3864,14 @@@ _draw_thread_ector_surface_set(void *da eina_mempool_free(_mp_command_ector_surface, ector_surface); } +static void * +eng_ector_surface_create(void *data EINA_UNUSED, void *surface EINA_UNUSED, int width EINA_UNUSED, int height EINA_UNUSED) +{ + return NULL; +} + static void - eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, void *surface, int x, int y, Eina_Bool do_async) + eng_ector_begin(void *data EINA_UNUSED, void *context EINA_UNUSED, Ector_Surface *ector, void *surface, int x, int y, Eina_Bool do_async) { if (do_async) { @@@ -3887,12 -4121,12 +4127,14 @@@ static Evas_Func func NULL, // eng_texture_filter_set NULL, // eng_texture_filter_get NULL, // eng_texture_image_set + NULL, // eng_texture_image_get + NULL, // eng_output_copy - eng_ector_get, + eng_ector_create, + eng_ector_destroy, eng_ector_begin, eng_ector_renderer_draw, - eng_ector_end + eng_ector_end, - eng_ector_surface_create ++ eng_ector_surface_create /* FUTURE software generic calls go here */ }; diff --cc src/modules/evas/engines/software_x11/evas_xlib_swapper.c index dbe4e4e,c60c9d7..c60c9d7 mode 100644,100644..100755 --- a/src/modules/evas/engines/software_x11/evas_xlib_swapper.c +++ b/src/modules/evas/engines/software_x11/evas_xlib_swapper.c diff --cc src/modules/evas/engines/wayland_egl/evas_engine.c index ae83ce1,3b44b07..dc2f677 mode 100755,100644..100755 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@@ -33,17 -34,8 +34,18 @@@ typedef struct _Native Native struct _Native { Evas_Native_Surface ns; + struct wl_buffer *wl_buf; void *egl_surface; + + void *surface; +}; + +/* Evas GL wl_surface & wl_egl_window */ +typedef struct _Evgl_wl_Surface Evgl_wl_Surface; +struct _Evgl_wl_Surface +{ + struct wl_surface *wl_surf; + struct wl_egl_window *egl_win; }; /* local function prototypes */ @@@ -179,15 -162,20 +183,20 @@@ gl_symbols(void FINDSYM(glsym_eglDestroyImage, "eglDestroyImageARB", glsym_func_void); FINDSYM(glsym_eglDestroyImage, "eglDestroyImage", glsym_func_void); - FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", + FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void); - FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageEXT", + FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageEXT", glsym_func_uint); - FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageINTEL", + FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamageINTEL", glsym_func_uint); - FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage", + FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage", glsym_func_uint); + FINDSYM(glsym_eglSetDamageRegionKHR, "eglSetDamageRegionKHR", + glsym_func_uint); + + FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL", + glsym_func_uint); done = EINA_TRUE; } @@@ -677,11 -494,12 +699,12 @@@ static const EVGL_Interface evgl_funcs evgl_eng_proc_address_get, evgl_eng_string_get, evgl_eng_rotation_angle_get, - NULL, // PBuffer - NULL, // PBuffer + evgl_eng_pbuffer_surface_create, + evgl_eng_pbuffer_surface_destroy, - NULL, //gles1_surface_create - NULL, // gles1_surface_destroy - NULL, //native_win_surface_config_check + NULL, // OpenGL-ES 1 + NULL, // OpenGL-ES 1 + NULL, // OpenGL-ES 1 + NULL, // native_win_surface_config_get }; /* engine functions */ @@@ -1017,29 -803,27 +1031,42 @@@ _native_cb_bind(void *data EINA_UNUSED if (!(img = image)) return; if (!(n = img->native.data)) return; - if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) + if (n->ns.type == EVAS_NATIVE_SURFACE_WL) + { + if (n->egl_surface) + { + if (glsym_glEGLImageTargetTexture2DOES) + { + glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("glEGLImageTargetTexture2DOES() failed."); + } + else + ERR("Try glEGLImageTargetTexture2DOES on EGL with no support"); + } + } + else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) { glBindTexture(GL_TEXTURE_2D, n->ns.data.opengl.texture_id); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); } + else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL) + { + if (n->egl_surface) + { - void *surface = glsym_evgl_native_surface_buffer_get(n->egl_surface); ++ void *surface = glsym_evgl_native_surface_buffer_get(n->egl_surface, NULL); + if (glsym_glEGLImageTargetTexture2DOES) + { + glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, surface); + if (eglGetError() != EGL_SUCCESS) + ERR("glEGLImageTargetTexture2DOES() failed."); + } + else + ERR("Try glEGLImageTargetTexture2DOES on EGL with no support"); + } + } } -static void +static void _native_cb_unbind(void *data EINA_UNUSED, void *image) { Evas_GL_Image *img; @@@ -1048,18 -832,17 +1075,21 @@@ if (!(img = image)) return; if (!(n = img->native.data)) return; - if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) + if (n->ns.type == EVAS_NATIVE_SURFACE_WL) + { + //glBindTexture(GL_TEXTURE_2D, 0); //really need? + } + else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) { glBindTexture(GL_TEXTURE_2D, 0); - GLERR(__FUNCTION__, __FILE__, __LINE__, ""); } + else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL) + { + // nothing + } } -static void +static void _native_cb_free(void *data, void *image) { Render_Engine *re; @@@ -1130,7 -898,7 +1177,8 @@@ eng_image_native_set(void *data, void * Evas_GL_Image *img, *img2; unsigned int tex = 0, fbo = 0; uint32_t texid; + void *buffer = NULL; + void *wlid, *wl_buf = NULL; if (!(re = (Render_Engine *)data)) return NULL; if (!(ob = eng_get_ob(re))) return NULL; @@@ -1152,30 -920,35 +1200,45 @@@ return NULL; } - if ((ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL)) + if (ns) { - tex = ns->data.opengl.texture_id; - fbo = ns->data.opengl.framebuffer_id; - if (img->native.data) + if (ns->type == EVAS_NATIVE_SURFACE_WL) { - Evas_Native_Surface *ens; + wl_buf = ns->data.wl.legacy_buffer; + if (img->native.data) + { + Evas_Native_Surface *ens; - ens = img->native.data; - if ((ens->data.opengl.texture_id == tex) && - (ens->data.opengl.framebuffer_id == fbo)) - return img; + ens = img->native.data; + if (ens->data.wl.legacy_buffer == wl_buf) + return img; + } + } + else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL) + { + tex = ns->data.opengl.texture_id; + fbo = ns->data.opengl.framebuffer_id; + if (img->native.data) + { + Evas_Native_Surface *ens; + + ens = img->native.data; + if ((ens->data.opengl.texture_id == tex) && + (ens->data.opengl.framebuffer_id == fbo)) + return img; + } } } + else if ((ns) && (ns->type == EVAS_NATIVE_SURFACE_EVASGL)) + { + buffer = ns->data.evasgl.surface; + if (img->native.data) + { + Evas_Native_Surface *ens = img->native.data; + if (ens->data.evasgl.surface == buffer) + return img; + } + } if ((!ns) && (!img->native.data)) return img; diff --cc src/modules/evas/engines/wayland_egl/evas_engine.h index 7313430,a4ccbf8..ef96ba9 mode 100644,100644..100755 --- a/src/modules/evas/engines/wayland_egl/evas_engine.h +++ b/src/modules/evas/engines/wayland_egl/evas_engine.h diff --cc src/modules/evas/engines/wayland_shm/evas_engine.c index 48c6ae8,de4ea9e..010f0ca --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@@ -52,14 -35,14 +35,14 @@@ _render_engine_swapbuf_setup(int w, in /* try to allocate space for new render engine */ if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; - ob = _evas_outbuf_setup(w, h, rotation, depth, alpha, shm, surface); + ob = _evas_outbuf_setup(w, h, rotation, depth, alpha, shm, surface, disp); if (!ob) goto err; - if (!evas_render_engine_software_generic_init(&re->generic, ob, + if (!evas_render_engine_software_generic_init(&re->generic, ob, - _evas_outbuf_swapmode_get, + _evas_outbuf_swap_mode_get, _evas_outbuf_rotation_get, NULL, - NULL, + NULL, _evas_outbuf_update_region_new, _evas_outbuf_update_region_push, _evas_outbuf_update_region_free, @@@ -134,34 -129,18 +129,18 @@@ eng_setup(Evas *eo_evas, void *info if (!(re = epd->engine.data.output)) { /* if we have no engine data, assume we have not initialized yet */ - evas_common_cpu_init(); - evas_common_blend_init(); - evas_common_image_init(); - evas_common_convert_init(); - evas_common_scale_init(); - evas_common_rectangle_init(); - evas_common_polygon_init(); - evas_common_line_init(); - evas_common_font_init(); - evas_common_draw_init(); - evas_common_tilebuf_init(); + evas_common_init(); re = _render_engine_swapbuf_setup(epd->output.w, epd->output.h, - einfo->info.rotation, - einfo->info.depth, + einfo->info.rotation, + einfo->info.depth, einfo->info.destination_alpha, - einfo->info.wl_shm, + einfo->info.wl_shm, - einfo->info.wl_surface); + einfo->info.wl_surface, + einfo->info.wl_disp); - if (re) + if (re) - { - re->generic.ob->info = einfo; - if (re->generic.ob->surface) - { - re->generic.ob->surface->callback.released = einfo->callback.released; - re->generic.ob->surface->callback.data = einfo->callback.data; - } - } + re->generic.ob->info = einfo; else goto err; } @@@ -169,21 -148,16 +148,16 @@@ { Outbuf *ob; - ob = _evas_outbuf_setup(epd->output.w, epd->output.h, - einfo->info.rotation, einfo->info.depth, - einfo->info.destination_alpha, + ob = _evas_outbuf_setup(epd->output.w, epd->output.h, + einfo->info.rotation, einfo->info.depth, + einfo->info.destination_alpha, - einfo->info.wl_shm, - einfo->info.wl_surface); + einfo->info.wl_shm, einfo->info.wl_surface, + einfo->info.wl_disp); if (ob) { ob->info = einfo; - if (ob->surface) - { - ob->surface->callback.released = einfo->callback.released; - ob->surface->callback.data = einfo->callback.data; - } - evas_render_engine_software_generic_update(&re->generic, ob, - epd->output.w, + evas_render_engine_software_generic_update(&re->generic, ob, + epd->output.w, epd->output.h); } } diff --cc src/tests/evas/evas_test_filters.c index 320fcf9,ea27256..ea27256 mode 100644,100644..100755 --- a/src/tests/evas/evas_test_filters.c +++ b/src/tests/evas/evas_test_filters.c