Commit Graph

1980 Commits

Author SHA1 Message Date
Carsten Haitzler 9f535a3f3c emotion - fix empty video data frame update when using vdpau accel
fixes a segfault when using vdpau+gst and where the first frame seems to
be empty/zero.

@fix
2017-03-02 15:31:07 +09:00
Jean-Philippe Andre 02bff22d8f evas: Reset state to GL_TEXTURE_2D
This should fix an ERR message under gl_drm and probably an
actual bug.

This reverts 8f2cfdf490.

I don't think the texture target should be part of the context
information. It should instead be a property of the texture.

Fixes T5171
2017-02-28 13:07:13 +09:00
Cedric BAIL 5420ebaf32 emile: rename emile_image_register to emile_image_callback_set.
This fix ABI report according to discussion on the mailing list.
2017-02-27 15:05:35 -08:00
Carsten Haitzler 473d431241 evas gl common - fix nv12 text upload with upack row length
we segv'd because our testure width was wrong... i was row span
length in bytes and we use luminance+alpha texture... this fixes it.

@fix
2017-02-26 11:44:38 +09:00
Godly T.Alias 48627996d7 efl: fix memory leak in edje and evas.
Summary:
Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>
Signed-off-by: Ayush Srivastava <ayush.sriv@samsung.com>

Test Plan: EFL apps

Reviewers: cedric, raster

Subscribers: rajeshps, ayush.sriv, jpeg, prince.dubey

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-15 16:29:07 -08:00
Jean-Philippe Andre 45d846814f evas gl: Fix memory tracking
See b16c961680 which by "fixing" indentation changed the
logic of the code. Yes the indentation was misleading (because of
the #if / #else) but the logic was correct. Anyway this is was not
a harmful issue as those memory trackers aren't really used.
2017-02-14 10:56:15 +09:00
Chris Michael b16c961680 evas-gl-common: Fix misleading indentation
gcc reports that the 'else' here does not guard the latter
statement...seems like a cause of some missing parens so fix.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-13 10:34:13 -05:00
Jean-Philippe Andre 0a2d8d834a evas gl: Partially fix MSAA for GLES 3 drivers
MSAA (multisampled_render_to_texture) support was implemented with
GLES 2 in mind, but for GLES 3 it comes as a core feature, not as
an extension. Also it relies on renderbuffers, not textures. GL
is awesome.

Note: MSAA still doesn't work!
2017-02-13 20:11:22 +09:00
Minkyoung Kim c2e1eb7c54 EvasGL: For depth&stencil&msaa, use renderbuffer instead of texture
Summary:
glFramebufferTexture2DMultisampleEXT() supports color attachment only.
so depth&stencil attachment should be bound via renderbuffer not texture.

According to http://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture.txt
In order to allow the use of multisampled depth and stencil buffers
when performing multisampled rendering to a texture, the extension
also adds the command RenderbufferStorageMultisampleEXT.
target, textarget, texture, and level correspond to the same
parameters for FramebufferTexture2D and have the same restrictions.
attachment must be COLOR_ATTACHMENT0.

Test Plan: Evas GL on GLES 3

Reviewers: jpeg, raster, dkdk, wonsik

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D4648
2017-02-13 19:54:29 +09:00
Jaeun Choi 95d83e8040 evas: fix bugs in gif image loader
gif's logical screen size (which is considered the image size)
might be different from the size of each frame.
when decoding a frame, the width and height of the decoded data should be
based on the size of the frame, not on the size of the logical screen size.
if a frame is decoded into a buffer of screen size, this might happen

(frame = 6 X 3, logical screen = 5 X 3)
OOOXXX      OOOXX
OOOXXX  =>  XOOOX
OOOXXX      XXOOO

@fix
2017-02-13 14:28:43 +09:00
Carsten Haitzler 243e8a678b evas gl common - make render op explicitly signed as we set it to -1
this just is cleaner and now also matches types for render_op in gl
common context.
2017-02-12 15:48:51 +09:00
Carsten Haitzler ff05e39904 evas wayland egl engine - fix warning about struct wl_resource not used
this struct is not actually used other than in this func ptr decl and
it's warning-land for gcc, so .. make it void * and do things like
pretty much all other gl extn func ptrs... be very generic
2017-02-12 00:29:50 +09:00
Carsten Haitzler 6b59dbfdb4 evas gl drm engine - fix warning about struct wl_resource not used
this struct is not actually used other than in this func ptr decl and
it's warning-land for gcc, so .. make it void * and do things like
pretty much all other gl extn func ptrs... be very generic
2017-02-12 00:29:50 +09:00
Carsten Haitzler 0356b1eb5e vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are
technically not needed. also remove any other tmp strings
and use the vpath string resolving feature to avoid
printfs/strjoins/cats etc. etc. as well.

also remember to remove old name string from evas shm code - it worked
for me. i guess i was lucky and it happened to be NULL thus free was
fine.
2017-02-10 19:27:15 +09:00
Derek Foreman 2800038ee2 Revert "vpath usage - simplify to bare minimum to make gustavo happy"
This reverts commit 2037474dc0.

This causes the wayland_shm engine to seg fault immediately at
startup when attempting to create shm buffers.

Please make sure when committing changes to the wayland_shm engine to
test on intel, exynos, and at least one platform without dmabuf
capabilities - or using the EVAS_WAYLAND_SHM_DISABLE_DMABUF env var
to disable dmabuf on intel or exynos.

Anyone without the time or hardware to fully test changes to wayland_shm
can submit a patch to phabricator and assign it to me so I can fully
test it before landing.
2017-02-09 09:17:38 -06:00
Carsten Haitzler 2037474dc0 vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are
technically not needed. also remove any other tmp strings and use the
vpath string resolving feature to avoid printfs/strjoins/cats etc.
etc. as well.
2017-02-09 22:06:16 +09:00
Carsten Haitzler 5c431b14de evas fb dev env var - allow in setuid processes with sanitizing
this allows only /dev/fb[0-0] or /dev/fb/something where somthing does
not begin with a . - thus no way to break out of the fb subdir... so
it should be ok... this keeps setuid safety and allows this env var to
work now as intended in this situation.
2017-02-09 18:38:28 +09:00
Carsten Haitzler 9eee1f80fc evas wayland shm engine - use vpath for getting xdg runtime dir
this should make the wayland shm engine safe to use from setuid
processes. it shouldnt depend on getenv of specific file paths if
setuid. vpatrh takes care of this in one central place
2017-02-09 18:38:28 +09:00
Jean-Philippe Andre 2a239c211c evas: Fix invalid current state (invalid bool value)
newframe() resets some of the gl context properties, so match them
to our shadow copy in the gc state.

target_surface_set() also resets some of those properties but only
in our shadow copy, not in the actual GL context. As a consequence
we can't rely on setting a bool to 0 or 1 unless we also call the
equivalent GL function. Expand bitfields to 2 bits allows us to
set a bool to the invalid value of -1 (yes, that's not a real bool).

Also there is no need to reset the target surface to NULL during
newframe. It will be reset during target_surface_set.

This fixes some issues I encounter while working on GL filters.
2017-02-09 11:39:20 +09:00
Carsten Haitzler 8f2cfdf490 when resetting tex_target, set it to -1 so we force a reset 2017-02-08 22:59:37 +09:00
Carsten Haitzler 876c407977 evas gl commonnon - context - expand fields to 2 bits for invalid vals
we use invalid values (-1 or 0xff or 0x3 etc. invalid vals to know to reset
some state). expand fields out in size a little bit to allow that to
work again.
2017-02-08 22:57:28 +09:00
Carsten Haitzler 09e1a75f4f evas gl generic - remove dead code else case
plane limits are checked at top of function so no need to check in the
middle again. it's dead code. fixes CID 1362729
2017-02-08 21:19:39 +09:00
Carsten Haitzler 98aac6118d evas gl generic - comment switch fallthrough as intended
this is intended. document as such.
2017-02-08 21:19:39 +09:00
Carsten Haitzler 1d60f42e63 evas gl common - reduce data structure sizes got gl common context
this reduced pipes to 32 as default max pipes is 32 and we never
actually go  up beyond 32 unless oyu use env vars to expand... and no
one will... and actual testing shows us top out at about 30 pipes
usage in anything i can find/test. this packs more bool flags together
as bits instead of itns or chars to save memory.

@optimize
2017-02-01 16:08:04 +09:00
Carsten Haitzler 8467d65b23 evas gl common - have a gl array buffer pool to avoid hitting malloc
this improves performance a bit by avoding libc's malloc and the heap
by using a custom buffer pool thathas basically immediate O(1) lookup
time (in real life) that baloons out and contracts back as time goes on.

@optimize
2017-01-31 23:01:50 +09:00
Chris Michael 20cbc92639 ecore-evas: Remove unused 'just_mapped' flag
As this flag is not being used anywhere for anything, remove it.
Useless to have it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-30 11:50:05 -05:00
Chris Michael 6c9dc2a5ba evas-wayland-shm: Compare hidden flag during reconfigure
Small patch to compare if the hidden flag being passed in is the same
as the one stored in Outbuf. With the addition of xdg_shell v6
support, we cannot commit a surface with an existing buffer until the
surface has been configured. In order to facilitate this, we will use
the 'hidden' flag so that any surface_post does not actually attach a
buffer unless configure has already been handled on the surface.

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:33 -05:00
Chris Michael d1216ba7dd evas-wayland-shm: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:16 -05:00
Derek Foreman 24b277a040 dmabuf: Make failure a DBG instead of an ERR
It's not really an error - fallback to shm will be attempted.
2017-01-09 08:30:25 -06:00
Chris Michael f026055630 evas-gl-common: Fix incorrect expression
Coverity reports this as in incorrect expression because it was
checking cache_entry width <= 0 twice. Fairly safe to assume that the
proper check should be width || height.

Fix CID1368336

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-08 19:48:26 -05:00
Chris Michael 6cf290faec evas-wayland-shm: Fix formatting
NB: No functional changes, just reformatting so that this insane
one-liner wraps to 80...

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-06 09:33:58 -05:00
Carsten Haitzler bb6c324e73 evas gl - avoid a possible crash of tex upload of invalid sized image
so i had a crash where my bt said the image size is 1x1 but the img
struct said its 0x0, so put in protection to not upload a texture from
a 0x0 image... just for now... because this is odd - the image data is
a real ptr i can access and there should be at least 1 pixel... but i
can't be sure this fixes it as this is one of those "one offs" i cant
reproduce...

@fix
2017-01-06 17:46:13 +09:00
Derek Foreman 44517fca5c wayland_shm: Yeah I dunno
This doesn't make any sense to me so it can't be right, right?

Fixes session recovery.  If it breaks something else talk to devilhorns. :)
2017-01-05 13:40:31 -06:00
Derek Foreman 4c1227433f wayland_shm: Add a way to update the stored wayland objects
On session recovery the engine needs to be given new copies of the
surface, dmabuf, and shm objects to run in the new connection.

This fixes session recovery breakage introduced when we stopped recreating
the outbuf on reconfigure.
2017-01-05 13:40:31 -06:00
Derek Foreman 7b0f937880 wayland_shm: Add a force flag to surface reconfigure
We're going to need a way to force reconfigure unconditionally to make
session recovery work again.
2017-01-05 13:40:31 -06:00
Derek Foreman 780293ac93 wayland_shm: Shut up coverity
Quite cosmetic, but I suppose this is better than flagging as false
positive.

CID1368209
2017-01-04 08:54:03 -06:00
Chris Michael 80f5860c68 evas-gl-generic: Mark 'data' parameter as unused
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 08:12:21 -05:00
Carsten Haitzler b68280bd85 wayland egl - unbork after manmower broke rendering removing swapinterval
so removing eglSwapInterval() is a very poor idea as then... who knwos
what it is? this broke at least nouveau (under weston AND under
enlightenment). a very skillful b0rk here than i luckily caught
quickly! :)
2017-01-04 19:21:02 +09:00
Derek Foreman 44c69195d3 wayland_egl: Stop setting swap interval to 0
We have some "vsync" variable cargo culted from somewhere that is never
properly set, so is always 0 because it's in a calloced structure.

It's then used to set eglSwapInterval() to 0 always, which results
in mesa using wl_display_sync() instead of wl_surface_frame() for
its frame ready callback mechanism.

Remove it entirely and use the sensible default swapinterval.
2017-01-03 17:07:54 -06:00
Derek Foreman 06c05f853a evas_shm: Fix dmabuf failure
This keeps us from accidentally going through the fallback path twice and
crashing.  It also clears up some refcounting problems that would have led
to leaked memory in the crash case.

fix T5037
2017-01-03 14:20:18 -06:00
Carsten Haitzler b1aa6360e0 evas generic loader - expand buffers in case of weird install location
so we had just 128 bytes for path to generic loader utility. in most
cases this is plenty but if you have bizarre symlinks and long paths
we may run out of space, so move up to 4k buffers as this is
realistically the max path len anyway on a system.

@fix
2017-01-02 18:53:56 +09:00
Carsten Haitzler 9e01cf2698 evas image async preload - add option to also make header load async
to date if you use async preload we still load the header
synchronously and this can be horrible especially with generic
loaders. there is no way to farm this off to the preload thread. now
there is. youhave to set it as a skip head load option before doing a
file_set AND you need to issue a preload ... but now it's possible.

@feature
2017-01-02 18:53:56 +09:00
Carsten Haitzler b0530aba4f evas cutouts - quickly avoid huge per issues with large nos of cutouts
i found evas_common_draw_context_apply_cutouts() was procsessing 300+
cutouts and as it's O(n^2)/2 to try and merge adjacent rects for
cutouts this really performs like complete junk. we apply cutout rects
a LOT. this is not the best solution, but it's quick and much faster
than doing the clipouts which drop framerate to like 1-2fps or so in the
nasty case i say (tyls -m of photos in a dir with a 2160 high
terminal).

this figures out the target area to limit the count of rects
significantly so O(n^2) is far far better when n is now < 10 most of
the time. and for the few operations where it's a high value this now
uses qsort to speed up merges etc. etc.

@optimize
2017-01-02 18:53:56 +09:00
Minkyoung Kim 40e9da0101 Evas GL:Bind texture to correct one.
Summary:
If user bind textureA and want to use it continuously, do not call glBindTexture(textureA) again.
But expect that textureA will be binding.
So EvasGL sould not change binded texture silently.
Restore texture to previous bound one after allocating new texture.
And when destroy texture, reset texture to 0 if it is current bound texture.

Test Plan: Tizen 3.0

Reviewers: wonsik, dkdk, cedric, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D4524
2017-01-02 15:29:49 +09:00
Daniel Kolesa 18a0183c37 evas: use new property impl syntax 2016-12-27 16:37:41 +01:00
Jean-Philippe Andre 2f1d666a06 evas: PNG save of ARGY88 needs unpremul
PNG saves unpremultiplied values, so we need to do that
for the newly supported ARGY88 colorspace as well. Fixes
the previous commit.
2016-12-22 19:23:01 +09:00
Jean-Philippe Andre 3425ad2abd evas: Implement GRY8/AGRY88 save support for PNG
This enables the PNG saver to save images with gray and
alpha + gray colorspaces. GRY8 is usually used for alpha only.

Note: This commit also introduces whitespace changes. Sorry
about the mess, but at least now we have spaces only. Read the
commit with show -w :)

@feature
2016-12-22 17:43:23 +09:00
Carsten Haitzler 92b2c86ed8 evas gl engine - fix loading of pager backgrounds in e again...
fixes recent commitby jpeg
2016-12-21 17:58:38 +09:00
Jean-Philippe Andre 1d4affadd1 evas: Try to fix compilation with EGLAttrib 2016-12-21 13:56:14 +09:00
Jean-Philippe Andre 2e89702d57 evas: Fix image save with GL engine and orientation
This fixes evas_object_image_save after changing the orientation
of an image in the GL engine. In SW engine the pixel data is rotated
in memory, so things worked fine from the beginning. In GL we may
have to go through loops and hoops in order to rotate and fetch the
data from the GL texture.

This should fix ce45d44.
2016-12-21 13:56:05 +09:00