Commit Graph

2004 Commits

Author SHA1 Message Date
Derek Foreman b5674b7885 wayland_shm: Remove useless function
This serves no purpose anymore.
2017-11-08 15:12:51 -06:00
Derek Foreman 566c3f328a wayland_shm: Remove dmabuf fallback
Now that we're dependent on create_immed there's no possibility of falling
back to non dmabuf allocation.

The only failing case we really need to handle is failing the first
allocation, which is currently broken and I'll be adding an advance test
for it shortly.
2017-11-08 15:12:51 -06:00
Derek Foreman 73bddb4471 wayland_shm: Make EVAS_WAYLAND_SHM_DISABLE_DMABUF use new code
Use the new wl_shm allocation functions making the old wl_shm code
unreachable even with the use of the disable env var.
2017-11-08 15:12:51 -06:00
Derek Foreman c54a12aca6 wayland_shm: Add wl_shm to dmabuf
wl_shm and dmabuf only really need to differ in how they allocate a buffer,
but right now we've got them in separate files.  This dramatically
reduces the complexity of the wl_shm code and shares much more
implementation with the dmabuf code.

This throws away at least one "optimization" wl_shm used - over-allocating
buffers so that window resizing doesn't always require a new buffer
allocation.  If people feel that window resizing has become too slow now
this can be added to the dmabuf code to the benefit of both allocators.

Disabling dmabuf by env var still uses the old wl_shm implementation for
now, but soon that code will be removed entirely and the env var disable
will use this path.
2017-11-08 15:12:47 -06:00
Derek Foreman d346ac7b2e wayland_shm: Track size of buffer 2017-11-08 15:12:44 -06:00
Derek Foreman 381bb0e798 wayland_shm: move buffer release callback to top of file
Code motion with no functional changes.
2017-11-08 15:12:42 -06:00
Derek Foreman ef1279465f wayland_shm: make creating a wayland buffer back end specific
This way we can have shm and dmabuf share the same framework.
2017-11-08 15:12:37 -06:00
Derek Foreman 7e1805ada1 wayland_shm: Factor out wl_buffer creation code 2017-11-08 15:12:34 -06:00
Chris Michael fd79e32dbd evas-wayland-shm: Do not dereference a potentially freed pointer
Coverity reports that _evas_dmabuf_buffer_init function here can
potentially free the surface that was passed into it. If that happens,
we should not be calling the _fallback function with surface as the
parameter as that will directly dereference the freed pointer.

Fixes Coverity CID1381707

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 10:02:35 -05:00
Chris Michael de1e18ef7d evas-gl-cocoa: Remove need for useless region_free function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:28:53 -05:00
Chris Michael 3ae469e648 evas-gl-drm: Remove need for useless region_free function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:27:39 -05:00
Chris Michael 85a9716c8f evas-gl-sdl: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:26:13 -05:00
Chris Michael c8e5614830 evas-gl-x11: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:25:19 -05:00
Chris Michael e04ad61ab4 evas-wayland-egl: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:23:13 -05:00
Chris Michael 39184e78af evas-wayland-shm: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:21:59 -05:00
Chris Michael 31a7963196 evas-software-x11: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:19:20 -05:00
Chris Michael 5edae8b9c1 evas-software-gdi: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:17:02 -05:00
Chris Michael f32c1ece7e evas-software-ddraw: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:15:54 -05:00
Chris Michael 9f5555a887 evas-eglfs: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:14:14 -05:00
Chris Michael 5f897542aa evas-drm: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:13:12 -05:00
Chris Michael 6016ce8133 evas-software-generic: Check for render engine function before calling
In most engines which inherit from software_generic, they do not
implement the outbuf_free_region_for_update function. Most engines
have it as an unused function. If we simply add a check here, then we
can reduce the need for having useless function in multiple engines.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:10:28 -05:00
Chris Michael 0a25543ed5 evas-wayland-shm: Fix formatting
Make this line readable in 80 columns

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-01 12:39:09 -04:00
Chris Michael 945764eb7c evas-drm: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-01 12:38:44 -04:00
Cedric BAIL abd41c93ea evas: image_native_set actually receive a context, not an output. 2017-10-26 13:01:56 -07:00
Jean-Philippe Andre 98622623a0 evas: Prevent crash with image_data_get
If the image has no data, it may get an allocated surface of 1x1 but it
is not sane to return the pointer to that data, as the user would expect
a normally sized image (in my case, 1920x1080).

I do not fully understand what is going on with this image. But at least
this transforms a crash into a simple ERR in ~/.xessions-errors

Two similar crashes happened:
 - SIGSEGV by writing data outside of the image data
 - abort() in free() because the malloc metadata has been overridden
   when writing outside of the image data (newly allocated 1x1).

Fixes T5957

@fix
2017-10-18 22:12:57 +09:00
Cedric Bail 7e00ab4222 evas: mark parameter unused now that it is not necessary anymore. 2017-10-13 12:58:01 -07:00
Prince Kumar Dubey df5f404f09 evas: to avoid warning unused variable and unnecessary assignment is removed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:14:26 -07:00
Derek Foreman 159a5beb27 wayland_dmabuf: Clean up unused variable
Pending is useless now that we use immediate buffer creation.
2017-10-12 12:24:03 -05:00
Derek Foreman b93319b10e wayland_dmabuf: Use create_immed
We've really always needed to do immediate creates.  On a surface resize
there's no place to wait for the round trip for the new buffers to exist.

We've gotten away with this until now by good luck because we dispatch
wayland events during asynchronous render.  However, with async render off
or if schedule happens in an unfortunate order, we can end up with
tearing.
2017-10-12 12:24:03 -05:00
Derek Foreman 7f27237171 wayland_shm: Make some function static
Only used in this file.
2017-10-12 12:24:03 -05:00
Derek Foreman 46146caa43 wayland_shm: Kill stale comment
This comment doesn't make sense now, as all the frame callback stuff
is in ecore_wl2.
2017-10-12 12:24:03 -05:00
Derek Foreman 9bcc24dbb8 wayland_dmabuf: make dlsym queried symbols static
We only need these in this file.
2017-10-12 12:24:03 -05:00
Derek Foreman e207e05067 wayland_shm: Remove hidden from the outbuf
Outbuf shouldn't have to track its hidden status, that should be ecore_evas
problem.  Until now we were doing this because our kludgey wayland
ticking made things difficult, but I think it's safe to remove now.
2017-10-12 12:24:03 -05:00
Derek Foreman 656d892581 wayland_shm: Remove hidden from surface posting calls
Now that we tick based on frame callbacks it should be impossible to post
an update while hidden.
2017-10-12 12:24:03 -05:00
Derek Foreman c72b0b44ad wayland_shm: stop storing wl_display in dmabuf_surface
Query it through the engine info's ecore_wl2_display instead.
2017-10-12 12:24:03 -05:00
Derek Foreman ceb90779ff evas_shm: Remove wl_dmabuf and wl_shm from engine info
All queries for these are now on the ecore_wl2_display
2017-10-12 12:24:03 -05:00
Derek Foreman 4a23e69bcc wayland_shm: Remove surface_set function
Now that we use the display's shm and dmabuf pointers we don't need to
update them.
2017-10-12 12:24:03 -05:00
Derek Foreman 2b9a22e3a9 wayland_dmabuf: Query zwp_linux_dmabuf_v1 from display
Get it from the display instead of using our stored copy.
2017-10-12 12:24:03 -05:00
Derek Foreman f421521bed evas_shm: query wl_shm from ecore_wl2_display
Stop using the internally stored copy, always query from active display.

This fixes session recovery.
2017-10-12 12:24:03 -05:00
Derek Foreman 3f576e8436 wayland_shm: Add Outbuf to Surface struct
We're going to need that soon.
2017-10-12 12:24:03 -05:00
Derek Foreman 5fa7263440 wayland_shm: Pass Surface instead of Shm_Surface
Surface has some variables we'll need later.
2017-10-12 12:24:03 -05:00
Derek Foreman 7faa20f3c8 wayland_shm: Handle dirty bit outside of the backends
We don't have to query that deeply to know whether we need to redraw the
buffer or not, we can make that decision in more generic code.
2017-10-12 12:24:03 -05:00
Derek Foreman 2a15d7b730 wayland_shm: Store the ecore_wl2_display in the Outbuf
We'll need it soon.
2017-10-12 12:24:03 -05:00
Cedric BAIL fc7e244e99 evas: remove unused fonction evas_gl_common_image_load. 2017-10-05 09:36:45 -07:00
Chris Michael 7b7161ea13 evas-gl-image: Fix dereference after null check
Coverity reports passing a null pointer 'im->gc' to
evas_gl_common_context_flush which directly dereferences it, so lets
be sure that 'im->gc' is valid before passing it to context_flush

Fixes CID1374273

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-05 09:54:03 -04:00
Chris Michael cec6793db4 evas-gl-common: Fix dereference after null check
Coverity reports that there may be a null pointer dereference here so
check that 'error' exists before trying to set it.

Fixes CID1374272

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-05 09:51:00 -04:00
Cedric Bail 867d826395 evas: remove image_load from the engine. 2017-10-04 21:48:26 -07:00
Carsten Haitzler 246d8dbda5 evas ector gl - fix leak of image data on data put
@fix

fix coverity found leak CID 1374645
2017-09-29 12:26:57 +09:00
Carsten Haitzler 9f91d0d284 evas ector gl - make coverity happy about leaks on data put
fix CID 1374646
2017-09-29 12:26:57 +09:00
Youngbok Shin 1750410650 evas: Add scale feature for embedded bitmap fonts.
Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

Differential Revision: https://phab.enlightenment.org/D2713
2017-09-26 11:31:31 +09:00