[EGIT] [admin/devs] master 02/02: developers/stefan: switch to a shiny new Curve25519 ssh key for my work machine
stefan pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=03f7908ec2df5f05eaf990064a4735f5219ea786 commit 03f7908ec2df5f05eaf990064a4735f5219ea786 Author: Stefan Schmidt Date: Wed Aug 19 10:06:53 2015 +0200 developers/stefan: switch to a shiny new Curve25519 ssh key for my work machine --- developers/stefan/id_ed25519.pub | 1 + 1 file changed, 1 insertion(+) diff --git a/developers/stefan/id_ed25519.pub b/developers/stefan/id_ed25519.pub new file mode 100644 index 000..376efb6 --- /dev/null +++ b/developers/stefan/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 C3NzaC1lZDI1NTE5ILwWECufavanqaMGQvKliNRYbS4zp5jOfcvp5Asev/q4 stefan@workmachine --
[EGIT] [admin/devs] master 01/02: developers/stefan: Remove outdated build script
stefan pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=01aed1cf1290589da206a2337805579153b2cf42 commit 01aed1cf1290589da206a2337805579153b2cf42 Author: Stefan Schmidt Date: Wed Aug 19 10:03:01 2015 +0200 developers/stefan: Remove outdated build script --- developers/stefan/build-efl.sh | 114 - 1 file changed, 114 deletions(-) diff --git a/developers/stefan/build-efl.sh b/developers/stefan/build-efl.sh deleted file mode 100755 index 0066eb6..000 --- a/developers/stefan/build-efl.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh - -# autotools-dev automake autopoint libtool zlib1g-dev libjpeg62-dev libfreetype6-dev libx11-dev subversion git -# libglib2.0-dev libxext-dev libxcursor-dev libudev-dev libcurl4-gnutls-dev libc-ares-dev liblua5.1-0-dev libpng12-dev -# libtiff4-dev libfontconfig1-dev libxcb-shape0-dev libxrender-dev libgif-dev libglu1-mesa-dev mesa-common-dev -# librsvg2-dev libfribidi-dev libpixman-1-dev libxss-dev libxp-dev libxtst-dev graphviz libasound2-dev libpam0g-dev" - -#defcore="ecore-1.7 eet-1.7 eina-1.7 eio-1.7 embryo-1.7 evas-1.7 -# evas_generic_loaders-1.7 edje-1.7 emotion-1.7 eeze-1.7 -# e_dbus-1.7 efreet-1.7 elementary-1.7" -defcore="../../efl evas_generic_loaders PROTO/libeweather PROTO/emap elementary" -defapps="terminology e ephoto rage expedite" - -defpkgs="$defcore $defapps" - -# fail on errors -set -e -#set -x - -# Add -std=gnu99 when having problems with clang and dns.c in ecore_con -export CFLAGS="-O2 -Wall -g -Wextra -Wshadow -fvisibility=hidden -fdata-sections -ffunction-sections" -export CXXFLAGS="$CFLAGS" -export LDFLAGS="-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--as-needed" - -do_scan_build() -{ - local e flags - - e="$1" - echo - echo "Scan build for $e" - echo - case $e in - *) - flags="" - ;; - esac - (cd "$e" && scan-build -analyze-headers --use-cc=/usr/bin/clang ./configure $flags && scan-build -o ~/EFL/scan-build-reports/$e make $MAKEFLAGS) || exit 1 -} - -do_build_and_install() -{ - local e flags - - e="$1" - echo - echo "Building $e" - echo - case $e in - *) - flags="" - ;; - esac - (cd "$e" && rm -f config.cache && ./autogen.sh $flags) || exit 1 - (cd "$e" && make "$MAKEFLAGS" && sudo make install && sudo ldconfig) || exit 1 - echo - echo "Built $e" - echo -} - -# how many CPUs? -if [ -f /proc/cpuinfo ] -then - cpus="`grep ^processor /proc/cpuinfo | wc -l`" -cpus=$(($cpus+2)) -fi -[ "$cpus" ] || cpus=4 -MAKEFLAGS="-j$cpus" - -debian=0 -force=0 -scan_build=0 - -while [ $# -ge 1 ] -do - case "$1" in - --scan) - scan_build=1 - ;; - -*) - echo "Unknown option $1" >&2 - exit 1 - ;; - *) - what="$what $1" - ;; - esac - shift -done - -if [ ! "$what" ] -then - what="$defpkgs" -fi - -if [ "$scan_build" = 1 ] -then - for e in $defcore - do - do_scan_build "$e" - done - exit 0 -fi - -for e in $what -do - if [ ! -d "$e" ] - then - echo "$e directory missing?" - exit 1 - fi - - do_build_and_install "$e" -done --
[EGIT] [admin/devs] master 01/01: New key.
kwo pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=56aecacc75ebecf06f43a155a809ab0b96ca51b4 commit 56aecacc75ebecf06f43a155a809ab0b96ca51b4 Author: Kim Woelders Date: Wed Aug 19 12:40:49 2015 +0200 New key. --- developers/kwo/id_rsa.pub | 1 + 1 file changed, 1 insertion(+) diff --git a/developers/kwo/id_rsa.pub b/developers/kwo/id_rsa.pub new file mode 100644 index 000..fd21590 --- /dev/null +++ b/developers/kwo/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa B3NzaC1yc2EDAQABAAABAQCTTaBriZhEkujVmq7LBGout/bX6XBHqApULBbn1sno5XUBnGeUwUJJQmZ4BEmo6ac0UUd5h7MWkU+K1qyiMgSeKWk8FeStNOPwUKBtaHFguRMOxAMA5BrTZZRfVsQHWTcNR8LIOne2NIEgNFeGN+YjQi2HprHvrJlAAivhlSbPW80qI3R8Ay0sTbhevB7/PE3rQEswzdevRCvMO3XQfo1vEIblwkM2pBW74zUxlGu7JKnYSq6ItdX84WB/uI3bxNPU18YtTN1txspvyUxKsV3H9sbPOqLbeWhW3XRiOCJiuwwgTElC0kXt5e3rjgkeLJR30ZMGjwR3dR999OUpiGtV kw@kwport2 --
[EGIT] [admin/devs] master 01/01: Remove old key.
kwo pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=9984c03c2d8506ddd7f8fea7aa2327135f0fe318 commit 9984c03c2d8506ddd7f8fea7aa2327135f0fe318 Author: Kim Woelders Date: Wed Aug 19 13:26:42 2015 +0200 Remove old key. --- developers/kwo/id_dsa.pub | 1 - 1 file changed, 1 deletion(-) diff --git a/developers/kwo/id_dsa.pub b/developers/kwo/id_dsa.pub deleted file mode 100644 index 5220214..000 --- a/developers/kwo/id_dsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-dss B3NzaC1kc3MAAACBAJBRkv2fO8vnNZMtLQVszrRzMOaueyp35sOUgi6QPLjxF3o1ejOrCTsTT5Yzq/Cg5HMPxrSsjAoY6Zllc6bliG9AkgYd7Gq8XVxgBRxtMIM4E6DezJw/BGxE1RjddntSAthWKxOwhxJ371czM+XWrsB+SwV4AaaVyA381opRIcGXFQC1QC5M9ravgo7XWEG1r3bIpYCBoQAAAIAqBPAnJ70lML/0WVG+XqCaxGMifnoBkpGXmbX0jMNZlHwWlfHy86D7tWZkR1XnchajG1sbfdnFQa1V8H+oX0e/8oJSyncBpIFNpTiSXVQFjMyLgDq7L/X6rHyL7BYlvrd+1ONRHHavEFCvXlVXSO22aIeyhzYzoi8u3suzfj+0XgAAAIBh0jzL68JQA/rN/46JuO3v84tkCyM2k3M+n5GHxITzexrfZD3C4KI8PwrVShWvNHxqbGoOwHX1kbdG [...] --
[EGIT] [admin/devs] master 01/01: ed25519
englebass pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=a8917a551a8078a7bb910d8511f37b2c6607689b commit a8917a551a8078a7bb910d8511f37b2c6607689b Author: Sebastian Dransfeld Date: Wed Aug 19 14:05:49 2015 +0200 ed25519 --- developers/englebass/id_ed25519.pub | 1 + developers/englebass/id_rsa.pub | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/developers/englebass/id_ed25519.pub b/developers/englebass/id_ed25519.pub new file mode 100644 index 000..f358c00 --- /dev/null +++ b/developers/englebass/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 C3NzaC1lZDI1NTE5IPnDhFRO/KcqQ/8c+AwSnMBcPP1FnWbX28PpFVBklfd8 sd@srm-5142 diff --git a/developers/englebass/id_rsa.pub b/developers/englebass/id_rsa.pub deleted file mode 100644 index 444b8a4..000 --- a/developers/englebass/id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa B3NzaC1yc2EDAQABAAABAQC/5/T+mrYX/9K65DgUDSy4LYDdXHVTDUTFYONsWEJBxCTlYKOsm+Z6U4ZUa7thiqHJYHU3Sk7CO3Gq+DcDhn7cFhWybwlqj62981LzPxDqZfqNEhfZEVeuFzPzMaX4QXeDychAIoezUpiL+71Yn4AY0oiTMB4UIqGpqF6637SAws6WaNXXuLUBPRjfxzQs6gekaBcuJdRAtCqA3zX4IJODhPY1cG7/Jn3LzMZ92bC2ziVQX11KUbOsvXW6nn3ZyN4stHZh26Jh40OoRGkpmdnxKcW8hFE9onG2ixogNcF79zMr3175DEgQKYwG7rl3H9JsAAdnWdm5M2km91VSl4P3 sd@srm-5142 --
[EGIT] [core/efl] master 04/13: ector: fix memory leak in software backend when using shape.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fcb2605f4f5e8c89007818bb968994a4df295ecd commit fcb2605f4f5e8c89007818bb968994a4df295ecd Author: Subhransu Mohanty Date: Mon Aug 17 13:54:49 2015 +0900 ector: fix memory leak in software backend when using shape. Mixin destructor are not called, so we need to explicitely call it. Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_renderer_software_shape.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c index a91b80e..1c985d4 100644 --- a/src/lib/ector/software/ector_renderer_software_shape.c +++ b/src/lib/ector/software/ector_renderer_software_shape.c @@ -378,6 +378,9 @@ void _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd) { Eo *parent; + //FIXME, As base class destructor can't call destructor of mixin class. + // call explicit API to free shape data. + eo_do(obj, efl_gfx_shape_reset()); if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data); if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data); --
[EGIT] [core/efl] master 02/13: ector: now software rasterizer allocates memory on stack to work in multi threading env.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=146f3c52b50cde7d356e904858ac9aad7fa6710a commit 146f3c52b50cde7d356e904858ac9aad7fa6710a Author: Subhransu Mohanty Date: Mon Aug 17 13:13:38 2015 +0900 ector: now software rasterizer allocates memory on stack to work in multi threading env. Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_software_rasterizer.c | 5 -- src/lib/ector/software/sw_ft_raster.c | 59 +++--- 2 files changed, 17 insertions(+), 47 deletions(-) diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c index d98a8dc..47a0cae 100644 --- a/src/lib/ector/software/ector_software_rasterizer.c +++ b/src/lib/ector/software/ector_software_rasterizer.c @@ -304,14 +304,10 @@ _adjust_span_fill_methods(Span_Data *spdata) } } - - void ector_software_rasterizer_init(Software_Rasterizer *rasterizer) { // initialize the rasterizer and stroker - unsigned char* renderPool = (unsigned char*) malloc(1024 * 100); sw_ft_grays_raster.raster_new(&rasterizer->raster); - sw_ft_grays_raster.raster_reset(rasterizer->raster, renderPool, 1024*100); SW_FT_Stroker_New(&rasterizer->stroker); SW_FT_Stroker_Set(rasterizer->stroker, 1<<6,SW_FT_STROKER_LINECAP_BUTT,SW_FT_STROKER_LINEJOIN_MITER,0); @@ -327,7 +323,6 @@ void ector_software_rasterizer_done(Software_Rasterizer *rasterizer) { sw_ft_grays_raster.raster_done(rasterizer->raster); SW_FT_Stroker_Done(rasterizer->stroker); - //TODO free the pool memory } diff --git a/src/lib/ector/software/sw_ft_raster.c b/src/lib/ector/software/sw_ft_raster.c index f20a881..38b8539 100644 --- a/src/lib/ector/software/sw_ft_raster.c +++ b/src/lib/ector/software/sw_ft_raster.c @@ -104,7 +104,9 @@ typedef ptrdiff_t SW_FT_PtrDist; #define SW_FT_ERROR( x ) do { } while ( 0 ) /* nothing */ #define SW_FT_THROW( e ) SW_FT_ERR_CAT( ErrRaster_, e ) - + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work.*/ +#define SW_FT_RENDER_POOL_SIZE 16384L typedef int (*SW_FT_Outline_MoveToFunc)( const SW_FT_Vector* to, @@ -383,11 +385,7 @@ typedef struct SW_FT_Outline_Funcs_ typedef struct gray_TRaster_ { -void* buffer; -long buffer_size; -int band_size; void* memory; -gray_PWorker worker; } gray_TRaster, *gray_PRaster; @@ -1719,16 +1717,20 @@ typedef struct SW_FT_Outline_Funcs_ return 0; } - static int gray_raster_render( gray_PRaster raster, const SW_FT_Raster_Params* params ) { -const SW_FT_Outline* outline= (const SW_FT_Outline*)params->source; -gray_PWorker worker; +const SW_FT_Outline* outline = (const SW_FT_Outline*)params->source; +gray_TWorker worker[1]; -if ( !raster || !raster->buffer || !raster->buffer_size ) +TCell buffer[SW_FT_RENDER_POOL_SIZE / sizeof ( TCell )]; +long buffer_size = sizeof ( buffer ); +intband_size = (int)( buffer_size / +(long)( sizeof ( TCell ) * 8 ) ); + +if ( !raster) return SW_FT_THROW( Invalid_Argument ); if ( !outline ) @@ -1745,8 +1747,6 @@ typedef struct SW_FT_Outline_Funcs_ outline->contours[outline->n_contours - 1] + 1 ) return SW_FT_THROW( Invalid_Outline ); -worker = raster->worker; - /* this version does not support monochrome rendering */ if ( !( params->flags & SW_FT_RASTER_FLAG_AA ) ) return SW_FT_THROW( Invalid_Mode ); @@ -1761,13 +1761,14 @@ typedef struct SW_FT_Outline_Funcs_ ras.clip_box.yMax = 32767L; } -gray_init_cells( RAS_VAR_ raster->buffer, raster->buffer_size ); +gray_init_cells( RAS_VAR_ buffer, buffer_size ); ras.outline= *outline; ras.num_cells = 0; ras.invalid= 1; -ras.band_size = raster->band_size; +ras.band_size = band_size; ras.num_gray_spans = 0; +ras.span_y = 0; ras.render_span = (SW_FT_Raster_Span_Func)params->gray_spans; ras.render_span_data = params->user; @@ -1775,7 +1776,6 @@ typedef struct SW_FT_Outline_Funcs_ return gray_convert_glyph( RAS_VAR ); } - / RASTER OBJECT CREATION: In stand-alone mode, we simply use */ / a static object. */ @@ -1803,34 +1803,9 @@ typedef struct SW_FT_Outline_Funcs_ char* pool_base, long pool_size ) { -gray_PRaster rast = (gray_PRaster)raster; - - -if ( raster ) -{ - if ( pool_base && pool_size >= (long)sizeof ( gray_TWorker ) + 2048 ) - { -gray_PWorker worker = (gray_PWorker)pool_base; - - -rast->worker
[EGIT] [core/efl] master 11/13: ector: add NEON support for composition function in software backend.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bed8325e3c2632782c01d21d008b09be7b8b3a3e commit bed8325e3c2632782c01d21d008b09be7b8b3a3e Author: Subhransu Mohanty Date: Mon Aug 17 15:42:48 2015 +0900 ector: add NEON support for composition function in software backend. Signed-off-by: Cedric BAIL --- src/Makefile_Ector.am | 3 +- src/lib/ector/software/ector_drawhelper.c | 2 + src/lib/ector/software/ector_drawhelper_neon.c | 226 + 3 files changed, 230 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am index 26e934d..3d158ef 100644 --- a/src/Makefile_Ector.am +++ b/src/Makefile_Ector.am @@ -97,7 +97,8 @@ lib/ector/software/sw_ft_math.c \ lib/ector/software/sw_ft_raster.c \ lib/ector/software/sw_ft_stroker.c \ lib/ector/software/ector_drawhelper.c \ -lib/ector/software/ector_drawhelper_sse2.c +lib/ector/software/ector_drawhelper_sse2.c \ +lib/ector/software/ector_drawhelper_neon.c installed_ectorsoftwareheadersdir = $(includedir)/ector-@VMAJ@/software nodist_installed_ectorsoftwareheaders_DATA = $(ector_eolian_software_h) diff --git a/src/lib/ector/software/ector_drawhelper.c b/src/lib/ector/software/ector_drawhelper.c index 26d8f98..39180b8 100644 --- a/src/lib/ector/software/ector_drawhelper.c +++ b/src/lib/ector/software/ector_drawhelper.c @@ -150,8 +150,10 @@ RGBA_Comp_Func ector_comp_func_span_get(Ector_Rop op, uint color, Eina_Bool src_ } extern void init_draw_helper_sse2(); +extern void init_draw_helper_neon(); void init_draw_helper() { init_draw_helper_sse2(); + init_draw_helper_neon(); } diff --git a/src/lib/ector/software/ector_drawhelper_neon.c b/src/lib/ector/software/ector_drawhelper_neon.c new file mode 100644 index 000..3adfdba --- /dev/null +++ b/src/lib/ector/software/ector_drawhelper_neon.c @@ -0,0 +1,226 @@ +#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; +
[EGIT] [core/efl] master 10/13: ector: add sse2 support for composition function in software backend.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=74dcf5ed15061349614c9d9a33437808734d5afb commit 74dcf5ed15061349614c9d9a33437808734d5afb Author: Subhransu Mohanty Date: Mon Aug 17 15:36:57 2015 +0900 ector: add sse2 support for composition function in software backend. Signed-off-by: Cedric BAIL --- src/Makefile_Ector.am | 6 +- src/lib/ector/software/ector_drawhelper.c | 4 +- src/lib/ector/software/ector_drawhelper_sse2.c | 324 + 3 files changed, 331 insertions(+), 3 deletions(-) diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am index c05642f..26e934d 100644 --- a/src/Makefile_Ector.am +++ b/src/Makefile_Ector.am @@ -96,7 +96,8 @@ lib/ector/software/ector_software_surface.c \ lib/ector/software/sw_ft_math.c \ lib/ector/software/sw_ft_raster.c \ lib/ector/software/sw_ft_stroker.c \ -lib/ector/software/ector_drawhelper.c +lib/ector/software/ector_drawhelper.c \ +lib/ector/software/ector_drawhelper_sse2.c installed_ectorsoftwareheadersdir = $(includedir)/ector-@VMAJ@/software nodist_installed_ectorsoftwareheaders_DATA = $(ector_eolian_software_h) @@ -109,7 +110,8 @@ lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/ector\" \ -@VALGRIND_CFLAGS@ +@VALGRIND_CFLAGS@ \ +@SSE3_CFLAGS@ lib_ector_libector_la_LIBADD = @ECTOR_LIBS@ @DL_LIBS@ lib_ector_libector_la_DEPENDENCIES = @ECTOR_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@ diff --git a/src/lib/ector/software/ector_drawhelper.c b/src/lib/ector/software/ector_drawhelper.c index 40e7faa..26d8f98 100644 --- a/src/lib/ector/software/ector_drawhelper.c +++ b/src/lib/ector/software/ector_drawhelper.c @@ -149,7 +149,9 @@ RGBA_Comp_Func ector_comp_func_span_get(Ector_Rop op, uint color, Eina_Bool src_ return func_for_mode[op]; } +extern void init_draw_helper_sse2(); + void init_draw_helper() { - + init_draw_helper_sse2(); } diff --git a/src/lib/ector/software/ector_drawhelper_sse2.c b/src/lib/ector/software/ector_drawhelper_sse2.c new file mode 100644 index 000..bf6b25c --- /dev/null +++ b/src/lib/ector/software/ector_drawhelper_sse2.c @@ -0,0 +1,324 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "ector_drawhelper_private.h" + +#ifdef BUILD_SSE3 +#include + +// Each 32bits components of alphaChannel must be in the form 0x00AA00AA +inline static __m128i +v4_byte_mul_sse2(__m128i c, __m128i a) +{ + const __m128i ag_mask = _mm_set1_epi32(0xFF00FF00); + const __m128i rb_mask = _mm_set1_epi32(0x00FF00FF); + + /* for AG */ + __m128i v_ag = _mm_and_si128(ag_mask, c); + v_ag = _mm_srli_epi32(v_ag, 8); + v_ag = _mm_mullo_epi16(a, v_ag); + v_ag = _mm_and_si128(ag_mask, v_ag); + + /* for RB */ + __m128i v_rb = _mm_and_si128(rb_mask, c); + v_rb = _mm_mullo_epi16(a, v_rb); + v_rb = _mm_srli_epi32(v_rb, 8); + v_rb = _mm_and_si128(rb_mask, v_rb); + + /* combine */ + return _mm_add_epi32(v_ag, v_rb); +} + +static inline __m128i +v4_interpolate_color_sse2(__m128i a, __m128i c0, __m128i c1) +{ + const __m128i rb_mask = _mm_set1_epi32(0xFF00FF00); + const __m128i zero = _mm_setzero_si128(); + + __m128i a_l = a; + __m128i a_h = a; + a_l = _mm_unpacklo_epi16(a_l, a_l); + a_h = _mm_unpackhi_epi16(a_h, a_h); + + __m128i a_t = _mm_slli_epi64(a_l, 32); + __m128i a_t0 = _mm_slli_epi64(a_h, 32); + + a_l = _mm_add_epi32(a_l, a_t); + a_h = _mm_add_epi32(a_h, a_t0); + + __m128i c0_l = c0; + __m128i c0_h = c0; + + c0_l = _mm_unpacklo_epi8(c0_l, zero); + c0_h = _mm_unpackhi_epi8(c0_h, zero); + + __m128i c1_l = c1; + __m128i c1_h = c1; + + c1_l = _mm_unpacklo_epi8(c1_l, zero); + c1_h = _mm_unpackhi_epi8(c1_h, zero); + + __m128i cl_sub = _mm_sub_epi16(c0_l, c1_l); + __m128i ch_sub = _mm_sub_epi16(c0_h, c1_h); + + cl_sub = _mm_mullo_epi16(cl_sub, a_l); + ch_sub = _mm_mullo_epi16(ch_sub, a_h); + + __m128i c1ls = _mm_slli_epi16(c1_l, 8); + __m128i c1hs = _mm_slli_epi16(c1_h, 8); + + cl_sub = _mm_add_epi16(cl_sub, c1ls); + ch_sub = _mm_add_epi16(ch_sub, c1hs); + + cl_sub = _mm_and_si128(cl_sub, rb_mask); + ch_sub = _mm_and_si128(ch_sub, rb_mask); + + cl_sub = _mm_srli_epi64(cl_sub, 8); + ch_sub = _mm_srli_epi64(ch_sub, 8); + + cl_sub = _mm_packus_epi16(cl_sub, cl_sub); + ch_sub = _mm_packus_epi16(ch_sub, ch_sub); + + return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44); +} + +static inline __m128i +v4_mul_color_sse2(__m128i x, __m128i y) +{ + const __m128i zero = _mm_setzero_si128(); + const __m128i sym4_mask = _mm_set_epi32(0x00FF00FF, 0x00FF, 0x00FF00FF, 0x00FF); + __m128i x_l = _mm_unpacklo_epi8(x, zero); + __m128i x_h = _mm_unpackhi_epi8(x, zero); + + __m128i y_l = _mm_unpacklo_epi8(y, zero); + __m128i y_h = _mm_unpackhi_epi8(y, zero); + + __m128i r_l = _mm_mullo_epi16(x
[EGIT] [core/efl] master 09/13: ector: refactored software drawing backend to use composition function.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2766ce57ce698850e50ebd8b92c4897fa739baf9 commit 2766ce57ce698850e50ebd8b92c4897fa739baf9 Author: Subhransu Mohanty Date: Mon Aug 17 15:18:26 2015 +0900 ector: refactored software drawing backend to use composition function. Signed-off-by: Cedric BAIL --- src/Makefile_Ector.am | 5 +- src/lib/ector/software/ector_drawhelper.c | 155 src/lib/ector/software/ector_drawhelper_private.h | 102 ++ src/lib/ector/software/ector_software_rasterizer.c | 403 ++--- 4 files changed, 461 insertions(+), 204 deletions(-) diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am index 6d99092..c05642f 100644 --- a/src/Makefile_Ector.am +++ b/src/Makefile_Ector.am @@ -95,7 +95,8 @@ lib/ector/software/ector_software_rasterizer.c \ lib/ector/software/ector_software_surface.c \ lib/ector/software/sw_ft_math.c \ lib/ector/software/sw_ft_raster.c \ -lib/ector/software/sw_ft_stroker.c +lib/ector/software/sw_ft_stroker.c \ +lib/ector/software/ector_drawhelper.c installed_ectorsoftwareheadersdir = $(includedir)/ector-@VMAJ@/software nodist_installed_ectorsoftwareheaders_DATA = $(ector_eolian_software_h) @@ -147,7 +148,7 @@ endif EXTRA_DIST += \ lib/ector/ector_private.h \ lib/ector/cairo/ector_cairo_private.h \ -lib/ector/software/ector_blend_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 \ diff --git a/src/lib/ector/software/ector_drawhelper.c b/src/lib/ector/software/ector_drawhelper.c new file mode 100644 index 000..40e7faa --- /dev/null +++ b/src/lib/ector/software/ector_drawhelper.c @@ -0,0 +1,155 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "ector_drawhelper_private.h" + +/* + s = source pixel + d = destination pixel + ca = const_alpha + sia = source inverse alpha + cia = const inverse alpha + +*/ + +/* + result = s + d * sia + dest = (s + d * sia) * ca + d * cia + = s * ca + d * (sia * ca + cia) + = s * ca + d * (1 - sa*ca) +*/ +void +comp_func_solid_source_over(uint *dest, int length, uint color, uint const_alpha) +{ + int ialpha, i; + if (const_alpha != 255) + color = BYTE_MUL(color, const_alpha); + ialpha = Alpha(~color); + for (i = 0; i < length; ++i) + dest[i] = color + BYTE_MUL(dest[i], ialpha); +} + + +static void +comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint const_alpha) +{ + int i; + uint s, sc, sia; + if (const_alpha != 255) + color = BYTE_MUL(color, const_alpha); + + if (color == 0x) // No color multiplier + { +for (i = 0; i < length; ++i) + { + s = src[i]; + if (s >= 0xff00) + dest[i] = s; + else if (s != 0) + { + sia = Alpha(~s); + dest[i] = s + BYTE_MUL(dest[i], sia); + } + } + } + else + { +for (i = 0; i < length; ++i) + { + s = src[i]; + sc = ECTOR_MUL4_SYM(color, s); + sia = Alpha(~sc); + dest[i] = sc + BYTE_MUL(dest[i], sia); + } + } +} + +/* + result = s + dest = s * ca + d * cia +*/ +static void +comp_func_solid_source(uint *dest, int length, uint color, uint const_alpha) +{ + int ialpha, i; + if (const_alpha == 255) _ector_memfill(dest, length, color); + else + { +ialpha = 255 - const_alpha; +color = BYTE_MUL(color, const_alpha); +for (i = 0; i < length; ++i) + dest[i] = color + BYTE_MUL(dest[i], ialpha); + } +} + +static void +comp_func_source(uint *dest, const uint *src, int length, uint color, uint const_alpha) +{ + int i, ialpha; + uint src_color; + if (color == 0x) // No color multiplier + { +if (const_alpha == 255) + memcpy(dest, src, length * sizeof(uint)); +else + { +ialpha = 255 - const_alpha; +for (i = 0; i < length; ++i) + dest[i] = INTERPOLATE_PIXEL_256(src[i], const_alpha, dest[i], ialpha); + } + } + else + { +if (const_alpha == 255) + { + for (i = 0; i < length; ++i) + dest[i] = ECTOR_MUL4_SYM(src[i], color); + } +else + { +ialpha = 255 - const_alpha; +for (i = 0; i < length; ++i) + { + src_color = ECTOR_MUL4_SYM(src[i], color); + dest[i] = INTERPOLATE_PIXEL_256(src_color, const_alpha, dest[i], ialpha); +} + } + } +} + +RGBA_Comp_Func_Solid func_for_mode_solid[ECTOR_ROP_LAST] = { +comp_func_solid_source_over, +comp_func_solid_source +}; + +RGBA_Comp_Func func_for_mode[ECTOR_ROP_LA
[EGIT] [core/efl] master 12/13: ector: add SSE2 support for gradient filling in software backend.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f3201e9ab97d135b38cdcd02d854784c1954194f commit f3201e9ab97d135b38cdcd02d854784c1954194f Author: Subhransu Mohanty Date: Mon Aug 17 15:55:18 2015 +0900 ector: add SSE2 support for gradient filling in software backend. Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_drawhelper.c| 2 + src/lib/ector/software/ector_software_gradient.c | 395 ++- 2 files changed, 308 insertions(+), 89 deletions(-) diff --git a/src/lib/ector/software/ector_drawhelper.c b/src/lib/ector/software/ector_drawhelper.c index 39180b8..f1ea66b 100644 --- a/src/lib/ector/software/ector_drawhelper.c +++ b/src/lib/ector/software/ector_drawhelper.c @@ -149,11 +149,13 @@ RGBA_Comp_Func ector_comp_func_span_get(Ector_Rop op, uint color, Eina_Bool src_ return func_for_mode[op]; } +extern void init_drawhelper_gradient(); extern void init_draw_helper_sse2(); extern void init_draw_helper_neon(); void init_draw_helper() { + init_drawhelper_gradient(); init_draw_helper_sse2(); init_draw_helper_neon(); } diff --git a/src/lib/ector/software/ector_software_gradient.c b/src/lib/ector/software/ector_software_gradient.c index 3682989..d6ad207 100644 --- a/src/lib/ector/software/ector_software_gradient.c +++ b/src/lib/ector/software/ector_software_gradient.c @@ -1,51 +1,53 @@ #ifdef HAVE_CONFIG_H -# include "config.h" +#include "config.h" #endif -//Remove #include - #include -#include -#include -#include #include #include "ector_private.h" #include "ector_software_private.h" -#include "ector_blend_private.h" +#include "ector_drawhelper_private.h" #define GRADIENT_STOPTABLE_SIZE 1024 #define FIXPT_BITS 8 #define FIXPT_SIZE (1s == EFL_GFX_GRADIENT_SPREAD_REPEAT) - { - ipos = ipos % GRADIENT_STOPTABLE_SIZE; - ipos = ipos < 0 ? GRADIENT_STOPTABLE_SIZE + ipos : ipos; - } -else if (data->gd->s == EFL_GFX_GRADIENT_SPREAD_REFLECT) - { - const int limit = GRADIENT_STOPTABLE_SIZE * 2; - ipos = ipos % limit; - ipos = ipos < 0 ? limit + ipos : ipos; - ipos = ipos >= GRADIENT_STOPTABLE_SIZE ? limit - 1 - ipos : ipos; - } -else - { - if (ipos < 0) - ipos = 0; - else if (ipos >= GRADIENT_STOPTABLE_SIZE) - ipos = GRADIENT_STOPTABLE_SIZE-1; - } - -return ipos; + int limit; + if (data->gd->s == EFL_GFX_GRADIENT_SPREAD_REPEAT) + { +ipos = ipos % GRADIENT_STOPTABLE_SIZE; +ipos = ipos < 0 ? GRADIENT_STOPTABLE_SIZE + ipos : ipos; + } + else if (data->gd->s == EFL_GFX_GRADIENT_SPREAD_REFLECT) + { +limit = GRADIENT_STOPTABLE_SIZE * 2; +ipos = ipos % limit; +ipos = ipos < 0 ? limit + ipos : ipos; +ipos = ipos >= GRADIENT_STOPTABLE_SIZE ? limit - 1 - ipos : ipos; + } + else + { +if (ipos < 0) ipos = 0; +else if (ipos >= GRADIENT_STOPTABLE_SIZE) + ipos = GRADIENT_STOPTABLE_SIZE-1; + } + return ipos; } @@ -63,12 +65,213 @@ _gradient_pixel(const Ector_Renderer_Software_Gradient_Data *data, float pos) return data->color_table[_gradient_clamp(data, ipos)]; } + +#ifdef BUILD_SSE3 +#include + +#define GRADIENT_STOPTABLE_SIZE_SHIFT 10 +typedef union{ __m128i v; int i[4];}vec4_i; +typedef union{ __m128 v; float f[4];}vec4_f; + +#define FETCH_CLAMP_INIT_F \ + __m128 v_min = _mm_set1_ps(0.0f); \ + __m128 v_max = _mm_set1_ps((float)(GRADIENT_STOPTABLE_SIZE-1)); \ + __m128 v_halff = _mm_set1_ps(0.5f); \ + __m128i v_repeat_mask = _mm_set1_epi32(~((uint)(0xff) << GRADIENT_STOPTABLE_SIZE_SHIFT)); \ + __m128i v_reflect_mask = _mm_set1_epi32(~((uint)(0xff) << (GRADIENT_STOPTABLE_SIZE_SHIFT+1))); \ + __m128i v_reflect_limit = _mm_set1_epi32(2 * GRADIENT_STOPTABLE_SIZE - 1); + +#define FETCH_CLAMP_REPEAT_F \ + vec4_i index_vec; \ + index_vec.v = _mm_and_si128(v_repeat_mask, _mm_cvttps_epi32(v_index)); + +#define FETCH_CLAMP_REFLECT_F \ + vec4_i index_vec; \ + __m128i v_index_i = _mm_and_si128(v_reflect_mask, _mm_cvttps_epi32(v_index)); \ + __m128i v_index_i_inv = _mm_sub_epi32(v_reflect_limit, v_index_i); \ + index_vec.v = _mm_min_epi16(v_index_i, v_index_i_inv); + +#define FETCH_CLAMP_PAD_F \ + vec4_i index_vec; \ + index_vec.v = _mm_cvttps_epi32(_mm_min_ps(v_max, _mm_max_ps(v_min, v_index))); + + +#define FETCH_EPILOGUE_CPY \ + *buffer++ = g_data->color_table[index_vec.i[0]]; \ + *buffer++ = g_data->color_table[index_vec.i[1]]; \ + *buffer++ = g_data->color_table[index_vec.i[2]]; \ + *buffer++ = g_data->color_table[index_vec.i[3]]; \ +} + +static void +loop_break(unsigned int *buffer, int length, int *lprealign, int *lby4 , int *lremaining) +{ + int l1=0,l2=0,l3=0; + while ((int)buffer & 0xF) + buffer++ , l1++; + + if(length <= l1) + l1 = length; + else + { +l3 = (length - l1)%4; +
[EGIT] [core/efl] master 08/13: ector: add alpha field to gradient data.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=48b558a997e5bfe321b401110daa449dc173bbd6 commit 48b558a997e5bfe321b401110daa449dc173bbd6 Author: Subhransu Mohanty Date: Mon Aug 17 15:24:50 2015 +0900 ector: add alpha field to gradient data. Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_software_gradient.c | 90 +--- src/lib/ector/software/ector_software_private.h | 1 + 2 files changed, 49 insertions(+), 42 deletions(-) diff --git a/src/lib/ector/software/ector_software_gradient.c b/src/lib/ector/software/ector_software_gradient.c index afd4dd3..3682989 100644 --- a/src/lib/ector/software/ector_software_gradient.c +++ b/src/lib/ector/software/ector_software_gradient.c @@ -71,61 +71,67 @@ _ease_linear(double t) return t; } -static void +static Eina_Bool _generate_gradient_color_table(Efl_Gfx_Gradient_Stop *gradient_stops, int stop_count, uint *color_table, int size) { -int pos = 0; -Efl_Gfx_Gradient_Stop *curr, *next; -assert(stop_count > 0); - -curr = gradient_stops; -uint current_color = ECTOR_ARGB_JOIN(curr->a, curr->r, curr->g, curr->b); -double incr = 1.0 / (double)size; -double fpos = 1.5 * incr; - -color_table[pos++] = current_color; - -while (fpos <= curr->offset) - { - color_table[pos] = color_table[pos - 1]; - pos++; - fpos += incr; - } + int dist, idist, pos = 0, i; + Eina_Bool alpha = EINA_FALSE; + Efl_Gfx_Gradient_Stop *curr, *next; + uint current_color, next_color; + double delta, t, incr, fpos; + assert(stop_count > 0); + + curr = gradient_stops; + if (curr->a != 255) alpha = EINA_TRUE; + current_color = ECTOR_ARGB_JOIN(curr->a, curr->r, curr->g, curr->b); + incr = 1.0 / (double)size; + fpos = 1.5 * incr; + + color_table[pos++] = current_color; + + while (fpos <= curr->offset) + { +color_table[pos] = color_table[pos - 1]; +pos++; +fpos += incr; + } -for (int i = 0; i < stop_count - 1; ++i) - { - curr = (gradient_stops + i); - next = (gradient_stops + i + 1); - double delta = 1/(next->offset - curr->offset); - uint next_color = ECTOR_ARGB_JOIN(next->a, next->r, next->g, next->b); - BLEND_FUNC func = &_ease_linear; - while (fpos < next->offset && pos < size) - { - double t = func((fpos - curr->offset) * delta); - int dist = (int)(256 * t); - int idist = 256 - dist; - color_table[pos] = INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist); - ++pos; - fpos += incr; - } - current_color = next_color; - } + for (i = 0; i < stop_count - 1; ++i) + { +curr = (gradient_stops + i); +next = (gradient_stops + i + 1); +delta = 1/(next->offset - curr->offset); +if (next->a != 255) alpha = EINA_TRUE; +next_color = ECTOR_ARGB_JOIN(next->a, next->r, next->g, next->b); +BLEND_FUNC func = &_ease_linear; +while (fpos < next->offset && pos < size) + { + t = func((fpos - curr->offset) * delta); + dist = (int)(256 * t); + idist = 256 - dist; + color_table[pos] = INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist); + ++pos; + fpos += incr; + } +current_color = next_color; + } -for (;pos < size; ++pos) - color_table[pos] = current_color; + for (;pos < size; ++pos) + color_table[pos] = current_color; -// Make sure the last color stop is represented at the end of the table -color_table[size-1] = current_color; + // Make sure the last color stop is represented at the end of the table + color_table[size-1] = current_color; + return alpha; } void update_color_table(Ector_Renderer_Software_Gradient_Data *gdata) { - if(gdata->color_table) return; + if (gdata->color_table) return; gdata->color_table = malloc(GRADIENT_STOPTABLE_SIZE * 4); - _generate_gradient_color_table(gdata->gd->colors, gdata->gd->colors_count, gdata->color_table, GRADIENT_STOPTABLE_SIZE); + gdata->alpha = _generate_gradient_color_table(gdata->gd->colors, gdata->gd->colors_count, gdata->color_table, GRADIENT_STOPTABLE_SIZE); } void diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h index 5fefe59..a4d1221 100644 --- a/src/lib/ector/software/ector_software_private.h +++ b/src/lib/ector/software/ector_software_private.h @@ -42,6 +42,7 @@ typedef struct _Ector_Renderer_Software_Gradient_Data Software_Gradient_Linear_Data linear; Software_Gradient_Radial_Data radial; }; + Eina_Bool alpha; uint* color_table; } Ector_Renderer_Software_Gradient_Data; --
[EGIT] [core/efl] master 05/13: ector: remove wrong implementation of singleton in software_surface class.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=230b75acab9665dd77445de6d303d7171d3f684b commit 230b75acab9665dd77445de6d303d7171d3f684b Author: Subhransu Mohanty Date: Mon Aug 17 13:59:59 2015 +0900 ector: remove wrong implementation of singleton in software_surface class. Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_software_surface.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c index a558302..0391150 100644 --- a/src/lib/ector/software/ector_software_surface.c +++ b/src/lib/ector/software/ector_software_surface.c @@ -8,8 +8,6 @@ #include "ector_private.h" #include "ector_software_private.h" -static unsigned int _software_count = 0; - typedef struct _Ector_Renderer_Software_Base_Data Ector_Renderer_Software_Base_Data; struct _Ector_Renderer_Software_Base_Data { @@ -69,14 +67,9 @@ static Eo * _ector_software_surface_eo_base_constructor(Eo *obj, Ector_Software_Surface_Data *pd EINA_UNUSED) { - obj = eo_do_super_ret(obj, ECTOR_SOFTWARE_SURFACE_CLASS, obj, eo_constructor()); - if(_software_count == 0) -{ - pd->software = (Software_Rasterizer *) calloc(1, sizeof(Software_Rasterizer)); - ector_software_rasterizer_init(pd->software); -} - _software_count++; - + obj = eo_do_super_ret(obj, ECTOR_SOFTWARE_SURFACE_CLASS, obj, eo_constructor()); + pd->software = (Software_Rasterizer *) calloc(1, sizeof(Software_Rasterizer)); + ector_software_rasterizer_init(pd->software); return obj; } @@ -84,8 +77,6 @@ static void _ector_software_surface_eo_base_destructor(Eo *obj EINA_UNUSED, Ector_Software_Surface_Data *pd EINA_UNUSED) { - --_software_count; - if (_software_count > 0) return; ector_software_rasterizer_done(pd->software); free(pd->software); pd->software = NULL; --
[EGIT] [core/efl] master 13/13: ector: remove depricated file ector_blend_private.h
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=35ae391d644275e0e84a0e1f039d2eea7898f5a4 commit 35ae391d644275e0e84a0e1f039d2eea7898f5a4 Author: Subhransu Mohanty Date: Mon Aug 17 16:00:34 2015 +0900 ector: remove depricated file ector_blend_private.h Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_blend_private.h | 105 --- 1 file changed, 105 deletions(-) diff --git a/src/lib/ector/software/ector_blend_private.h b/src/lib/ector/software/ector_blend_private.h deleted file mode 100644 index 0082baa..000 --- a/src/lib/ector/software/ector_blend_private.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef ECTOR_BLEND_PRIVATE_H -#define ECTOR_BLEND_PRIVATE_H - -#ifndef MIN -#define MIN( a, b ) ( (a) < (b) ? (a) : (b) ) -#endif - -#ifndef MAX -#define MAX( a, b ) ( (a) > (b) ? (a) : (b) ) -#endif - -#define ECTOR_ARGB_JOIN(a,r,g,b) \ -(((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) - -#define ECTOR_MUL4_SYM(x, y) \ - ( ((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff) & 0xff00) + \ - ((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff) + \ - ((x) & 0xff00) * ((y) & 0xff00)) + 0xff) >> 16) & 0xff00) + \ - (x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) - -#define ECTOR_MUL_256(c, a) \ - ( (c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \ - (c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) ) - - -static inline void -_ector_memfill(DATA32 *dest, uint value, int count) -{ -if (!count) -return; - -int n = (count + 7) / 8; -switch (count & 0x07) -{ -case 0: do { *dest++ = value; -case 7: *dest++ = value; -case 6: *dest++ = value; -case 5: *dest++ = value; -case 4: *dest++ = value; -case 3: *dest++ = value; -case 2: *dest++ = value; -case 1: *dest++ = value; -} while (--n > 0); -} -} - - -static inline void -_ector_comp_func_source_over_mul_c(uint *dest, uint *src, DATA32 c, int length, uint const_alpha) -{ -if (const_alpha == 255) { -for (int i = 0; i < length; ++i) { -uint s = src[i]; -DATA32 sc = ECTOR_MUL4_SYM(c, s); -uint a = (~sc) >> 24; -dest[i] = sc + ECTOR_MUL_256(dest[i], a); -} -} else { -for (int i = 0; i < length; ++i) { -uint s = src[i]; -DATA32 sc = ECTOR_MUL4_SYM(c, s); -sc = ECTOR_MUL_256(sc, const_alpha); -uint a = (~sc) >> 24; -dest[i] = sc + ECTOR_MUL_256(dest[i], a); -} -} -} - - -static inline void -_ector_comp_func_source_over(uint *dest, uint *src, int length, uint const_alpha) -{ -if (const_alpha == 255) { -for (int i = 0; i < length; ++i) { -uint s = src[i]; -if (s >= 0xff00) -dest[i] = s; -else if (s != 0) { -uint a = (~s) >> 24; -dest[i] = s + ECTOR_MUL_256(dest[i], a); -} -} -} else { -for (int i = 0; i < length; ++i) { -uint s = ECTOR_MUL_256(src[i], const_alpha); -uint a = (~s) >> 24; -dest[i] = s + ECTOR_MUL_256(dest[i], a); -} -} -} - -static inline uint -INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) { -uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; -t >>= 8; -t &= 0xff00ff; - -x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b; -x &= 0xff00ff00; -x |= t; -return x; -} - - -#endif \ No newline at end of file --
[EGIT] [core/efl] master 03/13: ector: add bounding box info in RLE data for software backend.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f1a4f461c2f90372035c59fc9cc376d25ad54c27 commit f1a4f461c2f90372035c59fc9cc376d25ad54c27 Author: Subhransu Mohanty Date: Mon Aug 17 13:45:42 2015 +0900 ector: add bounding box info in RLE data for software backend. Signed-off-by: Cedric BAIL --- src/lib/ector/software/ector_software_private.h| 1 + src/lib/ector/software/ector_software_rasterizer.c | 20 2 files changed, 21 insertions(+) diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h index c91d1d4..5fefe59 100644 --- a/src/lib/ector/software/ector_software_private.h +++ b/src/lib/ector/software/ector_software_private.h @@ -56,6 +56,7 @@ typedef struct _Raster_Buffer typedef struct _Shape_Rle_Data { + Eina_Rectangle bbox; unsigned short alloc; unsigned short size; SW_FT_Span *spans;// array of Scanlines. diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c index 47a0cae..5afb1ca 100644 --- a/src/lib/ector/software/ector_software_rasterizer.c +++ b/src/lib/ector/software/ector_software_rasterizer.c @@ -388,8 +388,11 @@ _rle_generation_cb( int count, const SW_FT_Span* spans,void *user) Shape_Rle_Data * ector_software_rasterizer_generate_rle_data(Software_Rasterizer *rasterizer, SW_FT_Outline *outline) { + int i, rle_size; + int l = 0, t = 0, r = 0, b = 0; Shape_Rle_Data *rle_data = (Shape_Rle_Data *) calloc(1, sizeof(Shape_Rle_Data)); SW_FT_Raster_Params params; + SW_FT_Span* span; params.flags = SW_FT_RASTER_FLAG_DIRECT | SW_FT_RASTER_FLAG_AA ; params.gray_spans = &_rle_generation_cb; @@ -398,6 +401,23 @@ ector_software_rasterizer_generate_rle_data(Software_Rasterizer *rasterizer, SW_ sw_ft_grays_raster.raster_render(rasterizer->raster, ¶ms); + // update RLE bounding box. + span = rle_data->spans; + rle_size = rle_data->size; + if (rle_size) + { +t = span[0].y; +b = span[rle_size-1].y; +for (i = 0; i < rle_size; i++) + { + if (span[i].x < l) l = span[i].x; + if (span[i].x + span[i].len > r) r = span[i].x + span[i].len; + } +rle_data->bbox.x = l; +rle_data->bbox.y = t; +rle_data->bbox.w = r - l; +rle_data->bbox.h = b - t + 1; + } return rle_data; } --
[EGIT] [core/efl] master 06/13: ector: refactored shape generation in software backend.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8b075c65348e460166aa964c48f379938cd0bc7d commit 8b075c65348e460166aa964c48f379938cd0bc7d Author: Subhransu Mohanty Date: Mon Aug 17 14:26:40 2015 +0900 ector: refactored shape generation in software backend. Signed-off-by: Cedric BAIL --- .../ector/software/ector_renderer_software_shape.c | 284 + 1 file changed, 178 insertions(+), 106 deletions(-) diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c index 1c985d4..2ea12ee 100644 --- a/src/lib/ector/software/ector_renderer_software_shape.c +++ b/src/lib/ector/software/ector_renderer_software_shape.c @@ -30,18 +30,38 @@ typedef struct _Outline int contours_alloc; }Outline; + +static inline void +_grow_outline_contour(Outline *outline, int num) +{ + if ( outline->ft_outline.n_contours + num > outline->contours_alloc) + { +outline->contours_alloc += 5; +outline->ft_outline.contours = (short *) realloc(outline->ft_outline.contours, + outline->contours_alloc * sizeof(short)); + } +} + +static inline void +_grow_outline_points(Outline *outline, int num) +{ + if ( outline->ft_outline.n_points + num > outline->points_alloc) + { +outline->points_alloc += 50; +outline->ft_outline.points = (SW_FT_Vector *) realloc(outline->ft_outline.points, + outline->points_alloc * sizeof(SW_FT_Vector)); +outline->ft_outline.tags = (char *) realloc(outline->ft_outline.tags, +outline->points_alloc * sizeof(char)); + } +} static Outline * _outline_create() { Outline *outline = (Outline *) calloc(1, sizeof(Outline)); - - outline->ft_outline.points = (SW_FT_Vector *) calloc(50, sizeof(SW_FT_Vector)); - outline->ft_outline.tags = (char *) calloc(50, sizeof(char)); - - outline->ft_outline.contours = (short *) calloc(5, sizeof(short)); - - outline->points_alloc = 50; - outline->contours_alloc = 5; + outline->points_alloc = 0; + outline->contours_alloc = 0; + _grow_outline_contour(outline, 1); + _grow_outline_points(outline, 1); return outline; } @@ -63,17 +83,14 @@ _outline_move_to(Outline *outline, double x, double y) { SW_FT_Outline *ft_outline = &outline->ft_outline; - if (ft_outline->n_contours == outline->contours_alloc) - { -outline->contours_alloc += 5; -ft_outline->contours = (short *) realloc(ft_outline->contours, outline->contours_alloc * sizeof(short)); - } + _grow_outline_points(outline, 1); ft_outline->points[ft_outline->n_points].x = x; ft_outline->points[ft_outline->n_points].y = y; ft_outline->tags[ft_outline->n_points] = SW_FT_CURVE_TAG_ON; if (ft_outline->n_points) { +_grow_outline_contour(outline, 1); ft_outline->contours[ft_outline->n_contours] = ft_outline->n_points - 1; ft_outline->n_contours++; } @@ -86,11 +103,7 @@ _outline_end(Outline *outline) { SW_FT_Outline *ft_outline = &outline->ft_outline; - if (ft_outline->n_contours == outline->contours_alloc) - { -outline->contours_alloc += 1; -ft_outline->contours = (short *) realloc(ft_outline->contours, outline->contours_alloc * sizeof(short)); - } + _grow_outline_contour(outline, 1); if (ft_outline->n_points) { @@ -104,12 +117,7 @@ static void _outline_line_to(Outline *outline, double x, double y) { SW_FT_Outline *ft_outline = &outline->ft_outline; - if (ft_outline->n_points == outline->points_alloc) - { -outline->points_alloc += 50; -ft_outline->points = (SW_FT_Vector *) realloc(ft_outline->points, outline->points_alloc * sizeof(SW_FT_Vector)); -ft_outline->tags = (char *) realloc(ft_outline->tags, outline->points_alloc * sizeof(char)); - } + _grow_outline_points(outline, 1); ft_outline->points[ft_outline->n_points].x = x; ft_outline->points[ft_outline->n_points].y = y; ft_outline->tags[ft_outline->n_points] = SW_FT_CURVE_TAG_ON; @@ -141,16 +149,12 @@ _outline_close_path(Outline *outline) } -static void _outline_cubic_to(Outline *outline, double cx1, double cy1, double cx2, double cy2, double x, double y) +static void _outline_cubic_to(Outline *outline, double cx1, double cy1, + double cx2, double cy2, double x, double y) { SW_FT_Outline *ft_outline = &outline->ft_outline; - if (ft_outline->n_points == outline->points_alloc) - { -outline->points_alloc += 50; -ft_outline->points = (SW_FT_Vector *) realloc(ft_outline->points, outline->points_alloc * sizeof(SW_FT_Vector)); -ft_outline->tags = (char *) realloc(ft_outline->tags, outline->points_alloc * sizeof(char)); - } +
[EGIT] [core/efl] master 07/13: ector: add dash stroking feature in software backend.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e9896ee363e22e45b658cc5df650bfa0a1406047 commit e9896ee363e22e45b658cc5df650bfa0a1406047 Author: Subhransu Mohanty Date: Mon Aug 17 14:44:46 2015 +0900 ector: add dash stroking feature in software backend. Signed-off-by: Cedric BAIL --- .../ector/software/ector_renderer_software_shape.c | 266 - 1 file changed, 263 insertions(+), 3 deletions(-) diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c index 2ea12ee..0608798 100644 --- a/src/lib/ector/software/ector_renderer_software_shape.c +++ b/src/lib/ector/software/ector_renderer_software_shape.c @@ -245,6 +245,250 @@ _generate_outline(const Efl_Gfx_Path_Command *cmds, const double *pts, Outline * return close_path; } +typedef struct _Line +{ + double x1; + double y1; + double x2; + double y2; +}Line; + +static void +_line_value_set(Line *l, double x1, double y1, double x2, double y2) +{ + l->x1 = x1; + l->y1 = y1; + l->x2 = x2; + l->y2 = y2; +} + +// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm. +// With alpha = 1, beta = 3/8, giving results with a largest error less +// than 7% compared to the exact value. +static double +_line_length(Line *l) +{ + double x = l->x2 - l->x1; + double y = l->y2 - l->y1; + x = x < 0 ? -x : x; + y = y < 0 ? -y : y; + return (x > y ? x + 0.375 * y : y + 0.375 * x); +} + +static void +_line_split_at_length(Line *l, double length, Line *left, Line *right) +{ + double len = _line_length(l); + double dx = ((l->x2 - l->x1)/len) *length; + double dy = ((l->y2 - l->y1)/len) *length; + + left->x1 = l->x1; + left->y1 = l->y1; + left->x2 = left->x1 + dx; + left->y2 = left->y1 + dy; + + right->x1 = left->x2; + right->y1 = left->y2; + right->x2 = l->x2; + right->y2 = l->y2; +} + +typedef struct _Dash_Stroker +{ + Efl_Gfx_Dash *dash; + int dash_len; + Outline *outline; + int cur_dash_index; + double cur_dash_length; + Eina_Bool cur_op_gap; + double start_x, start_y; + double cur_x, cur_y; +}Dash_Stroker; + +static void +_dasher_line_to(Dash_Stroker *dasher, double x, double y) +{ + Line l, left, right; + double line_len = 0.0; + _line_value_set(&l, dasher->cur_x, dasher->cur_y, x, y); + line_len = _line_length(&l); + if (line_len < dasher->cur_dash_length) + { +dasher->cur_dash_length -= line_len; +if (!dasher->cur_op_gap) + { + _outline_move_to(dasher->outline, dasher->cur_x, dasher->cur_y); + _outline_line_to(dasher->outline, x, y); + } + } + else + { +while (line_len > dasher->cur_dash_length) + { + line_len -= dasher->cur_dash_length; + _line_split_at_length(&l, dasher->cur_dash_length, &left, &right); + if (!dasher->cur_op_gap) + { + _outline_move_to(dasher->outline, left.x1, left.y1); + _outline_line_to(dasher->outline, left.x2, left.y2); + dasher->cur_dash_length = dasher->dash[dasher->cur_dash_index].gap; + } + else + { + dasher->cur_dash_index = (dasher->cur_dash_index +1) % dasher->dash_len ; + dasher->cur_dash_length = dasher->dash[dasher->cur_dash_index].length; + } + dasher->cur_op_gap = !dasher->cur_op_gap; + l = right; + dasher->cur_x = l.x1; + dasher->cur_y = l.y1; + } +// remainder +dasher->cur_dash_length -= line_len; +if (!dasher->cur_op_gap) + { + _outline_move_to(dasher->outline, l.x1, l.y1); + _outline_line_to(dasher->outline, l.x2, l.y2); + } +if (dasher->cur_dash_length < 1.0) + { + // move to next dash + if (!dasher->cur_op_gap) + { + dasher->cur_op_gap = EINA_TRUE; + dasher->cur_dash_length = dasher->dash[dasher->cur_dash_index].gap; + } + else + { + dasher->cur_op_gap = EINA_FALSE; + dasher->cur_dash_index = (dasher->cur_dash_index +1) % dasher->dash_len ; + dasher->cur_dash_length = dasher->dash[dasher->cur_dash_index].length; + } + } + } + dasher->cur_x = x; + dasher->cur_y = y; +} + +static void +_dasher_cubic_to(Dash_Stroker *dasher, double cx1 , double cy1, double cx2, double cy2, double x, double y) +{ + Eina_Bezier b, left, right; + double bez_len = 0.0; + eina_bezier_values_set(&b, dasher->cur_x, dasher->cur_y, cx1, cy1, cx2, cy2, x, y); + bez_len = eina_bezier_length_get(&b); + if (bez_len < dasher->cur_dash_length) + { +dasher->cur_dash_length -= b
[EGIT] [core/efl] master 01/13: evas: delete the ector_renderer when evas_vg_node gets deleted.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ad3ae08b82d3b53467f44261c61957fefc24f9d7 commit ad3ae08b82d3b53467f44261c61957fefc24f9d7 Author: Subhransu Mohanty Date: Wed Aug 19 09:00:51 2015 +0900 evas: delete the ector_renderer when evas_vg_node gets deleted. Signed-off-by: Cedric BAIL --- src/lib/evas/canvas/evas_vg_node.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c index ad0817e..775c688 100644 --- a/src/lib/evas/canvas/evas_vg_node.c +++ b/src/lib/evas/canvas/evas_vg_node.c @@ -266,6 +266,13 @@ _efl_vg_base_eo_base_destructor(Eo *obj, Efl_VG_Base_Data *pd) free(pd->m); pd->m = NULL; } + + if (pd->renderer) + { +eo_del(pd->renderer); +pd->renderer = NULL; + } + eo_do_super(obj, MY_CLASS, eo_destructor()); } --
[EGIT] [core/efl] master 02/03: ector: fix naming and forcing this inline function to be static.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c57cf86d6fa5df5029570c03ac6abe583f5e73f4 commit c57cf86d6fa5df5029570c03ac6abe583f5e73f4 Author: Cedric BAIL Date: Wed Aug 19 16:12:29 2015 +0200 ector: fix naming and forcing this inline function to be static. --- src/lib/ector/software/ector_drawhelper.c | 6 +++--- src/lib/ector/software/ector_drawhelper_private.h | 6 ++ src/lib/ector/software/ector_drawhelper_sse2.c| 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/lib/ector/software/ector_drawhelper.c b/src/lib/ector/software/ector_drawhelper.c index f1ea66b..eee1d7c 100644 --- a/src/lib/ector/software/ector_drawhelper.c +++ b/src/lib/ector/software/ector_drawhelper.c @@ -26,7 +26,7 @@ comp_func_solid_source_over(uint *dest, int length, uint color, uint const_alpha int ialpha, i; if (const_alpha != 255) color = BYTE_MUL(color, const_alpha); - ialpha = Alpha(~color); + ialpha = _alpha(~color); for (i = 0; i < length; ++i) dest[i] = color + BYTE_MUL(dest[i], ialpha); } @@ -49,7 +49,7 @@ comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint dest[i] = s; else if (s != 0) { - sia = Alpha(~s); + sia = _alpha(~s); dest[i] = s + BYTE_MUL(dest[i], sia); } } @@ -60,7 +60,7 @@ comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint { s = src[i]; sc = ECTOR_MUL4_SYM(color, s); - sia = Alpha(~sc); + sia = _alpha(~sc); dest[i] = sc + BYTE_MUL(dest[i], sia); } } diff --git a/src/lib/ector/software/ector_drawhelper_private.h b/src/lib/ector/software/ector_drawhelper_private.h index ea77760..a753987 100644 --- a/src/lib/ector/software/ector_drawhelper_private.h +++ b/src/lib/ector/software/ector_drawhelper_private.h @@ -17,13 +17,11 @@ typedef unsigned int uint; #endif -inline int Alpha(uint c) +static inline int _alpha(uint c) { return c>>24; } - - #define ECTOR_ARGB_JOIN(a,r,g,b) \ (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) @@ -99,4 +97,4 @@ void init_draw_helper(); RGBA_Comp_Func_Solid ector_comp_func_solid_span_get(Ector_Rop op, uint color); RGBA_Comp_Func ector_comp_func_span_get(Ector_Rop op, uint color, Eina_Bool src_alpha); -#endif \ No newline at end of file +#endif diff --git a/src/lib/ector/software/ector_drawhelper_sse2.c b/src/lib/ector/software/ector_drawhelper_sse2.c index bf6b25c..581cbb7 100644 --- a/src/lib/ector/software/ector_drawhelper_sse2.c +++ b/src/lib/ector/software/ector_drawhelper_sse2.c @@ -157,7 +157,7 @@ comp_func_solid_source_over_sse2(uint *dest, int length, uint color, uint const_ int ialpha; if (const_alpha != 255) color = BYTE_MUL(color, const_alpha); - ialpha = Alpha(~color); + ialpha = _alpha(~color); comp_func_helper_sse2(dest, length, color, ialpha); } @@ -272,7 +272,7 @@ comp_func_source_over_sse2(uint *dest, const uint *src, int length, uint color, LOOP_ALIGNED_U1_A4(dest, length, { /* UOP */ s = *src; -sia = Alpha(~s); +sia = _alpha(~s); *dest = s + BYTE_MUL(*dest, sia); dest++; src++; length--; }, @@ -289,7 +289,7 @@ comp_func_source_over_sse2(uint *dest, const uint *src, int length, uint color, LOOP_ALIGNED_U1_A4(dest, length, { /* UOP */ s = ECTOR_MUL4_SYM(*src, color); -sia = Alpha(~s); +sia = _alpha(~s); *dest = s + BYTE_MUL(*dest, sia); dest++; src++; length--; }, --
[EGIT] [core/efl] master 03/03: evas: no need to get the data if it is not the right type of object.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f1e3c7f41f2584ce45e16839e03003234f99ad9a commit f1e3c7f41f2584ce45e16839e03003234f99ad9a Author: Cedric BAIL Date: Wed Aug 19 16:12:58 2015 +0200 evas: no need to get the data if it is not the right type of object. --- src/lib/evas/canvas/evas_object_vg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c index bdda637..df4df41 100644 --- a/src/lib/evas/canvas/evas_object_vg.c +++ b/src/lib/evas/canvas/evas_object_vg.c @@ -128,13 +128,14 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Evas_VG_Data *vd, void *output, void *context, void *surface, Efl_VG *n, Eina_Array *clips, Eina_Bool do_async) { - Efl_VG_Container_Data *vc = eo_data_scope_get(n, EFL_VG_CONTAINER_CLASS); - if (eo_isa(n, EFL_VG_CONTAINER_CLASS)) { +Efl_VG_Container_Data *vc; Efl_VG *child; Eina_List *l; +vc = eo_data_scope_get(n, EFL_VG_CONTAINER_CLASS); + EINA_LIST_FOREACH(vc->children, l, child) _evas_vg_render(obj, vd, output, context, surface, child, --
[EGIT] [core/efl] master 01/03: evas: fix ref/unref of ector renderer to always happen in the main loop.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7c83af2ae3c83d82b23e73115db1aad7f19bcecc commit 7c83af2ae3c83d82b23e73115db1aad7f19bcecc Author: Cedric BAIL Date: Wed Aug 19 16:06:39 2015 +0200 evas: fix ref/unref of ector renderer to always happen in the main loop. --- src/lib/evas/canvas/evas_object_vg.c | 29 +- .../evas/engines/software_generic/evas_engine.c| 3 +-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c index abf12c3..bdda637 100644 --- a/src/lib/evas/canvas/evas_object_vg.c +++ b/src/lib/evas/canvas/evas_object_vg.c @@ -22,6 +22,8 @@ struct _Evas_VG_Data Eina_Rectangle fill; unsigned int width, height; + + Eina_Array cleanup; }; static void evas_object_vg_render(Evas_Object *eo_obj, @@ -116,23 +118,25 @@ _evas_vg_eo_base_constructor(Eo *eo_obj, Evas_VG_Data *pd) pd->root = eo_add(EFL_VG_ROOT_NODE_CLASS, eo_obj); eo_ref(pd->root); + eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8); + return eo_obj; } static void -_evas_vg_render(Evas_Object_Protected_Data *obj, +_evas_vg_render(Evas_Object_Protected_Data *obj, Evas_VG_Data *vd, void *output, void *context, void *surface, Efl_VG *n, Eina_Array *clips, Eina_Bool do_async) { - Efl_VG_Container_Data *vd = eo_data_scope_get(n, EFL_VG_CONTAINER_CLASS); + Efl_VG_Container_Data *vc = eo_data_scope_get(n, EFL_VG_CONTAINER_CLASS); if (eo_isa(n, EFL_VG_CONTAINER_CLASS)) { Efl_VG *child; Eina_List *l; -EINA_LIST_FOREACH(vd->children, l, child) - _evas_vg_render(obj, +EINA_LIST_FOREACH(vc->children, l, child) + _evas_vg_render(obj, vd, output, context, surface, child, clips, do_async); } @@ -143,6 +147,9 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, nd = eo_data_scope_get(n, EFL_VG_BASE_CLASS); obj->layer->evas->engine.func->ector_renderer_draw(output, context, surface, nd->renderer, clips, do_async); + +if (do_async) + eina_array_push(&vd->cleanup, eo_ref(nd->renderer)); } } @@ -182,7 +189,9 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED, obj->layer->evas->engine.func->ector_begin(output, context, surface, obj->cur->geometry.x + x, obj->cur->geometry.y + y, do_async); - _evas_vg_render(obj, output, context, surface, vd->root, NULL, + _evas_vg_render(obj, vd, + output, context, surface, + vd->root, NULL, do_async); obj->layer->evas->engine.func->ector_end(output, context, surface, do_async); } @@ -325,8 +334,13 @@ evas_object_vg_render_pre(Evas_Object *eo_obj, static void evas_object_vg_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED, - void *type_private_data EINA_UNUSED) + void *type_private_data) { + Evas_VG_Data *vd = type_private_data; + Eo *renderer; + Eina_Array_Iterator iterator; + unsigned int i; + /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ @@ -334,6 +348,9 @@ evas_object_vg_render_post(Evas_Object *eo_obj, evas_object_clip_changes_clean(eo_obj); /* move cur to prev safely for object data */ evas_object_cur_prev(eo_obj); + /* unref all renderer and may also destroy them async */ + EINA_ARRAY_ITER_NEXT((&vd->cleanup), i, renderer, iterator) + eo_unref(renderer); } static unsigned int diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index 3b50c4f..cdaba07 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -3532,7 +3532,6 @@ _draw_thread_ector_cleanup(Evas_Thread_Command_Ector *ector) while ((r = eina_array_pop(ector->clips))) eina_rectangle_free(r); eina_array_free(ector->clips); - eo_unref(ector->r); if (ector->free_it) eina_mempool_free(_mp_command_ector, ector); @@ -3605,7 +3604,7 @@ eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ec if (eina_array_count(c) == 0) eina_array_push(c, eina_rectangle_new(clip.x, clip.y, clip.w, clip.h)); - ector.r = eo_ref(renderer); + ector.r = renderer; // This has already been refcounted by Evas_Object_VG ector.clips = c; ector.render_op = _evas_render_op_to_ector_rop(dc->render_op); ector.mul_col = ector_color_multiply
[EGIT] [core/efl] master 01/01: Evas language: fix script run code
herdsman pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a197aa366be10c57fcbc037d86f4a0310486375b commit a197aa366be10c57fcbc037d86f4a0310486375b Author: Daniel Hirt Date: Wed Aug 19 11:45:09 2015 +0300 Evas language: fix script run code For script runs that start with an UNKNOWN character, the whole run was mistakenly identified as script type UNKNOWN. Also, refactored code a bit for readability. Fixes T2670. @fix --- src/lib/evas/common/language/evas_language_utils.c | 37 ++ 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/lib/evas/common/language/evas_language_utils.c b/src/lib/evas/common/language/evas_language_utils.c index b53ba5e..c9efc3b 100644 --- a/src/lib/evas/common/language/evas_language_utils.c +++ b/src/lib/evas/common/language/evas_language_utils.c @@ -34,6 +34,12 @@ #include "evas_script_table.h" +/* The given 'script' of a character is an EXPLICIT_SCRIPT if it is not one of + * the three special values: INHERITED, COMMON and UNKNOWN. + * See http://www.unicode.org/reports/tr24 */ +#define EXPLICIT_SCRIPT(script) \ + (((script) != EVAS_SCRIPT_UNKNOWN) && ((script) > EVAS_SCRIPT_INHERITED)) + static Evas_Script_Type _evas_common_language_char_script_search(Eina_Unicode unicode) { @@ -75,18 +81,20 @@ evas_common_language_script_end_of_run_get(const Eina_Unicode *str, /* FIXME: Use the standard segmentation instead */ Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN; int i; - for (i = 0 ; i < len ; i++, str++) + + /* Find the first EXPLICIT_SCRIPT (see documented macro above), and +* use it to determine the script run */ + for (i = 0 ; (i < len) && !EXPLICIT_SCRIPT(first) ; i++, str++) { -Evas_Script_Type tmp; -tmp = evas_common_language_char_script_get(*str); -/* Arabic is the first script in the array that's not - * common/inherited. */ -if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC)) - { - first = tmp; - continue; - } -if ((first != tmp) && (tmp >= EVAS_SCRIPT_ARABIC)) +first = evas_common_language_char_script_get(*str); + } + + /* At this point either (i == len) or 'first' is an EXPLICIT_SCRIPT. */ + /* NOTE: ++i, ++str is to start at the character after 'first', if exists. */ + for ( ; i < len ; ++i, ++str) + { +Evas_Script_Type tmp = evas_common_language_char_script_get(*str); +if (EXPLICIT_SCRIPT(tmp) && (tmp != first)) { break; } @@ -112,9 +120,10 @@ evas_common_language_script_type_get(const Eina_Unicode *str, size_t len) { Evas_Script_Type script = EVAS_SCRIPT_COMMON; const Eina_Unicode *end = str + len; - /* Arabic is the first script in the array that's not a common/inherited */ - for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++) - ; + for ( ; (str < end) && !EXPLICIT_SCRIPT(script) ; str++) + { +script = evas_common_language_char_script_get(*str); + } return script; } --
[EGIT] [core/enlightenment] master 01/01: enlightenment: Remove wl_screenshot module from whitelist
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=63b96bbb5b18d503ef3fe5e94f2d3c4c5e4a4035 commit 63b96bbb5b18d503ef3fe5e94f2d3c4c5e4a4035 Author: Chris Michael Date: Wed Aug 19 12:29:20 2015 -0400 enlightenment: Remove wl_screenshot module from whitelist Signed-off-by: Chris Michael --- src/bin/e_module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bin/e_module.c b/src/bin/e_module.c index fc4f6ed..830ac8d 100644 --- a/src/bin/e_module.c +++ b/src/bin/e_module.c @@ -953,7 +953,6 @@ _e_module_whitelist_check(void) "wl_x11", "wl_wl", "wl_drm", - "wl_screenshot", "wl_shell", "wl_desktop_shell", "xkbswitch", --
[EGIT] [core/enlightenment] master 01/01: enlightenment: Remove commented out reference to wl_screenshot Makefile
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f53fd254aa0603555a1b3fcfaf7f6b73728765e3 commit f53fd254aa0603555a1b3fcfaf7f6b73728765e3 Author: Chris Michael Date: Wed Aug 19 12:37:39 2015 -0400 enlightenment: Remove commented out reference to wl_screenshot Makefile Signed-off-by: Chris Michael --- src/modules/Makefile.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/modules/Makefile.mk b/src/modules/Makefile.mk index 8993191..96f0c94 100644 --- a/src/modules/Makefile.mk +++ b/src/modules/Makefile.mk @@ -121,9 +121,6 @@ include src/modules/Makefile_wl_x11.mk include src/modules/Makefile_xwayland.mk -#if HAVE_WAYLAND_SCREENSHOT -#include src/modules/Makefile_wl_screenshot.mk - include src/modules/Makefile_policy_mobile.mk include src/modules/Makefile_geolocation.mk --
[EGIT] [core/enlightenment] master 01/01: update wayland readme with current information
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=b36f79aa55e84970c3faec60c71b5e314782c736 commit b36f79aa55e84970c3faec60c71b5e314782c736 Author: Mike Blumenkrantz Date: Wed Aug 19 13:33:43 2015 -0400 update wayland readme with current information --- README.wayland | 113 ++--- 1 file changed, 36 insertions(+), 77 deletions(-) diff --git a/README.wayland b/README.wayland index 8a9ea13..e91fe09 100644 --- a/README.wayland +++ b/README.wayland @@ -1,20 +1,17 @@ -Wayland support in Enlightenment +*Wayland support in Enlightenment* -Caution: Support for running Enlightenment in a Wayland-Only -configuration is considered Highly Experimental !! Use at your own -risk !! We are not responsible if it nukes your files, burns up your cpu, -kills your cat, sells your house, divorces you, or otherwise messes -Anything up ! - -Use at your own risk !! You have been warned !! +Running Enlightenment as a Wayland compositor is not considered "safe" +for everyday desktop use, though it is functional enough to test or +use in specialized environments. +A list of known issues can be found at the bottom of this file. Requirements: - Aside from the normal requirements that Enlightenment needs, there are -a few things to note in order to get Enlightenment to build without -X11 support. +a few things to note in order to get Enlightenment to build with +Wayland support. Firstly, you MUST have EFL built with the following options: @@ -38,12 +35,6 @@ If you would like support for EGL in Wayland, then also build EFL with: The above options can be enabled for EFL without any adverse effects to existing applications. -Wayland-Only: -- - -If you wish to test out the Highly Experimental standalone -Wayland-Only (no X11) compositor, then read below about how to compile -support for a wayland-only Enlightenment. Compiling: - @@ -51,27 +42,11 @@ Compiling: Next, you will need to adjust the options that you pass to Enlightenment during the compile phase. -Please note, we recommend installing This version of Enlightenment into it's -own separate prefix so that you can still safely fallback to the X11 version. - -This can be done by passing: - - --prefix= - --with-systemdunitdir=/some/path - -Now, on to the magic bits ;) - In order for Enlightenment to be compiled as Wayland compositor you will need to -pass a few more options to the configure stage of Enlightenment: +pass an option to the configure stage of Enlightenment: --enable-wayland -Since this is all still a work-in-progress, there are a few Enlightenment -modules that have not been "fixed" to work without X11 yet. -Those will need to be disabled if you enabled the wayland-only option: - - --disable-xkbswitch - If you also want support for running X applications under Wayland you might want to try out XWayland support: @@ -85,57 +60,41 @@ Usage: - Hopefully at this stage you have successfully built EFL and -Enlightenment in preparation for a Wayland-only setup. Congratulations -!! Now, let's get it running... - -The following steps assume you are currently at a Virtual Terminal -without anything else running (ie: no other window managers, X11, etc). +Enlightenment in preparation for a Wayland-supported setup. Congratulations!! +Now, let's get it running... -In order for Enlightenment to function without X11, we need to setup -the environment. In your current tty, do: - - export E_WL_FORCE=drm - export ELM_DISPLAY=wl - export ELM_ACCEL=opengl (or 'none' for SHM engine) - -This will make sure that Enlightenment renders using DRM, and any -Elementary applications use a Wayland engine. - -At this point, you should just be able 'cd' to the Enlightenment -prefix where you installed, and issue: +Enlightenment, when compiled with Wayland support and started from a tty, +will automatically attempt to load the wl_drm output module and start +a Wayland session. Simply start as usual: ./enlightenment_start -Please Note: It is suggested that you create a separate configuration -profile with only a Minimum of modules loaded. Due to the experimental -(and ongoing) status of Wayland-Only support in Enlightenment, Many -modules May Not Work. Very few have actually been tested yet !! - -If you have a separate configuration profile (as suggested) that you -would like to use, you can tell Enlightenment to use that when you -start it: +If you have a separate configuration profile that you would like to use, +you can tell Enlightenment to use that when you start it: ./enlightenment_start -profile -Notes: -- -Please Note: There is currently NO support for running X11 -applications with this !! So basically, your web browsers won't work, -don't expect to be able to run Firefox, Thunderbird, or practically -Any Other X11 application yet. About the only
[EGIT] [core/enlightenment] master 01/01: don't set E_Client->changes.visible on successful show/hide
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=fb79fff70d368dae23ada7639462bba24b1c1afc commit fb79fff70d368dae23ada7639462bba24b1c1afc Author: Mike Blumenkrantz Date: Wed Aug 19 14:00:52 2015 -0400 don't set E_Client->changes.visible on successful show/hide iirc this was a fix for something else that was going on early in e19 development, now it creates issues when attempting to hide clients --- src/bin/e_client.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index b5da141..e6788ef 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1397,8 +1397,6 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN if (!ec->hidden) { -ec->changes.visible = 1; -EC_CHANGED(ec); if (ec->focused) _e_client_revert_focus(ec); } @@ -1502,11 +1500,6 @@ _e_client_cb_evas_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN { E_Client *ec = data; - if (!ec->hidden) - { -ec->changes.visible = 1; -EC_CHANGED(ec); - } if (!ec->iconic) _e_client_event_simple(data, E_EVENT_CLIENT_SHOW); } --
[EGIT] [core/enlightenment] enlightenment-0.19 01/01: don't set E_Client->changes.visible on successful show/hide
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=65d5e1ba7dd15f992f7175c7f678aa7358869b63 commit 65d5e1ba7dd15f992f7175c7f678aa7358869b63 Author: Mike Blumenkrantz Date: Wed Aug 19 14:00:52 2015 -0400 don't set E_Client->changes.visible on successful show/hide iirc this was a fix for something else that was going on early in e19 development, now it creates issues when attempting to hide clients --- src/bin/e_client.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index f1c8556..40dd42b 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1393,8 +1393,6 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN if (!ec->hidden) { -ec->changes.visible = 1; -EC_CHANGED(ec); if (ec->focused) _e_client_revert_focus(ec); } @@ -1503,11 +1501,6 @@ _e_client_cb_evas_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN { E_Client *ec = data; - if (!ec->hidden) - { -ec->changes.visible = 1; -EC_CHANGED(ec); - } if (!ec->iconic) _e_client_event_simple(data, E_EVENT_CLIENT_SHOW); } --
[EGIT] [core/efl] master 02/02: evas: be more pedantic in case of error in Evas_VG_Node.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0ee28f12e188a9f8a73a3c6e857e6ec0812667ae commit 0ee28f12e188a9f8a73a3c6e857e6ec0812667ae Author: Cedric BAIL Date: Wed Aug 19 20:21:41 2015 +0200 evas: be more pedantic in case of error in Evas_VG_Node. --- src/lib/evas/canvas/evas_vg_node.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c index 775c688..b1c8cbb 100644 --- a/src/lib/evas/canvas/evas_vg_node.c +++ b/src/lib/evas/canvas/evas_vg_node.c @@ -301,7 +301,10 @@ _efl_vg_base_eo_base_parent_set(Eo *obj, } if (!_efl_vg_base_parent_checked_get(obj, &old_parent, &old_cd)) - goto on_error; + { +ERR("Can't check the old parent of %p.", obj); +goto on_error; + } // FIXME: this may become slow with to much object if (old_cd) --
[EGIT] [core/efl] master 01/02: eio: limit race condition during shutdown.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c11f40a3eb1d4a03853986e7ac64a54bd2ac3861 commit c11f40a3eb1d4a03853986e7ac64a54bd2ac3861 Author: Cedric BAIL Date: Wed Aug 19 20:21:02 2015 +0200 eio: limit race condition during shutdown. --- src/lib/eio/eio_monitor_poll.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/eio/eio_monitor_poll.c b/src/lib/eio/eio_monitor_poll.c index 0e222f5..cb9daf9 100644 --- a/src/lib/eio/eio_monitor_poll.c +++ b/src/lib/eio/eio_monitor_poll.c @@ -329,17 +329,20 @@ eio_monitor_fallback_del(Eio_Monitor *monitor) if (!backend) return; - backend->parent = NULL; + if (backend->work) ecore_thread_cancel(backend->work); + if (backend->timer) ecore_timer_del(backend->timer); backend->timer = NULL; if (backend->idler) ecore_idler_del(backend->idler); backend->idler = NULL; - if (backend->work) + + if (backend->work && !ecore_thread_wait(backend->work, 0.3)) { backend->delete_me = EINA_TRUE; -ecore_thread_cancel(backend->work); return; } + + backend->parent = NULL; eina_hash_free(backend->children); free(backend); } --
[EGIT] [core/enlightenment] master 04/05: redo fileman menus to only scan the first 100 items found
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1b2cceafbb64129bac19beb0caaab51e5b99e53a commit 1b2cceafbb64129bac19beb0caaab51e5b99e53a Author: Mike Blumenkrantz Date: Wed Aug 19 14:38:57 2015 -0400 redo fileman menus to only scan the first 100 items found this was meant to be a quick way to navigate directories, not a fully operational filemanager in a menu fix T2462 --- src/modules/fileman/e_mod_menu.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/modules/fileman/e_mod_menu.c b/src/modules/fileman/e_mod_menu.c index 1e6274a..7d09aaa 100644 --- a/src/modules/fileman/e_mod_menu.c +++ b/src/modules/fileman/e_mod_menu.c @@ -104,9 +104,19 @@ _e_mod_menu_cleanup_cb(void *obj) } static Eina_Bool -_e_mod_menu_populate_filter(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, const Eina_File_Direct_Info *info) +_e_mod_menu_populate_filter(void *data EINA_UNUSED, Eio_File *handler, const Eina_File_Direct_Info *info) { struct stat st; + long count; + + count = (long)eio_file_associate_find(handler, "count"); + if (count > 100) + { +eio_file_cancel(handler); +return EINA_FALSE; + } + count++; + eio_file_associate_add(handler, "count", (void*)count, NULL); /* don't show .dotfiles */ if (fileman_config->view.menu_shows_files) return (info->path[info->name_start] != '.'); @@ -214,13 +224,6 @@ _e_mod_menu_populate_item(void *data, Eio_File *handler EINA_UNUSED, const Eina_ e_menu_item_callback_set(mi, _e_mod_menu_populate_cb, dev); } -static void -_e_mod_menu_populate_err(void *data, Eio_File *handler EINA_UNUSED, int error EINA_UNUSED) -{ - if (!e_object_unref(data)) return; - e_menu_thaw(data); -} - static int _e_mod_menu_populate_sort(E_Menu_Item *a, E_Menu_Item *b) { @@ -253,6 +256,12 @@ _e_mod_menu_populate_done(void *data, Eio_File *handler EINA_UNUSED) } static void +_e_mod_menu_populate_err(void *data, Eio_File *handler, int error EINA_UNUSED) +{ + _e_mod_menu_populate_done(data, handler); +} + +static void _e_mod_menu_populate(void *d, E_Menu *m EINA_UNUSED, E_Menu_Item *mi) { E_Menu *subm; --
[EGIT] [core/enlightenment] master 01/05: end wl xdnd drags on the compositor canvas using the full dnd end codepath
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=21ee21bc1fb533c072dee1e9b56160915fc9ad12 commit 21ee21bc1fb533c072dee1e9b56160915fc9ad12 Author: Mike Blumenkrantz Date: Wed Aug 19 14:17:12 2015 -0400 end wl xdnd drags on the compositor canvas using the full dnd end codepath fix T2652 --- src/bin/e_dnd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index 1e0e9ff..b0e9fbd 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -989,13 +989,14 @@ _e_drag_end(int x, int y) if (win == e_comp->ee_win) break; } } +else #endif + if ((e_comp->comp_type == E_PIXMAP_TYPE_WL) && (win == e_comp->ee_win)) +break; if (_drag_current->cb.finished) _drag_current->cb.finished(_drag_current, dropped); _drag_current->cb.finished = NULL; _drag_current->ended = 1; -if (e_comp->comp_type == E_PIXMAP_TYPE_WL) - e_comp_ungrab_input(1, 1); return; } --
[EGIT] [core/enlightenment] master 02/05: set 'stopping' during logout action
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=d631bef3ebe3c80acd722b6c1c240c07ac7a22c4 commit d631bef3ebe3c80acd722b6c1c240c07ac7a22c4 Author: Mike Blumenkrantz Date: Wed Aug 19 14:35:16 2015 -0400 set 'stopping' during logout action this flag is used in some cases to determine whether to behave as though enlightenment is stopping. in the case of logout, we are stopping. --- src/bin/e_sys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c index f89c361..cddd4e4 100644 --- a/src/bin/e_sys.c +++ b/src/bin/e_sys.c @@ -763,6 +763,7 @@ _e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw) E_Client *ec; E_Obj_Dialog *od; + stopping = 1; /* start logout - at end do the a_after action */ if (!raw) { --
[EGIT] [core/enlightenment] master 03/05: do not relaunch relaunchable quickaccess windows during logout
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=08cb4826ad7c32749f03db7978b8d7e8bfaf0850 commit 08cb4826ad7c32749f03db7978b8d7e8bfaf0850 Author: Mike Blumenkrantz Date: Wed Aug 19 14:36:20 2015 -0400 do not relaunch relaunchable quickaccess windows during logout fix T2492 --- src/modules/quickaccess/e_mod_quickaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/quickaccess/e_mod_quickaccess.c b/src/modules/quickaccess/e_mod_quickaccess.c index 252ab63..0004aaa 100644 --- a/src/modules/quickaccess/e_mod_quickaccess.c +++ b/src/modules/quickaccess/e_mod_quickaccess.c @@ -621,7 +621,7 @@ _e_qa_event_border_remove_cb(void *data EINA_UNUSED, int type EINA_UNUSED, E_Eve e_qa_entry_free(entry); return ECORE_CALLBACK_RENEW; } - else if (entry->config.relaunch) _e_qa_border_new(entry); + else if ((!stopping) && entry->config.relaunch) _e_qa_border_new(entry); entry->client = NULL; return ECORE_CALLBACK_RENEW; --
[EGIT] [core/enlightenment] master 05/05: feed mouse-up event during mouse down on menus
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=2cdb5a3b3f77d899224caa40c7989b522f1312dd commit 2cdb5a3b3f77d899224caa40c7989b522f1312dd Author: Mike Blumenkrantz Date: Wed Aug 19 14:49:34 2015 -0400 feed mouse-up event during mouse down on menus this fixes the case where the mouse is moved while the mouse is pressed so that the selected menu item will continue to follow the mouse fix T2127 --- src/bin/e_menu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index 68f6773..e6f81be 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -2717,6 +2717,10 @@ _e_menu_cb_mouse_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_PASS_ON; } + _e_menu_lock = 1; + e_comp_canvas_feed_mouse_up(0); + _e_menu_lock = 0; + /* Only allow dragging from floating menus for now. * The reason for this is that for non floating menus, * the mouse is already down and dragging, so the decision @@ -2735,6 +2739,7 @@ _e_menu_cb_mouse_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) unsigned int t; int ret = 0; + if (_e_menu_lock) return ECORE_CALLBACK_RENEW; ev = event; if (ev->window != _e_menu_win) return ECORE_CALLBACK_RENEW; --
[EGIT] [core/enlightenment] enlightenment-0.19 03/04: redo fileman menus to only scan the first 100 items found
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7f8f136a2a9c4ada485e6194946163247fd7c614 commit 7f8f136a2a9c4ada485e6194946163247fd7c614 Author: Mike Blumenkrantz Date: Wed Aug 19 14:38:57 2015 -0400 redo fileman menus to only scan the first 100 items found this was meant to be a quick way to navigate directories, not a fully operational filemanager in a menu fix T2462 --- src/modules/fileman/e_mod_menu.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/modules/fileman/e_mod_menu.c b/src/modules/fileman/e_mod_menu.c index 088a39f..782c8b8 100644 --- a/src/modules/fileman/e_mod_menu.c +++ b/src/modules/fileman/e_mod_menu.c @@ -104,9 +104,19 @@ _e_mod_menu_cleanup_cb(void *obj) } static Eina_Bool -_e_mod_menu_populate_filter(void *data __UNUSED__, Eio_File *handler __UNUSED__, const Eina_File_Direct_Info *info) +_e_mod_menu_populate_filter(void *data EINA_UNUSED, Eio_File *handler, const Eina_File_Direct_Info *info) { struct stat st; + long count; + + count = (long)eio_file_associate_find(handler, "count"); + if (count > 100) + { +eio_file_cancel(handler); +return EINA_FALSE; + } + count++; + eio_file_associate_add(handler, "count", (void*)count, NULL); /* don't show .dotfiles */ if (fileman_config->view.menu_shows_files) return (info->path[info->name_start] != '.'); @@ -214,13 +224,6 @@ _e_mod_menu_populate_item(void *data, Eio_File *handler __UNUSED__, const Eina_F e_menu_item_callback_set(mi, _e_mod_menu_populate_cb, dev); } -static void -_e_mod_menu_populate_err(void *data, Eio_File *handler __UNUSED__, int error __UNUSED__) -{ - if (!e_object_unref(data)) return; - e_menu_thaw(data); -} - static int _e_mod_menu_populate_sort(E_Menu_Item *a, E_Menu_Item *b) { @@ -253,7 +256,13 @@ _e_mod_menu_populate_done(void *data, Eio_File *handler __UNUSED__) } static void -_e_mod_menu_populate(void *d, E_Menu *m __UNUSED__, E_Menu_Item *mi) +_e_mod_menu_populate_err(void *data, Eio_File *handler, int error EINA_UNUSED) +{ + _e_mod_menu_populate_done(data, handler); +} + +static void +_e_mod_menu_populate(void *d, E_Menu *m EINA_UNUSED, E_Menu_Item *mi) { E_Menu *subm; const char *dev, *path, *rp; --
[EGIT] [core/enlightenment] enlightenment-0.19 02/04: do not relaunch relaunchable quickaccess windows during logout
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=b274b2f6190086925c90f40b08ae68727b1c232e commit b274b2f6190086925c90f40b08ae68727b1c232e Author: Mike Blumenkrantz Date: Wed Aug 19 14:36:20 2015 -0400 do not relaunch relaunchable quickaccess windows during logout fix T2492 --- src/modules/quickaccess/e_mod_quickaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/quickaccess/e_mod_quickaccess.c b/src/modules/quickaccess/e_mod_quickaccess.c index a3e379c..0148e9d 100644 --- a/src/modules/quickaccess/e_mod_quickaccess.c +++ b/src/modules/quickaccess/e_mod_quickaccess.c @@ -624,7 +624,7 @@ _e_qa_event_border_remove_cb(void *data __UNUSED__, int type __UNUSED__, E_Event e_qa_entry_free(entry); return ECORE_CALLBACK_RENEW; } - else if (entry->config.relaunch) _e_qa_border_new(entry); + else if ((!stopping) && entry->config.relaunch) _e_qa_border_new(entry); entry->client = NULL; return ECORE_CALLBACK_RENEW; --
[EGIT] [core/enlightenment] enlightenment-0.19 01/04: set 'stopping' during logout action
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=939ae733150cfb8e024c258f34e51dc3bc6cde08 commit 939ae733150cfb8e024c258f34e51dc3bc6cde08 Author: Mike Blumenkrantz Date: Wed Aug 19 14:35:16 2015 -0400 set 'stopping' during logout action this flag is used in some cases to determine whether to behave as though enlightenment is stopping. in the case of logout, we are stopping. --- src/bin/e_sys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c index 7ed29ba..025ed75 100644 --- a/src/bin/e_sys.c +++ b/src/bin/e_sys.c @@ -776,6 +776,7 @@ _e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw) E_Client *ec; E_Obj_Dialog *od; + stopping = 1; /* start logout - at end do the a_after action */ if (!raw) { --
[EGIT] [core/enlightenment] enlightenment-0.19 04/04: feed mouse-up event during mouse down on menus
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=534c7cde1175426a9c05c5b6738a079d70f0a1df commit 534c7cde1175426a9c05c5b6738a079d70f0a1df Author: Mike Blumenkrantz Date: Wed Aug 19 14:49:34 2015 -0400 feed mouse-up event during mouse down on menus this fixes the case where the mouse is moved while the mouse is pressed so that the selected menu item will continue to follow the mouse fix T2127 --- src/bin/e_menu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index 070bf86..45cd243 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -2840,6 +2840,10 @@ _e_menu_cb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event) return ECORE_CALLBACK_PASS_ON; } + _e_menu_lock = 1; + _mouse_up_feed(e_comp_get(NULL)->evas, 0); + _e_menu_lock = 0; + /* Only allow dragging from floating menus for now. * The reason for this is that for non floating menus, * the mouse is already down and dragging, so the decision @@ -2858,6 +2862,7 @@ _e_menu_cb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event) unsigned int t; int ret = 0; + if (_e_menu_lock) return ECORE_CALLBACK_RENEW; ev = event; if (ev->window != _e_menu_win) return ECORE_CALLBACK_RENEW; --
[EGIT] [core/enlightenment] master 01/01: disable xkbswitch module loading under wayland
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=77e76582b1d1f8ffa9a3b77790a3e0f5a96ebc3d commit 77e76582b1d1f8ffa9a3b77790a3e0f5a96ebc3d Author: Mike Blumenkrantz Date: Wed Aug 19 15:20:45 2015 -0400 disable xkbswitch module loading under wayland NYI --- src/modules/xkbswitch/e_mod_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/xkbswitch/e_mod_main.c b/src/modules/xkbswitch/e_mod_main.c index 89c1c59..9df61a4 100644 --- a/src/modules/xkbswitch/e_mod_main.c +++ b/src/modules/xkbswitch/e_mod_main.c @@ -67,6 +67,8 @@ E_API E_Module_Api e_modapi = E_API void * e_modapi_init(E_Module *m) { + /* FIXME */ + if (e_comp->comp_type == E_PIXMAP_TYPE_WL) return NULL; /* Menus and dialogs */ e_configure_registry_category_add("keyboard_and_mouse", 80, _("Input"), NULL, "preferences-behavior"); --
[EGIT] [core/enlightenment] master 01/01: check compositor screen iface existence before deref in dpms
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=38d574697768605fbcadbed77816a16bbbe78425 commit 38d574697768605fbcadbed77816a16bbbe78425 Author: Mike Blumenkrantz Date: Wed Aug 19 15:32:24 2015 -0400 check compositor screen iface existence before deref in dpms fixes crash in compositors lacking screen ifaces --- src/bin/e_dpms.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/e_dpms.c b/src/bin/e_dpms.c index 44f28df..8186464 100644 --- a/src/bin/e_dpms.c +++ b/src/bin/e_dpms.c @@ -136,7 +136,7 @@ _e_dpms_handler_desk_show_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void static Eina_Bool _e_dpms_standby(void *d EINA_UNUSED) { - if (e_comp->screen->dpms) + if (e_comp->screen && e_comp->screen->dpms) e_comp->screen->dpms(1); standby_timer = NULL; return EINA_FALSE; @@ -145,7 +145,7 @@ _e_dpms_standby(void *d EINA_UNUSED) static Eina_Bool _e_dpms_suspend(void *d EINA_UNUSED) { - if (e_comp->screen->dpms) + if (e_comp->screen && e_comp->screen->dpms) e_comp->screen->dpms(2); suspend_timer = NULL; return EINA_FALSE; @@ -154,7 +154,7 @@ _e_dpms_suspend(void *d EINA_UNUSED) static Eina_Bool _e_dpms_off(void *d EINA_UNUSED) { - if (e_comp->screen->dpms) + if (e_comp->screen && e_comp->screen->dpms) e_comp->screen->dpms(3); off_timer = NULL; return EINA_FALSE; @@ -175,7 +175,7 @@ _e_dpms_screensaver_off() E_FREE_FUNC(standby_timer, ecore_timer_del); E_FREE_FUNC(suspend_timer, ecore_timer_del); E_FREE_FUNC(off_timer, ecore_timer_del); - if (e_comp->screen->dpms) + if (e_comp->screen && e_comp->screen->dpms) e_comp->screen->dpms(0); return ECORE_CALLBACK_RENEW; } --
[EGIT] [core/enlightenment] enlightenment-0.19 02/02: battery: let's finally allow the battery process to rest also when enlightenment die.
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1f17ec5781237ccbe71627db181eaafd4c291d0d commit 1f17ec5781237ccbe71627db181eaafd4c291d0d Author: Cedric BAIL Date: Mon Aug 17 22:26:24 2015 +0200 battery: let's finally allow the battery process to rest also when enlightenment die. --- src/modules/battery/e_mod_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c index 2168e41..454ca63 100644 --- a/src/modules/battery/e_mod_main.c +++ b/src/modules/battery/e_mod_main.c @@ -388,7 +388,8 @@ _battery_config_updated(void) battery_config->batget_exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_READ_LINE_BUFFERED | - ECORE_EXE_NOT_LEADER, NULL); + ECORE_EXE_NOT_LEADER | + ECORE_EXE_TERM_WITH_PARENT, NULL); } } --
[EGIT] [core/enlightenment] enlightenment-0.19 01/02: temperature: let's finally allow the temp process to rest also when enlightenment die.
discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=8d5c5a44f1e221efaf2cc1b9670f48846b0614da commit 8d5c5a44f1e221efaf2cc1b9670f48846b0614da Author: Cedric BAIL Date: Mon Aug 17 22:30:01 2015 +0200 temperature: let's finally allow the temp process to rest also when enlightenment die. --- src/modules/temperature/e_mod_main.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c index 2ff95ae..d5779ba 100644 --- a/src/modules/temperature/e_mod_main.c +++ b/src/modules/temperature/e_mod_main.c @@ -326,10 +326,11 @@ temperature_face_update_config(Config_Face *inst) inst->sensor_type, (inst->sensor_name ? inst->sensor_name : "(null)"), inst->poll_interval); -inst->tempget_exe = - ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_READ | - ECORE_EXE_PIPE_READ_LINE_BUFFERED | - ECORE_EXE_NOT_LEADER, inst); + inst->tempget_exe = + ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_READ | + ECORE_EXE_PIPE_READ_LINE_BUFFERED | + ECORE_EXE_NOT_LEADER | + ECORE_EXE_TERM_WITH_PARENT, inst); } } else if (inst->backend == UDEV) @@ -354,10 +355,11 @@ temperature_face_update_config(Config_Face *inst) inst->sensor_type, (inst->sensor_name ? inst->sensor_name : "(null)"), inst->poll_interval); - inst->tempget_exe = - ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_READ | -ECORE_EXE_PIPE_READ_LINE_BUFFERED | -ECORE_EXE_NOT_LEADER, inst); +inst->tempget_exe = + ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_READ | + ECORE_EXE_PIPE_READ_LINE_BUFFERED | + ECORE_EXE_NOT_LEADER | + ECORE_EXE_TERM_WITH_PARENT, inst); } #endif } --
[EGIT] [core/enlightenment] master 01/01: remove bz2 from dist
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=ac56ba57d1c3150037bb81b00b586bd4f3c3c55e commit ac56ba57d1c3150037bb81b00b586bd4f3c3c55e Author: Mike Blumenkrantz Date: Wed Aug 19 18:19:45 2015 -0400 remove bz2 from dist apparently people don't use this anymore or something --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c079740..6423c3b 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AH_BOTTOM([ #endif /* EFL_CONFIG_H__ */ ]) -AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-xz -Wno-portability]) +AM_INIT_AUTOMAKE([1.11 dist-xz -Wno-portability]) AM_SILENT_RULES([yes]) AC_USE_SYSTEM_EXTENSIONS --
[EGIT] [tools/enventor] master 01/01: fix win32 porting.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=072bba3dc10cae6c58264fd48bf1a9cdd1aec431 commit 072bba3dc10cae6c58264fd48bf1a9cdd1aec431 Author: ChunEon Park Date: Thu Aug 20 11:03:46 2015 +0900 fix win32 porting. specify missing dll import/export declarations for EAPIs. --- src/lib/enventor_private.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h index 1b37811..82638a8 100644 --- a/src/lib/enventor_private.h +++ b/src/lib/enventor_private.h @@ -1,6 +1,25 @@ #ifndef __ENVENTOR_PRIVATE_H__ #define __ENVENTOR_PRIVATE_H__ +/*** + * Compatible ABI for Win32 + ***/ +#ifdef _WIN32 +# ifdef EAPI +# undef EAPI +# endif +# ifdef ENVENTOR_WIN32_BUILD_SUPPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI __declspec(dllimport) +# endif +# ifdef EOAPI +# undef EOAPI +# endif +#define EOAPI EAPI +#endif + + #include "common.h" #define QUOT """ --
[EGIT] [tools/enventor] master 01/01: Edc_editor: run programs in case if name placed on new line.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=08a2d9d03855afe0b5959b08570d7e53b7c2ff3b commit 08a2d9d03855afe0b5959b08570d7e53b7c2ff3b Author: Mykyta Biliavskyi Date: Thu Aug 20 11:07:36 2015 +0900 Edc_editor: run programs in case if name placed on new line. Summary: launch programs in cases when program name is placed not in the same paragraph with "program" keyword. Now analyzes whole text, that placed after selected keyword, not only text inside the same paragraph. @fix Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D2964 --- src/lib/edc_editor.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c index e2db0e6..4b7e6d4 100644 --- a/src/lib/edc_editor.c +++ b/src/lib/edc_editor.c @@ -589,11 +589,16 @@ edit_cursor_double_clicked_cb(void *data, Evas_Object *obj, Evas_Object *textblock = elm_entry_textblock_get(obj); Evas_Textblock_Cursor *cursor = evas_object_textblock_cursor_get(textblock); - const char *str = evas_textblock_cursor_paragraph_text_get(cursor); + const char *str = elm_entry_entry_get(obj); char *text = elm_entry_markup_to_utf8(str); - char *cur = strstr(text, selected); - - if (!strcmp(selected, "program")) + int cur_pos = elm_entry_cursor_pos_get(obj); + char *cur = text + (cur_pos - strlen(selected)); + + /* TODO: improve parser_name_get, for recognize cases when name is absent. + * Because right now any text inside quotes that placed after selection is + * recognized as name. + */ + if (!strcmp(selected, "program")) { program_run(ed, cur); } --
[EGIT] [tools/enventor] master 01/01: Autocomplete: except text between quotes.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=88055de59c131f258fde2d42411f37412f480c61 commit 88055de59c131f258fde2d42411f37412f480c61 Author: Mykyta Biliavskyi Date: Thu Aug 20 11:09:37 2015 +0900 Autocomplete: except text between quotes. Summary: text that placed between quotes is excepted from recognize keywords. Previously when inside was string like this: 'images.normal: "123.png";' the autocomplete parser is recognize the dot, that placed inside quotes. It is broke the searching keyword in candidates tree. Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D2958 --- src/lib/auto_comp.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib/auto_comp.c b/src/lib/auto_comp.c index d761826..6859496 100644 --- a/src/lib/auto_comp.c +++ b/src/lib/auto_comp.c @@ -157,8 +157,19 @@ context_lexem_thread_cb(void *data, Ecore_Thread *thread EINA_UNUSED) while (cur && cur <= end) { -if ((cur!=end) && (!strncmp(cur, quot, quot_len))) - quot_cnt++; +if ((cur != end) && (!strncmp(cur, quot, quot_len))) + { + /*TODO: add exception for case '\"'*/ +quot_cnt++; +cur++; +continue; + } +if (quot_cnt % 2) + { + cur++; + continue; + } + //Check inside comment if (*cur == '/') --
[EGIT] [tools/enventor] master 02/02: Edc parser: recognize description block without state name.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=cd062d9564868385e3173aa5a7e75048ff5a7dc2 commit cd062d9564868385e3173aa5a7e75048ff5a7dc2 Author: Mykyta Biliavskyi Date: Thu Aug 20 11:19:15 2015 +0900 Edc parser: recognize description block without state name. Summary: In cases when keyword "description" is used without state name(it mean that state will have "default" 0.0 name) - parser is fail to recognize correct name of that description and all others that placed below. This make impossible to switching between groups and part descriptions, that placed below description without state name. @fix Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D2954 --- src/lib/edc_parser.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c index ece12e7..17960fc 100644 --- a/src/lib/edc_parser.c +++ b/src/lib/edc_parser.c @@ -134,6 +134,10 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) "box", "table", "external" }; const char *DESC[2] = { "desc", "description" }; const int DESC_LEN[2] = { 4, 11 }; + const char *STATE = "state"; + const char *DEF_STATE_NAME = "default"; + const int DEF_STATE_LEN = 7; + cur_name_td *td = data; char *utf8 = td->utf8; @@ -244,8 +248,8 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) { //description? or desc? int desc_idx = -1; - if (!strncmp(p, DESC[0], DESC_LEN[0])) desc_idx = 0; - else if (!strncmp(p, DESC[1], DESC_LEN[1])) desc_idx = 1; + if (!strncmp(p, DESC[1], DESC_LEN[1])) desc_idx = 1; + else if (!strncmp(p, DESC[0], DESC_LEN[0])) desc_idx = 0; //we got a description! if (desc_idx != -1) @@ -253,6 +257,14 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) p += DESC_LEN[desc_idx]; char *name_begin = strstr(p, QUOT_UTF8); if (!name_begin) goto end; + char *state = strstr(p, STATE); + if ((desc_idx == 1) && (!state || state > name_begin)) +{ + desc_name = DEF_STATE_NAME; + desc_name_len = DEF_STATE_LEN; + value_convert = 0; + continue; +} name_begin += QUOT_UTF8_LEN; p = name_begin; char *name_end = strstr(p, QUOT_UTF8); --
[EGIT] [tools/enventor] master 01/02: Autocomplete: support images subblock inside group block.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=c33ba546f219f1c10b60fe24b2112b8df4647c45 commit c33ba546f219f1c10b60fe24b2112b8df4647c45 Author: Mykyta Biliavskyi Date: Thu Aug 20 11:11:52 2015 +0900 Autocomplete: support images subblock inside group block. Summary: for cases when "group" block contain "images" subblock autocomplete feature works wrong if cursor placed below "images" subblock. Added support "images" inside "group".Also added "part" to recognized keywords. @fix Reviewers: Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D2955 --- data/autocomp/autocomp.src | 108 - 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/data/autocomp/autocomp.src b/data/autocomp/autocomp.src index b9a6c61..68ea63a 100644 --- a/data/autocomp/autocomp.src +++ b/data/autocomp/autocomp.src @@ -358,6 +358,111 @@ group "lexem" struct { } } group "lexem" struct { +group "nodes" list { + group "lexem" struct { + group "nodes" list { + } + group "txt" var_array { + count 1; + value "string" string: "%s: \"\" COMP;"; + } + value "cursor_offset" int: 7 + value "line_back" int: 0; + group "name" var_array { + count 1; + value "string" string: "image"; + } + } + group "lexem" struct { + group "nodes" list { + group "lexem" struct { +group "nodes" list { +} +group "txt" var_array { +count 1; +value "string" string: "%s: \"\";"; +} +value "cursor_offset" int: 2; +value "line_back" int: 0; +group "name" var_array { + count 1; + value "string" string: "name"; +} + } + group "lexem" struct { +group "nodes" list { + group "lexem" struct { + group "nodes" list { + } + group "txt" var_array { + count 1; + value "string" string: "%s: \"\" COMP;"; + } + value "cursor_offset" int: 7; + value "line_back" int: 0; + group "name" var_array { + count 1; + value "string" string: "image"; + } + } + group "lexem" struct { + group "nodes" list { + } + group "txt" var_array { + count 1; + value "string" string: "%s: ;"; + } + value "cursor_offset" int: 1; + value "line_back" int: 0; + group "name" var_array { + count 1; + value "string" string: "size"; + } + } +} +group "txt" var_array { +count 3; +value "string" string: "%s {"; +value "string" string: " "; +value "string" string: "}"; +} +value "cursor_offset" int: 2 +value "line_back" int: 1; +group "name" var_array { + count 1; + value "string" string: "image"; +
[EGIT] [core/efl] master 01/01: Edje_Entry: check selection before the cursor position change.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=41106fe20fe991e42633fbc9a9b7155db971cc90 commit 41106fe20fe991e42633fbc9a9b7155db971cc90 Author: Mykyta Biliavskyi Date: Thu Aug 20 11:31:27 2015 +0900 Edje_Entry: check selection before the cursor position change. Summary: change position of the main textblock cursor in depends of the selection is present. Change cursor position to the start or end of selection only when selection is present. @fix Test Plan: Press "Up" and "Down" arrow keys on selected and normal text. For selected text: the entry cursor should be placed one line above or below selection block (in depends from pressed button). For normal text: the entry cursor should be placed one line above or below of the current cursor position. Reviewers: tasn, Hermet, herdsman Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2948 --- src/lib/edje/edje_entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 8b4f256..b7289b4 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -1461,7 +1461,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, _sel_start(en->cursor, rp->object, en); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } - else + else if (en->have_selection) { if (evas_textblock_cursor_compare(en->sel_start, en->sel_end) < 0) evas_textblock_cursor_copy(en->sel_start, en->cursor); @@ -1497,7 +1497,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, _sel_start(en->cursor, rp->object, en); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } - else + else if (en->have_selection) { if (evas_textblock_cursor_compare(en->sel_start, en->sel_end) < 0) evas_textblock_cursor_copy(en->sel_end, en->cursor); --
[EGIT] [core/efl] master 01/01: Evas filters: Fix char buffer size
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=50e91e53219a31c967e1c702073c6f960b175c90 commit 50e91e53219a31c967e1c702073c6f960b175c90 Author: Jean-Philippe Andre Date: Thu Aug 20 11:37:22 2015 +0900 Evas filters: Fix char buffer size Thanks Coverity. Fixes CID 1316684 --- src/lib/evas/filters/evas_filter_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c index f7639554..a2f43f8 100644 --- a/src/lib/evas/filters/evas_filter_parser.c +++ b/src/lib/evas/filters/evas_filter_parser.c @@ -776,7 +776,7 @@ _buffer_add(Evas_Filter_Program *pgm, const char *name, Eina_Bool alpha, buf->manual = manual; if (!name) { -char bufname[32]; +char bufname[64]; _buffer_name_format(bufname, pgm, src); buf->name = eina_stringshare_add(bufname); } --
[EGIT] [core/efl] master 01/01: eo - destruction - ensure child is removed from parent child list
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8689d54471aafdd7a5b5a27ce116bf2ab68c1042 commit 8689d54471aafdd7a5b5a27ce116bf2ab68c1042 Author: Carsten Haitzler (Rasterman) Date: Thu Aug 20 12:50:52 2015 +0900 eo - destruction - ensure child is removed from parent child list this follows on from cbc1a217bfc8b5c6dd94f0448f19245c43eb05e0 as this code was correct, but was then causing bugs due to children staying in their parent lists. this should never have happened and this is really bad. this fixes this and ensures children on destruction are gone from their parent lists. @fix --- src/lib/eo/eo_base_class.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index fe52203..9f8252b 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -977,7 +977,6 @@ EOLIAN static void _eo_base_destructor(Eo *obj, Eo_Base_Data *pd) { Eo *child; - Eo_Base_Data *child_pd; DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS)); @@ -987,11 +986,18 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd) while (pd->children) { child = eina_list_data_get(pd->children); -child_pd = eo_data_scope_get(child, EO_BASE_CLASS); -pd->children = eina_list_remove_list(pd->children, pd->children); -child_pd->parent_list = NULL; eo_do(child, eo_parent_set(NULL)); } + // remove child from its parent on destruction - ha to be done + if (pd->parent) + { +Eo_Base_Data *parent_pd; + +parent_pd = eo_data_scope_get(pd->parent, EO_BASE_CLASS); +parent_pd->children = eina_list_remove_list(parent_pd->children, +pd->parent_list); +pd->parent_list = NULL; + } _eo_generic_data_del_all(pd); _wref_destruct(pd); --
[EGIT] [core/elementary] master 01/01: elm_win: set wm rotation hints _elm_win_xwin_update().
hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0b6d1794d48ceecd17d5fe12010eb0246ade6e74 commit 0b6d1794d48ceecd17d5fe12010eb0246ade6e74 Author: Seunghun Lee Date: Thu Aug 20 14:11:55 2015 +0900 elm_win: set wm rotation hints _elm_win_xwin_update(). Summary: if app sets available rotations before invoking elm_win_alpha_set(), wm rotation doesn't work. this patch fixes it. Test Plan: N/A Reviewers: jypark Reviewed By: jypark Differential Revision: https://phab.enlightenment.org/D2946 --- src/lib/elm_win.c | 8 1 file changed, 8 insertions(+) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 337929f..6c50444 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2278,6 +2278,14 @@ _elm_win_xwin_update(Elm_Win_Data *sd) else if (sd->indmode == ELM_WIN_INDICATOR_HIDE) ecore_x_e_illume_indicator_state_set (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF); + + if ((sd->wm_rot.count) && (sd->wm_rot.rots)) + ecore_evas_wm_rotation_available_rotations_set(sd->ee, +sd->wm_rot.rots, +sd->wm_rot.count); + if (sd->wm_rot.preferred_rot != -1) + ecore_evas_wm_rotation_preferred_rotation_set(sd->ee, + sd->wm_rot.preferred_rot); } #endif --
[EGIT] [core/elementary] elementary-1.15 01/01: elm_win: set wm rotation hints _elm_win_xwin_update().
hermet pushed a commit to branch elementary-1.15. http://git.enlightenment.org/core/elementary.git/commit/?id=c3ebffc185a8ceddba910868a746450458449334 commit c3ebffc185a8ceddba910868a746450458449334 Author: Seunghun Lee Date: Thu Aug 20 14:11:55 2015 +0900 elm_win: set wm rotation hints _elm_win_xwin_update(). Summary: if app sets available rotations before invoking elm_win_alpha_set(), wm rotation doesn't work. this patch fixes it. Test Plan: N/A Reviewers: jypark Reviewed By: jypark Differential Revision: https://phab.enlightenment.org/D2946 --- src/lib/elm_win.c | 8 1 file changed, 8 insertions(+) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 5c0d807..fe6e34c 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2272,6 +2272,14 @@ _elm_win_xwin_update(Elm_Win_Data *sd) else if (sd->indmode == ELM_WIN_INDICATOR_HIDE) ecore_x_e_illume_indicator_state_set (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF); + + if ((sd->wm_rot.count) && (sd->wm_rot.rots)) + ecore_evas_wm_rotation_available_rotations_set(sd->ee, +sd->wm_rot.rots, +sd->wm_rot.count); + if (sd->wm_rot.preferred_rot != -1) + ecore_evas_wm_rotation_preferred_rotation_set(sd->ee, + sd->wm_rot.preferred_rot); } #endif --
[EGIT] [core/efl] master 01/01: evil: fix incorrect function call.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=024812c1a76286991f292c3191936778ec219ff8 commit 024812c1a76286991f292c3191936778ec219ff8 Author: ChunEon Park Date: Thu Aug 20 14:25:15 2015 +0900 evil: fix incorrect function call. _localtime64_s() requires _time64_t as one argument but here we passes time_s. Proper api is localtime_s(). --- src/lib/evil/evil_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evil/evil_time.c b/src/lib/evil/evil_time.c index 9e6fd5c..6964654 100644 --- a/src/lib/evil/evil_time.c +++ b/src/lib/evil/evil_time.c @@ -13,7 +13,7 @@ struct tm * evil_localtime_r(const time_t *timep, struct tm *result) { - _localtime64_s(result, timep); + localtime_s(result, timep); return result; } --
[EGIT] [core/efl] master 01/01: evil: fix warnings.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6a7e595bf6bad42c278ec818b1e20d691072291e commit 6a7e595bf6bad42c278ec818b1e20d691072291e Author: ChunEon Park Date: Thu Aug 20 15:33:06 2015 +0900 evil: fix warnings. correct data size for 32/64 compatibility. --- src/lib/evil/evil_time.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/evil/evil_time.c b/src/lib/evil/evil_time.c index 6964654..1c06ecb 100644 --- a/src/lib/evil/evil_time.c +++ b/src/lib/evil/evil_time.c @@ -310,7 +310,11 @@ strptime(const char *buf, const char *fmt, struct tm *tm) continue; #ifndef TIME_MAX -# define TIME_MAX INT64_MAX +# if INTPTR_MAX == 0x +# define TIME_MAX INT64_MAX +# else +# define TIME_MAX INT32_MAX +# endif #endif case 's': /* seconds since the epoch */ { @@ -331,7 +335,7 @@ strptime(const char *buf, const char *fmt, struct tm *tm) } while ((sse * 10 <= TIME_MAX) && rulim && *bp >= '0' && *bp <= '9'); -if (sse < 0 || (__int64)sse > TIME_MAX) +if (sse < 0 || sse > TIME_MAX) { bp = NULL; continue; --