To avoid texture bleeding in the texture atlas,
we adjust texture uv point as much as a half uv point.
Especially, this improves the rendering quality when the image has the border
area.
Unless apply this patch,
You might find the rendering result is different with software backened,
if the image has the borders.
In the software backened,
the border line was clear but the gl wasn't.
because the border line was interpolated so the rendering result was not the one we expected.
@fix
ecore_evas_cursor_object_set
NB: Previously, if we mad calls to ecore_evas_cursor_object_set to update the
mouse cursor hotspot, the mouse cursor would be repositioned at 0,0 on
the canvas due to x & y being set to 0,0. We fix that here by fetching
the current mouse position Regardless if we are changing the object or
not (ie: perhaps we are just updating the hotspot and not the object)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In case of png, grayscale with transparency format (transparency doesn't mean the png has alpha channel)
gl doesn't prepare that format render.
In this case, set it argb8888 to convert the data in the png loader.
@fix
Summary:
This patch introduce various new logic for packing/unpacking of Eina Rectangle in a pool.
It is then used by Evas GL backend texture allocation to improve how efficiently we pack
image in texture atlas. This lead to improved memory usage and reduced power consumption
with usually a more stable higher FPS (as it use less texture to do the same task, their
is less texture switch, so saving memory and speed at the same time).
This patch was developped on Cedric's suggestions to optimize the packing logic using Skyline
algorithm. This patch is based on master and is a new submission for earlier phab link
https://phab.enlightenment.org/D774.
Signed-off-by: Sanjay Nirankari <sanjay.n1@samsung.com>
Signed-off-by: Rajeev Ranjan <rajeev.r@samsung.com>
Signed-off-by: Sreedeep Moulik <sreedeep.m@samsung.com>
Reviewers: cedric, raster
CC: wonsik, jpeg, sreedeep.m, sanjay, govi
Differential Revision: https://phab.enlightenment.org/D1063
Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
NB: Don't recall what the initial point was here, but I don't see one
now lol. No real usage for checking the ecore_wl_init count anymore so
remove the variable as we don't need to do that.
@fix
Signed-off-by: Chris Michael <devilhorns@comcast.net>
ETC2 textures were allocated using the same empty slots pool
as RGBA textures.
ETC1 texture atlasses should still be tested.
An extension string is required to avoid using the bad
fallback in place right now. But there is no such thing yet.
this fixes @draisch's report of blankness, but doesn't fix the
garbage. it's something to do with the always render move in elm gl -
it just doesn't seem to be rendering before evas renders, or if it is,
it's failing to work/produce content.
ecore_evas_convert: Add -e/--encoding option
This uses directly the encoding parameter.
For now, used only by the TGV saver, but there is no other way
to specify between ETC1 and ETC2. And we don't have a mixed ETC1+2
mode (yet).
@feature
We prefer ETC2 textures when ETC2 support has been detected.
According to the spec, glCompressedTexSubImage2D should work
for ETC2.
Try even with ETC1. This may fail at runtime. The fallback path
is very dubious right now but without a proper test case I'm
not sure which approach to take.
We can also imagine cases where the GPU supports TexSubImage for
ETC1 but ETC2 is not supported at all. This will need testing, as
this case is not handled.
@feature
Summary:
For drivers that support IMG_multisampled_render_to_texture,
GL_MAX_SAMPLES_IMG should be used to query max supported samples
Likewise, for drivers that support EXT_multisampled_render_to_texture,
GL_MAX_SAMPLES_EXT should be used to query max supported samples
@fix
Reviewers: seoz, Hermet, raster, cedric
Reviewed By: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D948
This will call the new ETC2 encoding functions.
Note that the quality and performance will be horrible, but at
least alpha should be supported.
Also, there is no way to choose between ETC1 and ETC2 from
the client API side, which, well, sucks. So ETC2 is selected
if and only if the image has alpha (according to its flag).
@feature: Encode images in ETC2 with support for Alpha (if needed).
Summary: re->win pointer was not compared with NULL pointer before re->win was referenced.
Reviewers: Hermet
Reviewed By: Hermet
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D910
Summary: The comparison gc->dc with NULL is not necessary. So the unnecessary conditional expression is removed.
Reviewers: Hermet
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D909
We can't just blindly copy the full string into a 128 byte buffer. Adding
some check here to actually stay below the buffer limit or return.
CID 1193233
In some cases, the image has a format different from RGBA,
so image_data_set will be invalid as the new data is expected to
be RGBA. This happened with ETC2 images.
@bugfix: When creating a temporary file for the buffer's mmaped data,
we need to make sure there is an appending '/' in the name else
mkstemp will fail due to improperly formatted filename.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
buffer file.
@bugfix: When we create the mmap'd file for shm buffer access, try
using the XDG_RUNTIME_DIR first as the place to create the file. If
that does not exist in the environment, Then fallback to using /tmp
directory.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
CID 1210818
It would be a better and more working fix to use Evas_GL_Image, sadly
no time to do it right now and may be to intrusive for an alpha release.
ETC1/2 textures are (for now) allocated one by one for each image,
because we use only glCompressedTexImage (not SubImage). So,
the texture height must fit that of its content.
This commit bypasses the usual pool allocation logic where textures
are rounded up to the next multiple of 16 pixels in height, in
case of ETC1/2.
There is an ifdef HAVE_ETC2_DECODER to disable unimplemented code.
Since these ETC2 decoding function are not implemented yet,
they should be disabled at compile time.
Yes, this means Evas will not be able to load those images in case
of SW engine or GL engine w/o ETC2 support.
@feature
Enable 3D features using --enable-evas-3d=yes when configuring.
APIs are exposed through Evas_3D.h.
Currently, evas-3d is being supported only on gl_x11 engine.
Conflicts:
src/lib/evas/Evas_Eo.h
Gif decoder decodes prior frames sequentially to decode a specific frame.
The last frame of sequential decoding, which is the frame we want to decode,
remains un-decoded until the while loop stops.
The frame count should be incremented after the comparison statement.
Due to some invalid geometry considerations, there was a
1 pixel distortion in images, varying with the lz4 compressed
macro-block size.
Anyhow, I couldn't wrap my head around Cedric's code. So I rewrote
the whole thing instead, fixed it and improved the block size
selection (based on the image size, to optimize lz4 compression).
Since rg_etc1 now outputs proper BGRA data, the shaders should not
swizzle the colors around. Stick to the normal fragment shaders.
Note: This is not tested.
Since the introduction of new colorspaces for GL_X11
(GRY8, AGRY88 and ETC1), stride_get() would return
an invalid value and data_get() would just abort().
Add proper support for these functions.
ETC1 data will NOT be returned from data_get() and
stride_get() will return 0. This is to avoid people from
messing up badly with encoded color spaces.
Since the introduction of color spaces other than RGBA8888 in
the GL engines, there was an issue with border images scaled in
GL. The left and right edges were simply not properly copied.
This would then show artifacts when scaling very thin images
(typically 2px wide).
The default quality is 80 and high quality is horribly slow,
so default to medium quality instead (it's already very slow).
If you really want to shoot yourself in the foot and use high
quality, just set quality > 95 and go make some coffee.
Also, disable dithering, it creates horrible artifacts on real
life pictures (gradients and flat surfaces especially).
LZ4HC has a higher compression ratio than LZ4 but basically the
same decompression speed.
The performance cost during encoding is actually still pretty low
considering how expensive ETC1 compression can be (even at medium
quality).
@fix: As it turns out, we cannot just blindly set the regions here
during resize. Elementary apps will set the opaque region to account
for any edj frames, and having the region_set calls Here was
causing issues....
Signed-off-by: Chris Michael <cp.michael@samsung.com>
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).