Commit Graph

3899 Commits

Author SHA1 Message Date
Marcel Hollerbach c3d1f19ed8 ecore_evas_x: correctly use offset of the drag window 2022-05-31 21:16:24 +02:00
Carsten Haitzler 54c6516373 evas psd loader - don't crash on loading non rgb psd's
at least fail gracefully.

@fix
2022-05-22 09:26:32 +01:00
Carsten Haitzler 7743b17dba evas - png loader - work around libpng arm bug where rgb > a on decode
on arm when a is 0 ... per pixel rgb can be > 0 which violates premul
rgb leading to junk rendering. this now is worked around in the png
loader and forces rgb to 0 when a is 0 per pixel.

@fix
2022-05-04 18:12:24 +01:00
Carsten Haitzler bdbac3ae45 evas - jxl - remove timing debug 2022-04-28 19:15:02 +01:00
Carsten Haitzler d7521c69dd jxl - add actual files ... as i had to get patch manually from phab
missed these... arc broken... sorry
2022-04-28 17:43:39 +01:00
Carsten Haitzler 1e623d3350 ecore evas - x - dont dfisable dnd if we are listening for drop events
on mouse release/up dont disable xdnd awareness if we're listening for
dnd events still

@fix
2022-04-04 20:58:15 +01:00
Christopher Michael dc81e925c8 ecore_evas_drm: Remove hardcoded depth & bpp
As we have an ecore_drm2 function to get preferred depth & bpp, we
should be using that so remove hardcoded values and set the
edata->depth & bpp using the ecore_drm2 function
2022-03-25 08:13:33 -04:00
Christopher Michael e3e5314950 ecore_buffer: Remove duplicate function calls
As we already set these variables at the top of the function, there is
no need to reget the xcb connection or generate the pixmap id.
2022-02-10 09:32:09 -05:00
junsu choi ef784708b9 evas_vg_load_svg: Fix colorstop offset parser
Summary:
Values different from numbers and percentages should be ignored
and the default values should be applied (zeros).
And set the min and max of the offset value to be 0, 1.
Also, this patch make that the offset is not input in the reverse order.

Test Plan:
Test SVG Image
```
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
    <linearGradient id="grad" x1="0" y1="0" x2="1" y2="1">
        <stop offset="10%" stop-color="white"/>
        <stop offset="0.2" stop-color="red"/>
        <stop offset="30% k" stop-color="blue"/>
        <stop offset="40%" stop-color="yellow"/>
        <stop offset="0.5m" stop-color="red"/>
        <stop offset="0.6 " stop-color="green"/>
        <stop offset="70%m" stop-color="black"/>
        <stop offset="80%" stop-color="white"/>
    </linearGradient>
    <rect x="20" y="20" width="160" height="160" fill="url(#grad)"/>
</svg>

```

Result
{F4792365}

Reviewers: Hermet, raster, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12318
2022-01-12 11:34:29 +09:00
junsu choi 92f77c5123 evas_vg_load_svg: Add check that stroke-dasharray is "none"
Summary:
"none" is the default value of dasharray and can actually be used.
Currently using "none" causes a segfault. This patch prevents it.

Test Plan:
SVG image
```
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
  <line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="none" />
</svg>
```

Reviewers: Hermet, raster, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12317
2022-01-12 11:33:44 +09:00
junsu choi 3411c604f2 evas_vg_load_svg: Fix negative attrs length
Summary:
After finding no attributes but spaces, attrsLength could be negative.
This will cause a segfault in parser functions.
So, change the position of attrs_length to prevent this.

Test Plan:
Example SVG
```
<?xml version="1.0" encoding="UTF-8"?>
<svg><g  ></g></svg>
```

Reviewers: Hermet, raster, kimcinoo

Reviewed By: Hermet

Subscribers: #reviewers, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12314
2022-01-12 11:19:24 +09:00
junsu choi a32373195b evas_vg_load_svg: Prevent array overflow
Summary: sz must be less than 20 to append 'carriage return'

Test Plan:
Example SVG
```
<?xml version="1.0" encoding="UTF-8"?>
<svg><aaaaaaaaaaaaaaaaaaaa > </aaaaaaaaaaaaaaaaaaaa></svg>
```

@fix

Reviewers: Hermet, raster, kimcinoo

Reviewed By: raster

Subscribers: cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12313
2022-01-11 00:41:41 +00:00
Vincent Torri 4f15af95e6 avif saver: fix test on the returned type of fwrite()
Test Plan: save as avif file

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12310
2021-12-16 20:40:27 +00:00
Carsten Haitzler f6c99bd806 ecore evas - wl - detect timestamsp too far in the past and complain
this has all sorts of nasty side effects by rewinding time far too
much and thus causing timers to expire early and so on - these
timestamps are MEANT to be like a frame vsync time... they thus should
be like normally 0.02sec or so in the past or less... (0.008s on
average) so at 0.1 sec complain and ignore the old timestamp. weston
does this and sends us timestmaps 0.33sec in the past ... and its not
nice.

@fix
2021-12-10 10:54:32 +00:00
Carsten Haitzler 2fb5530be7 evas - loaders - avif, heif - allow threaded loading
i see no good reason to not allow these loaders to run in threads.
they are isolated and i don't see a reason for the libs called to not
be threadsafe.
2021-12-04 09:18:47 +00:00
Vincent Torri 7dcaab26cf Evas engines: remove last bits of evas_cserve2
Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12302
2021-10-26 14:52:53 +01:00
Carsten Haitzler 7f759bc42d evas - software x11 - remove unused xlib+egl code in sw x11
this code is unused and just wastest space, compile time etc.
2021-10-25 10:15:21 +01:00
Vincent Torri 30207a6165 Evas: remove old xcb code in software_x11 code
Summary: this backend code was for selecting XCB over Xlib. Now XCB is removed, this code is useless

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12299
2021-10-25 10:08:57 +01:00
Carsten Haitzler 2ce7feb3d5 emotion - properly track subtitle mute state and init emotion obj early
fix setting things on an emotion obj early bu initting engine early
and also track spu mute flags to set on pipe later

@fix
2021-09-26 21:23:24 +01:00
Carsten Haitzler 6c084b19b0 evas - gl x11 - dont crearte eglimage multiple times in same frame
if we're rendering in multiple scissor regions/updates - dont create
the eglimage multiple times for each bind+pass - only once for that
frame.
2021-09-06 13:29:31 +01:00
Carsten Haitzler 724b1aa560 evas - gl - ensure surfaces are 0 when destroyed
easier on debugging when we know that we destroyed them already
2021-09-05 00:35:24 +01:00
Shinwoo Kim e9a73c5b81 evas gl: bind texture with external target for map
Summary:
egl images created using tbm surface for native surface set use
GL_TEXTURE_EXTERNA_OES as texture target, so we should bind to
this target when rendering. Or there is a GL_INVALID_OPERATION
error on glBindTexture in function _orig_shader_array_flush.

Thia patch follows logic of following commit;

7db0e20 evas/gl: Bind texture with external target for tbm surface

Reviewers: Hermet, raster, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12286
2021-07-28 14:48:46 +09:00
Carsten Haitzler 24a17ee963 evas - tga - remove errant printf 2021-07-05 16:01:37 +01:00
Carsten Haitzler 74da29321c ecore evas - fix leake and possile seg i added in cnp paste fix
previous commit fixed a bug but added this possible one. this fixes
that.
2021-06-26 22:47:31 +01:00
Carsten Haitzler b8be127171 ecore evas - cnp - look for exact mime matches before conversions
fixes chrome -> efl copy and paste.

@fix
2021-06-26 21:40:10 +01:00
junsu choi fe60e94007 evas_vg_load_svg: Fix color parsing
Summary:
Remove unnecessary point movement in rgb(255, 255, 255) case in svg parsing.
In svg parsing, move the pointer by 'rgb(' before calling
_color_parser() in the rgb(255, 255, 255) case.
In function, string pointer moved unnecessary, so parsing is incorrect.
Therefore, remove unnecessary point movement.

Test Plan:
svg sample code
```
<svg xmlns:svg="http://www.w3.org/2000/svg" viewBox="0 0 300 300">
  <path d="M 0 0 h 200 v 200 z" style="fill:rgb(255, 155, 55);"/>
</svg>
```

before
{F4504779}

after
{F4504778}

Reviewers: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12284
2021-06-18 10:24:58 +01:00
Taehyub Kim 25aced168a gif loader: show the current frame image if getting row is failed
Summary:
Change-Id: I17c79f89550e9a758a532babd55826b3c7ad2810

To show gif animation smoothly, we keep the current frame even if getting line is failed.
Currently,  the frame image will be freed if getting gif line is failed and this makes the frame drop.

Reviewers: Hermet, kimcinoo, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12277
2021-05-24 19:48:22 +09:00
Alastair Poole 01f4e44fde egl: silence warning of deprecated feature test. 2021-05-18 16:34:44 +01:00
Carsten Haitzler 0509fbe16d evas gl - dont swap with damages if we are debugging partial 2021-05-03 20:43:56 +01:00
Carsten Haitzler 84e907ef7d evas - image loader - tiff - switch types to avoid deprecated warnings 2021-05-03 18:01:29 +01:00
Carsten Haitzler a3510d5085 evas - saver - tiff - change types to remove deprecated warnings 2021-05-03 17:02:33 +01:00
Jérémy Zurcher 0018f2093f fix modules/ecore_evas/engines/wayland compilation
broken after introduction of EMODAPI by a33138
Differential Revision: https://phab.enlightenment.org/D1222
2021-04-18 08:21:23 +02:00
Felipe Magno de Almeida a331384eed modules: Rename EAPI macro to MODAPI for modules
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Reviewers: vtorri, jptiz, woohyun, lucas, SPAM-smith78899

Reviewed By: vtorri, SPAM-smith78899

Subscribers: SPAM-smith78899, raster, SPAM-cabanacatalogs, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12228
2021-04-17 16:07:56 -03:00
Carsten Haitzler 4263c08760 evas gl - drm - native bind - handle null eglimage create on bind
this can happen if dmabuf is invalid (already destroyed) so handle
this so evas knows and falls back to rendering a rect and complains to
stderr so we know

@fix
2021-04-16 03:15:31 +00:00
Vincent Torri 77a3b908ed improve heif loader: * efl coding style * faster head callback * faster copy of image data
Summary: and minor fix of some values in avif loader

Test Plan: entice still can read heif

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12257
2021-04-09 21:09:05 +01:00
Carsten Haitzler e65ff7e1e6 evas - gl - optimize dither shader - use integer vecs and go to 2x2
a 2x2 matrix visually here is about as good as 4x4. at least in what i
see, but on low end gpu's it can halve the cost. in fact i was watching the
gpu on my old i5-4200u drop down to 340-410mhz (no dithering is 320-360mhz).
i got to 630-660mhz with the original 4x4 code.

the 4x4 is still there ifdefed out. perhaps i can bring it back with a
high-quality dither option, but 2x3 i think is good enough.
2021-04-04 03:41:40 +01:00
Carsten Haitzler bbf293240f evas gl - add env var to disable dither because some gl's are broken
this adds a

EVAS_GL_RENDER_DISABLE_DITHER=1

env var (set it to anything) to disable dithered rendering.p this is
an added cost, but normally not much at all, but it seems some gl
implementations are broken, and they can't generate correct code for
the dither shader, so this disables this if this env var above is set
2021-04-02 23:28:38 +01:00
Vincent Torri 769066f606 Evas avif loader: fix segfault when the avif loader tries to load a non avif image
Test Plan: entice is not crashing

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12254
2021-03-31 10:29:50 +01:00
Vincent Torri e52391c585 Avif image loader: add another check to verify that libavif has been built with an AV1 decoder
Summary: libavif can be built without a AV1 decoder. Check this in the image loader

Test Plan: entice

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12252
2021-03-28 21:56:55 +01:00
Carsten Haitzler db081f9648 ecore evas ews - deprecate/remove
it's broken. it doesnt render anything. input is broken. it isn't in
use so it doesnt justify fixing. no one has complained it's brokne
thus proof of it not in use, so proof that it's not needed, so do the
right thing and nuke it to save work

@feat
2021-03-28 13:56:33 +01:00
Carsten Haitzler cf6b3667c3 evas - gl add export for getting dmabuf formats and modifiers
we need this to do formats and modifiers properly... and this is what
broke on the rpi4 - it started using  interesting formats etc. ... new
feature to support a bug fix in e

@feat
2021-03-26 20:31:27 +00:00
Carsten Haitzler 80140f7724 evas - gl - respect yinvert now as it ... seems to work. 2021-03-26 20:31:06 +00:00
Carsten Haitzler 796e345da1 evas - gl - stop leaking images and never freeing them from cache
the subject says it all

@fix
2021-03-20 21:58:25 +00:00
Carsten Haitzler aa7be1a96d evas gl - remove freed gl image from context image list
fix asan memory mis-access

@fix
2021-03-09 16:04:45 +00:00
Christopher Michael f174e739e1 ecore-evas-wayland: Remove wayland wobbly windows junk
Never worked properly, is unsupported by upstream wayland, and is just
general clutter so let's remove it.
2021-03-01 10:33:31 -05:00
Shinwoo Kim f8a98e5bf2 gl: remove memory leak of orient_set
Summary:
The tex->pt->references is descreased by
evas_gl_common_texture_free -> pt_unref

if tex->references is 0

And tex->pt->texture is removed by
evas_gl_common_texture_free -> pt_unref -> glDeleteTextures

if tex->pt->references is 0

The evas_gl_common_texture_free decreases tex->references only
if tex->references is bigger than 0. There is no chance to decrease
tex->pt->references at this point.

So if orient_set increases both references of tex and tex->pt, then
the tex->pt->reference is not decreased till tex->references is 0.

So do not increase tex->pt->references in eng_orient_set.

Reviewers: raster, cedric, Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12243
2021-02-13 11:51:16 +00:00
thierry1970 97f95e7362 Added the heif loader
Summary: that supports images : *.heif, *hiec and *.avif I have disabled *.avif images, there is already a loader.

Reviewers: stefan_schmidt, raster

Subscribers: raster, vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12135
2021-02-06 18:58:04 +00:00
Carsten Haitzler f323664bc7 evas - gl engine - look for extension in the right extension string set
this fixes slow operation on what seems to be a minority of instances
that dont advertise the extension in both egl and gl strings

@fix
2021-02-06 14:38:55 +00:00
Carsten Haitzler 9890c2b135 evas - tga loader - ignore origin as it leads to valid tga's not loading
@fix
2021-02-01 18:06:43 +00:00
Carsten Haitzler 0d9cc0a562 evas - let's not set dynamic img hints if extns not there 2021-01-14 19:48:18 +00:00