this fixes the png loader code to use png_read_row properly with the
number of passes needed to load aninterlaced image as well as handling
this right with scale ratio scaledown set.
Summary:
plug image object was not cleaned after server disconnection.
specifically, image data was cleaned (NULL), but it was not updated for real on screen
--> set dirty of plug image object
@fix
Test Plan: elementary_test -> open window socket -> open window plug -> close window socket -> plug should be cleaned up
Reviewers: raster, cedric
Reviewed By: raster
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D703
Summary:
Since plug sends message by using deleted server handle (dangling pointer),
I could see glorious error message as below:
*** ECORE ERROR: Ecore Magic Check Failed!!!
*** IN FUNCTION: ecore_con_server_send()
ERR<842>:ecore lib/ecore/ecore.c:729 _ecore_magic_fail() Input handle pointer is NULL!
ERR<842>:ecore lib/ecore/ecore.c:740 _ecore_magic_fail() *** NAUGHTY PROGRAMMER!!!
*** SPANK SPANK SPANK!!!
*** Now go fix your code. Tut tut tut!
Therefore, I initialized server handle on server deletion
@fix
Test Plan: create socket -> create plug -> destroy socket -> mouse move on plug area
Reviewers: raster, cedric
Reviewed By: raster
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D701
and update input & opaque regions after resizing.
@bugfix: We do not need to call ecore_wl_window_damage & commit here.
The damages are already handled in the evas engine for both shm & egl.
Those damages are sent to the compositor Already from the evas engine,
so we don't need to send the same damages twice. This reduces more
useless compositor redraws as we are not constantly sending damages &
calling commit twice for every frame.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Async page flip can cause tearing, is not supported on all cards, and
apparently requires a specific libdrm patchlevel...in general, more
trouble than it's worth, so let's just remove it.
@bugfix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This symbol should be part of the loaded libraries, can be found
using dlsym, even if eglGetProcAddress() returns NULL.
Add etc1 flag in the debug output.
Summary:
extn send ecore event when plug is connected/disconnect
(ECORE_EVAS_EXTN_CLIENT_ADD/ECORE_EVAS_EXTN_CLIENT_ADD)
By the way, the event data is currently "Ecore_Evas_Engine_Buffer_Data" which should be hidden
Moreover, when I make multiple sockets,
I need a event data to distinguish which socket is connected by client.
Therefore, I recommend to use Ecore_Evas as event data.
@fix
Reviewers: raster, Hermet, woohyun, cedric, seoz
Reviewed By: raster
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D690
this fixes a misbehavior with ecore evas object cursors when you set
one, the old one is deleted, but if the old is the same, the new one
you set gets deleted, rather than just updated.
@fix
With OpenGL, the border of a texture are not "well" defined. So interpolation at
the border can result in weird/bad looking texture border. To avoid that we do
duplicate the border in all direction at the time of the texture upload. But with
ETC1 it is not possible as the border are grouped with 15 others pixels. It needs
to be done at saving time. So internally we do have an image that would be of
size width + 2 pixels and height + 2 pixels.
If region is specified we will not allow ETC1 colorspace as it would
basically break at the frontier as we would be unable to generate a
duplicate of the border as GPU require if you want nice and correct
rendering. So no region and ETC1 output at the same time.
The TGV file format is specifically created for Evas. It is designed to allow
region decompression and parallele decompression with a fast path for GPU that
do handle ETC1 compression. Plan for adding other compression method will come
later.
@bugfix: This fixes ecore_evas_drm to function properly when
ecore_evas_fullsreen_set is called. This is needed for running
Elementary apps 'standalone' in drm.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: This adds some safety trapping for trying to create a canvas
below the drm framebuffer size. Drm does not support creating a canvas
smaller than the framebuffer output, so we will add some trapping to
catch that, and internally create the framebuffers to the proper size.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Warning fixed of evas
modules/evas/engines/gl_common/evas_gl_context.c: In function 'evas_gl_common_context_new':
modules/evas/engines/gl_common/evas_gl_context.c:392:32: warning: 'minor' may be used uninitialized in this function [-Wuninitialized]
modules/evas/engines/gl_common/evas_gl_context.c:314:8: note: 'minor' was declared here
modules/evas/engines/gl_common/evas_gl_context.c:392:16: warning: 'major' may be used uninitialized in this function [-Wuninitialized]
modules/evas/engines/gl_common/evas_gl_context.c:313:8: note: 'major' was declared here
@fix
Compilation Warning Fixed
Test Plan: Compile efl
Reviewers: singh.amitesh
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D656
@feature: This adds (preliminary) support for ecore_evas_alpha_set and
ecore_evas_transparent_set
NB: This is just the function placeholders and does not actually
implement transparency yet
Signed-off-by: Chris Michael <cp.michael@samsung.com>
ignore_events settings
@feature: This adds support for: ecore_evas_maximized_set,
ecore_evas_fullscreen_set, ecore_evas_withdrawn_set, and
ecore_evas_ignore_events_set functions to the drm engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: This adds support for ecore_evas_iconified_set in ecore_evas
drm engine.
NB: This does not actually iconify the ecore_evas yet tho
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: This adds support for ecore_evas_layer_set function used to
set the layer of the ecore_evas
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: This adds support for ecore_evas_rotation_set function and
updates the Evas rotation accordingly
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: This adds support for the ecore_evas_move_resize function
and calls the appropriate internal functions for this ecore_evas
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: This adds support for updating the ecore_evas location when
ecore_evas_move is called, and also calling any "move" function of the
ecore_evas.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
callbacks of the ecore_evas
@feature: Add support for setting the callback functions to call when
the ecore_evas gets mouse in or mouse out events
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@fix: ecore_evas_window_get expects an Ecore_Window to be returned.
Because of this, we need to have a 'window' that can be returned via
ecore_evas. For this case, we will use the output's framebuffer id as
the 'window' so we need to set that into the engine info so that
ecore_evas can fetch it.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
register the prop.window for events.
@fix: ecore_evas_window_get expects an Ecore_Window to be returned so
we cannot use a void pointer in ecore_drm_device_window_get.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In evas_gl_common_image_draw, if an image is drawn with a fresh context,
containing no clip and no cutouts, then it will be wrongly clipped to
the source image size instead of the destination surface size.
This case seems to never happen, ever, since the contexts are always
fully set by the render functions.
@fix
evas_gl_common_buffer_dump can be used to dump all frames into
a series of PNG files. But the filename contained some garbage
characters (and potential segv, too).
(cherry picked from commit a0f886138ed5a28d0d1596df3b805fca06d1ae31)
It is not necessary to dynamically link to glReadPixels since
this is not an extension. This code wouldn't even work on some
devices.
Also, the pixels returned are not premultiplied (yeah >_<)
And some devices (EGL) don't support GL_BGRA... so glReadPixels
would just fail and not fill in the pixels. Conversion is required.
If we are given a drm device name, tell ecore_drm to try and find That
device. If it is not found, we fallback to the default drm device.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
from drm.
This assigns a name to the ecore_evas. If no device name was passed
in, we will get the device name from the drm card.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Remove unused function and it's declaration. This function is not
being called from anywhere anymore, so it's no longer needed.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
After we have setup ecore-drm, we need to tell it where to send any
input events, so call the ecore-drm API function to set the window.
Also feed mouse_in to the canvas after creation, so that it gets focus.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: structure fb_var_screeninfo does not have a colorspace field
defined in linux/fb.h, so (for now) comment out code which was
referencing that field. Not sure what the intent was here, but build
was broken because of this.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
GL_READ_FRAMEBUFFER isn't defined when compiling for Wayland
Thanks Stefan for the report.
Also, import GL_FRAMEBUFFER overrides from other GL files, so
that it points to the proper extension (_OES or _EXT if applicable).
While most framebuffes use stride = width, some may have stride bigger
than width to provide better alignment. Then we must always use stride.
Thanks to Arjan van de Ven, the one that spotted the issue.
@fix
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).
Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.
Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.
One line solution: Call evas_gl_common_context_flush before
doing anything else.
FrameBuffer can be tricky with all combinations and it's hard to tell
users to send useful information, then print the information we use so
we can get useful bug reports.
clean evas_fb_main.c so it returns -1 to indicate invalid fds, same as
open() and what is written in evas_fb.h example.
call fb_cleanup() in all error conditions and always return -1 in
fb_postinit() if we did call fb_cleanup().
@bugfix: Removed hardware acceleration fields from engine structure.
These are now located inside the buffer management code itself, so no
need for them here.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: This fixes Coverity CID 1188012
Coverity reported resource leak from eina_str_split_full return which
was only being freed if the number was > 0. This is incorrect as
eina_str_split_full will still allocate the array and thus it should
be freed.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: Set cached image alpha flag properly
This fixes issue where cached image alpha flag was not set properly.
Set it according to the outbuf's destination alpha flag.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: Check (and set) buffer validity before calling
framebuffer_send. This fixes an issue where buffer was not valid,
causing next_update_get to do full Copies.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: We cannot call framebuffer_set from within the send function
because if we are not vsync'd then framebuffer_set would never be
called and thus the buffer would not be marked as valid, causing full
Copies to happen.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Sometimes it is useful to query screen geometry (more often size) to
do some metrics as finding the proper theme in my case. As this call
works for X11 and others, let's make it work for framebuffer as well.
@bugfix: Draw to the front buffer first, instead of the back buffer.
Frenchie says this improves the "initial rendering delay" of expedite
tests. Originally, we were drawing to the back buffer first, then
flipping it onto the crtc when drawing was done. This presented a
"perceived" rendering delay when running expedite tests as it would
wait for the back buffer to be drawn before presenting it. Personally,
I think it is not good to draw directly to the front buffer first as
it may get presented "incomplete" ... but cedric says it draws fine so
we'll leave it starting on the front buffer (for now).
Signed-off-by: Chris Michael <devilhorns@comcast.net>
@feature: Add support for EVAS_DRM_VSYNC environment variable to
@feature: Add support for marking a Framebuffer as dirty.
@bugfix: Fix color mask values for evas conversion functions.
@bugfix: Start with using the Backbuffer for drawing.
@bugfix: Fix previous Slowness with evas_cache image data.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: Add ability to render software buffers using vsync or not
@bugfix: Fix drmModeAddFB to use proper depth & bpp when adding FB
@bugfix: Fix mmap to use NULL (not 0) so that kernel assigns memory
address.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@bugfix: this cleans up the Outbuf structure by removing unused
fields, Fixing some function declarations, and defaulting the number
of buffers to 2 (double-buffering)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: Start on hardware Plane support
- Add Plane structure
- Store list of Planes in the Output buffer
Signed-off-by: Chris Michael <cp.michael@samsung.com>
- Typically this will come from ecore_evas and be used by evas to
allocate hardware accelerated buffers (gbm, tbm, etc)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
@feature: Add code to check if async page flipping is supported by the driver.
@bugfix: Add code to get the proper drm driver name when we init the card.
@bugfix: Use drmOpen when opening the card so that any sub-driver gets initialized.
@bugfix: Add some debug/testing code to enumerate planes.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
updated sooner.
@bugfix: set framebuffer on crtc earlier in process
@bugfix: Set the rendered image's alpha flag to be equal to the output buffer's
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
The window auxiliary hint is the value which is used to decide
which actions should be made available to the user by the WM. If you
want to set specific hint to your window, then you should check whether
it exists in the supported auxiliary hints that are registered in the
root window by the window manager.
Once you've added an auxiliary hint, you can get a new ID which is used
to change value and delete hint. The window manager sends the response
message to the application on receiving auxiliary hint change event.
A list of auxiliary hint within the Ecore_Evas has this format:
ID:HINT:VALUE,ID:HINT:VALUE,...
Reviewers: raster, cedric, seoz, Hermet
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D543
When rotation is 0, we need to advance the destination pointer in the
X direction by a Multiple of Bits-Per-Pixel...not an addition.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
this should fix T693 and only allow 1 sdl window at any one time iwht
the sdl ecore-evas engine/module. it's simply invalid to use more than
one window with it.
This looks like a typo: if (animated > 1) when animated is a... Bool!
So, I am not entirely sure why this bug is visible in case of gif
proxies, all it seems that the load_data function may be called
multiple times when the object is visible. So gif close and reopen
happen properly, and the first frame can be decoded.
When running in direct rendering mode, properly support partial
rendering if the extension is properly supported.
Also, fixed the SwapBufferwWithDamage rectangle coordinate bug.
It wasn't properly y-inverted before.
even though we don't support rectangle bits in texture targets for
texture-from-pixmap the code checked and complained - problem is it
checked the wrong thing. fixes CID 1135267
Summary: Ensure Evas's eglContext when several eglContexts are used.
Test Plan:
1. Native GLES application works with evas_object_image_native_surface_set
2. One Evas object works with evas map.
Reviewers: seoz, tasn, cedric
Reviewed By: cedric
CC: cedric, raster
Differential Revision: https://phab.enlightenment.org/D534
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Summary: The window manager rotation allows the WM to controls the rotation of application windows. It is designed to support synchronized rotation for the multiple application windows at same time.
Reviewers: raster, seoz, cedric, Hermet
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D529
Summary: This patch is for QUADRUPLE window buffers.
Test Plan:
When enlightenment uses quadruple buffers or window system can support quadruple buffers,
application can use quadruple buffers with partial rendering
Reviewers: tasn, seoz, raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D527
Quick and dirty solution to support the OpenGL engine:
[1] Allocate CPU buffers
[2] Render text and process all effects to these buffers
[3] Push final image as an OpenGL texture.
This patch implements [1].
Summary: Ensure eng_window_use in image_content_hint_set
Test Plan:
1. make native OpenGLES application.
2. set evas object image with evas_object_image_native_surface_set.
3. GLES Application try to call eglMakeCurrent with own eglContext, then resize evas object resize
Reviewers: Hermet, raster, cedric
Reviewed By: cedric
CC: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D523
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
When over-allocating (past "pool->max" items) a memory slice will be
allocated to the new item as a linked list using Eina_Inlist.
The original code was placing the Eina_Inlist structure (3 pointers)
at the beginning of the allocated memory. However the item must have
proper alignment based on "pool->item_size", otherwise a structure may
end with unaligned members. Take for example MIPS 32 bits, it uses 4
bytes pointers with 8 bytes double. A structure containing a double
could have it unaligned as 12 % 8 = 4 (12 is the size of Eina_Inlist,
that contains 3 pointers), and MIPS doesn't allow unaligned access.
Albin Tonnerre (Lutin) spotted this in his Debian MIPS test machine,
it was breaking at eet_data_get_double() that was storing an unaligned
double. This was being called from within edje test suite.
The current code will place the list node after the requested
"pool->item_size", of course guaranteeing the pointer inside the node
is aligned (otherwise a "char" or "short" would break its alignment).
this changes the internal encoding of font glyphs in evas to use 4bit
uncompressed if small, or 4bit rle (run length encoded) if larger.
this caves at least 50% of memory on fonts - and more if bigger. with
large fonts (40-80pixel size) we can save in the region of 80% of
memory used for glyphs. this also happesn to allow speedups in
rendering too.
if alpha4 is possible (desktopgl) then use it for fonts as this should
cut memory in half for them and possibly speed things up due to less
memory bandwidth needed
_ecore_evas_x_gl_window_new() to ensure eglDestroySurface is called
before XDestroyWindow call.
In case of gl engine, eglDestroySurface should be called before
XDestroyWindow.
Special thanks to Changwoo Kim <ce2010.kim@samsung.com> for the idea.
exceptional case.
As ECORE_EVAS_GL_SYNC_DRAW_DONE is an environment variable, that could
have unexpected value like 2 or 3. So set gl_sync_draw_done to 1 only
when the env variable is 1.
structure.
- moved gl_sync_draw_done for a better structure packing.
- changed gl_sync_draw_done type from int to char which is enough.
- added more description to gl_sync_draw_done
There was a corner case which gl_sync_draw_done is set to -1. So send
comp_sync_draw_size_done when the gl_sync_draw_done is not 1. It can be -1 or 0.
This is a manual cherry-pick from tizen.org.
Thanks to original author Jiyoun Park.
commit 4be6c821df4ccd418dbe44f7e6fecbcd7dd66d74
Author: Jiyoun Park <jy0703.park@samsung.com>
Date: Thu Jul 4 18:04:11 2013 +0900
fix lockup issue (N_SE-44214)
because this sync draw done cannot be send
Change-Id: Id05978e925d5b44d6ca9af0a1684bbb255b9ec5b
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
Next step: state handling in the GStreamer backend
Reviewers: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D431
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
At least on the gstreamer1 version in Fedora 19 this include is needed. Glima
reported it as well and I think he also uses Fedora.
modules/emotion/gstreamer1/emotion_gstreamer.c:643:4: error: unknown type name
'GstNavigationCommand'
Even if other distros or gstreamer1 versions do not need this it should be safe
to add it here.
in SOME cases a wm may deny a resize request entirely and keep the
window size the same. it does so with a configurenotify of the SAME
size as before. problem is we never passed this onto the app with a
resize callback of the original size before request to the new size.
this does that now.
cherry-pick me!
This code was disabled and did not work properly. If this should be
re-added it will have to be rewritten anyway and currently it only
clutters the existing code.
Reviewers: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D414
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Being annoyed by different types of eina critical macros - CRI, CRIT,
CRITICAL -, I concluded to unify them to one. Discussed on IRC and
finally, CRI was chosen to meet the consistency with other macros -
ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
Some commits to port emotion to GStreamer 1.0 and implement some missing features,
clean up code a bit and fix some bugs on the way.
This works as good as the 0.10 code for me now with the emotion examples,
just the Samsung hardware specific code is commented out. This should be
ported by someone who has such hardware, and also in a clean way now that
GStreamer since 1.0 has features to handle all this properly.
There's still a lot of potential to clean things up and fix many bugs, and also
to implement zerocopy rendering. But those are for later if there's actual
interest in this at all.
Commits:
- Update configure checks and ecore example to GStreamer 1.0
- Initial port of emotion to GStreamer 1.0
- Samsung specific code commented out, should be ported by someone
with the hardware.
- Return GST_FLOW_FLUSHING when the sink is unlocked
- Remove unused GSignal from the sink
- Use GstVideoInfo to store the format details inside the sink
- Add support for pixel-aspect-ratio
- Store video format information in GstVideoInfo for the different video streams
- Use GstAudioInfo to store the audio format information
- Remove some unused defines
- Header cleanup
- Implement initial support for GstNavigation interface
- Implement setting of audio/video channel
Reviewers: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D387
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
- create permissions as 0700, this should be private to the running user.
- do shm_unlink() on error, prevents resource leaks;
- apply close() on error, prevents resource leaks;
- handle strerror() properly.
- shm name uses process id, object name and ecore's time, should be
cleaner and avoid possible clashes
- ecore_exe do not need to read from slave stdout/err, this removing
the flags allows messages to come visible at terminal.
- fix typo, it's slave not slayer... :-D
- errno: you can't use errno to report error from failed mmap() if
you do another call that sets errno after that, in that case
fprintf(). So have a single print so we can use the errno value of
the proper call.
- although the slave generic player is not that important if it leaks
its single shmfd, let's be pedantic and close it. Manpage says it
is safe to close filedescriptor after mmap() worked.
Git log should be enough for the credit :)
This code was merged into efl upstream by devilhorn's aggressive synchronization between efl upstream and tizen.
But that commit didn't have the author's credit.
However We will never forget the contribution of Gwanglim Lee <gl77.lee@samsung.com>.
when the window alpha mode is changed, the x window is re-created.
but if the window is going on the show state(not visible yet but waiting for visible from xserver) this window never be visible.
so here it make the window visible also if the window is going on the visible state.
parsing problem with opengl_strtok() which would free the previous
token "p", but in some cases it would be a const string. this should
fix CID 1039653
this fixes CID 1039884 which isn't a real problem as the callback del
never dereferences the data pointer - just uses it as a value, but
this is really to ensure that it doesn't come back if the code were to
change.
stable release - cherry-pick me!
the evas gif loader used way too much cpu to decode animated gifs
because in the rewrite that made it correct, it did not store the
current gif file handle and state, thus each frame it would have to
decode all frames before that one before finally decoding the final
one. that means to decode frame 200, it decoded frame 1, 2, 3, 4 etc.
all the way up to 199 THEN decoded 200 on top, so decode cost became
progressively more then further through the animation you were.
this fixes that by storing state and file handle and allowing you to
iterate through.
There's no need to call it on text_input_leave too, otherwise this would
be called twice, the one from text_input_leave possibly being called
after the focus was regain already by a text input, causing the bug
described in T237.
This fixes T237.
In my config, running terminology with the GL engine and under
cserve2, some image could not be loaded. The tex argument
in evas_gl_preload_target_[un]register was NULL, leading to
an immediate crash.
This fixes Phab #T611. Previously, windows which were opaque would
become transparent after being hidden and then shown. We fix that by a
call to ecore_wl_window_alpha_set when the window gets shown. This
patch also brings the wayland_egl hide code more inline with the shm
hide code by testing if the surface does not match the existing one.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Properly fix efl wayland elm window resize problem.
This adds support for min, max, step, aspect, and base size properties
when resizing a canvas under EFL Wayland.
This Also Properly fixes raster's report for EFL Wayland elm windows not
resizing properly. Previously, when resizing an elm window in wayland,
a portion of the window would draw outside the frame.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Before fixing this issue, the cursor of preedit appears the in front of preedit string.
The cursor of preedit string will appear in the proper position.
outside the window).
Be sure that the EEs requested geometry gets updated in our
common_resize function After min/max have been taken into account.
Elm is using ecore_evas_request_geometry_get in it's resize_job code
(Why...I have no clue lol. Does not seem like a good thing to check).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Ecore_wl_window_resize essentially tells the shell to start the resize
process. We should have the evas engine info's resize_edge updated
Before we start that process so that Evas knows where the resize is
occuring from
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This callback must be manually destroyed and removed on
ecore_evas_hide(), because it won't be delivered anymore after the
surface is destroyed. If the callback still exists, the engine will find
it and avoid doing a new redraw until it is finally called.
Maybe the correct thing to do is to keep this callback in the
Ecore_Wl_Window struct, and have some functions to set/unset it, so it
gets destroyed when the window is hidden. Or when the surface is
destroyed.
We must unset it, so the Evas engine knows that it has to do all the
setup to destroy the EGL surfaces associated with it. And in the case of
an ecore_evas_show, recreate everything again.
When an Ecore_Evas is hidden, it will destroy the buffer swapper. When
it's shown again, it will try to attach a new buffer, that can be same
buffer. If that global var is still pointing to the old buffer, it can
match to it again and avoid sending a new buffer. So, just put this sent
buffer var in the buffer swapper, and it will get set to NULL when the
swapper is destroyed and created again.
This should fix an intermitent problem of ecore_evas_show() not always
working after an ecore_evas_hide() on the wayland_shm engine.
Fix phab T392.
Notice that it should reopen T359, as it wasn't really fixed, but a
rotation with resize was being used when a non-resized rotation was
requested. The cause of the "protruding surfaces" is likely the fact
that Elementary is setting the opaque regions manually, instead of
leaving it to Ecore_Evas. This must be fixed either inside Elementary
itself, or adding the "surface extents" (shadow/non-visible surface
parts) info to Ecore_Evas too.
This reduces code duplication for ecore_evas resize routines inside
wayland engines by using a common _ecore_evas_wl_common_resize
function as the resize code for both engines was the same anyway.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
[Problem] When glTextureDelete is called in image_cache_flush(), it sometimes doesn't work.
[Cause] glTextureDelete is called with the wrong eglContext.
[Solution] Call eng_window_use() in image_cache_flush() and image_cache_set() to use the correct eglContext.
Change-Id: Id7ab1aaeb456be6dbc5f09cb2731ace5399a5dce
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
In evas_gl_api_ext_def.h there're calls such as:
_EVASGL_EXT_DRVNAME(EGL_KHR_image_base)
The macro is defined in evas_gl_api_ext.c as:
(strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL)
if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1;
But EGL_KHR_image_base is itself a macro, which is defined
in EGL/eglext.h like this:
Thus, the _EVASGL_EXT_CHECK_SUPPORT macro will unwrap into:
(strstr(glexts, "1") != NULL || strstr(glueexts, "1") != NULL)
instead of intended:
(strstr(glexts, "EGL_KHR_image_base") != NULL ||
strstr(glueexts, "EGL_KHR_image_base") != NULL)
This patch fixes this by applying stringification earlier in
_EVASGL_EXT_DRVNAME
Bugfix reported by jinhyung.jo@samsung.com
These two APIs will save the title and class_name inside
Ecore_Wl_Window, so if they are called before the shell surface is
created, the stored names will be used later when the window is finally
shown (shell surface is created).
This way we are also hiding the shell surface from ecore_evas modules.
This is a configure event info, so put it in the right place. Some
places adding edges info were also removed, which means that they were
redundant.
Tested with <Meta> + middle click resize, and with window border resize,
on all the edges. Apparently, nothing breaks.
It's mostly only used inside ecore_wayland library anyway.
The only bit needed outside of the library is the "seat" pointer, but a
new function was added to retrieve such pointer from Ecore_Wl_Input.
This struct is only used inside ecore_wayland itself, so there's no real
reason to expose it. Apparently, hiding it doesn't break anything,
except for the ecore_imf wayland module, which was easily fixed.
If anyone notices a breakage, please let me know.
Previously, a "maximize" of an efl client would not actually resize to
the provided size as it would account for framespace width & height.
This fixes that so now "maximize" is Actually maximized.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
needed.
NB: Currently, this will only work for fullscreen or maximized states
as other ones like sticky, withdrawn, iconic, etc, etc are not
supported via wayland protocol yet.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
after several days of beating head on desk, i gave up trying to find
the exact cause of some gifs not rendering right as animated gifs due
to the loader. it had something to do with dispose mode handling and
which frame it was applied to. i noticed the structure made it also
hard to fix, so this re-structures the entire thing with cleaner code,
less code AND more comments, with a limited memory cache (512k) for
previous frames per image (to avoid eating up huge memory blobs for
big/long animations - though at the expense of cpu), and with some
notes for future fixes - like fixing the "load 2 copies of the same
animated gif" issue... that's another day.
this does fix https://phab.enlightenment.org/T443 along with many
other things.
At the end of the ecore_wl_init() function, send a sync request to the
server, and add a callback listener to the "done" event. When this event
is received, we are sure that all the registry bind requests done so
far were processed already, and that the registry and globals are
available and can be used.
Now, on the functions that request interfaces or registry, we call
_ecore_wl_init_wait(), which will check if the callback was received
already (that means that all requests inside the init were processed).
If it was not yet, then we wait until receiving that callback, before
returning the requested data.
Simply call the appropriate cache2 functions when possible
and check for usage of cache2 whenever an evas_cache_ function
is called.
This effectively adds cserve2 image (data) load support for the
GL engines. Fonts were already working out-of-the-box.
Let's reuse the logic from scalecache and call cserve2
functions when the scalecache should be used.
So, now, cserve2 server will not scale any image... This is
too computationally intensive for the server's main thread.
This is not optimal but makes a hell of a lot more sense for
the moment. (since cserve2 manages the SHM segments)
Pass around "animated" flag for images that can be animated.
Fallback to local cache if the image is animated.
Implementing support for animated images in cserve2 does
not seem to make a lot of sense considering each frame must
be requested independently in real time,... and to be honest
there doesn't seem to be any valid use case anyway :)
cserve2 can't handle virtual files (mmap-only), by design.
Proper support can be added later on, but for now we might want
to just fallback to the normal cache functions.
Fixes photocam test
Evas GL direct rendering mode didn't properly take into account
the image object's clipping information and clip the region that
it was directly rendering to. Hence there were issues with the
direct rendering region drawing over the objects that are sitting
on top of it.
Also, cleaned up the direct rendering coordinate computation code
and a nasty dependency with image object that should have been
removed a long time ago. Basically the evas-gl engine was directly
accessing the image object data structure for its data when it
really should have just passed along necessary information.
This reverts commit 9bfb730ff5.
wrong! on deiconify this will now FORCE a ACTIVATE request to the wm
(which asks the wm to focus the window/hilight it and make it active.
might switch desktops or whatever). this is wrong. de-icoifying a
windows does NOT mean ALSO activating it!. the log message also doesnt
say what "go back to normal state"... means.... do they expect/INSIST
windows MUSt be focused after de-iconification? that's wrong as it's a
window management FOCUS policy, not something to do in the lib.
Is there a title for the commiter with the longest revert of a revert list?
I screwed this one up. Had other local changes that sneaked in.
Resetting and doing it right now.
This reverts commit ee155b771d.
You can bet on reverting makes people speed up the process in fixing it.
Revert the revert here now that Cedric fixed it in eina.
This reverts commit 875e7cf74d.
This patch brings in constant E crash for me. It seems to be timing
related which somehow leads to a mem corruption. Revert it for now
to allow people using E while Cedric looks into it.
This reverts commit 12d34309c7.
This add finally support for JPEG 2000, but be aware that libopenjpeg
is very badly managed. There is currently only version 1.5.x that does
provide the right files, is usable by a third party and portable. You
can seriously forget any other version.
NB: We will still create all new canvases as alpha by setting it in evas,
however this allows the 'state' of ecore_evas_alpha_set/get to retain
it's original functionality and thus accurately report what a client
application May have set alpha value too.
NB: Fixes Phab Ticket T350
Signed-off-by: Chris Michael <cp.michael@samsung.com>
For EvasGL direct rendering, EvasGL does a make_current to the
surface that evas is holding on to. When EvasGL was shutting down
it was wrongly deleting evas' surface. This issue was temporarily
fixed by Raphael before but the proper fix was added.
Remove calls to ecore_wl_window_update_size inside the alpha &
transparent_do functions (this call not needed here anymore).
NB: This is needed due to recent frame "fixes". Basically, even tho we
set the opaque region correctly on a surface now, if the canvas itself
is not alpha, then we will end up with a black "spacer" around the
window.
NNB: Tested Both engines with terminology (both translucent and not) and also the window state test in elementary.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
There was already a surface created by _evgl_tls_resource_create(). If
we assign a new one here, the wrong one will be destroyed at
_evgl_tls_resource_destroy(), and later the GL window will be destroyed
before the surface, causing invalid access errors.
This fixes https://phab.enlightenment.org/T326