devilhorns pushed a commit to branch master.
commit d112487e845330e1ad3151d4f7be754d24874123
Author: Chris Michael <[email protected]>
Date: Thu Jul 25 09:12:17 2013 +0100
When we destroy the shm_pool, reset the swapper used_size to zero.
Remove FIXME and resize the the shm_pool if it is too small for the
new buffer.
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/evas/engines/wayland_shm/evas_swapper.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapper.c
b/src/modules/evas/engines/wayland_shm/evas_swapper.c
index d8636e4..ba1283c 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapper.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapper.c
@@ -371,6 +371,7 @@ _evas_swapper_shm_pool_free(Wl_Swapper *ws)
wl_shm_pool_destroy(ws->pool);
ws->pool_size = 0;
+ ws->used_size = 0;
}
static Eina_Bool
@@ -393,9 +394,15 @@ _evas_swapper_buffer_new(Wl_Swapper *ws, Wl_Buffer *wb)
/* check pool size to see if we need to realloc the pool */
if (ws->used_size + size > ws->pool_size)
{
- printf("FIXME !!! Pool Size Too Small !!!\n");
- /* FIXME: Here we need to reallocate the pool to a greater size !! */
- return EINA_FALSE;
+ size_t newsize;
+
+ /* calculate new required size */
+ newsize = (ws->pool_size + size);
+
+ /* resize the shm pool */
+ wl_shm_pool_resize(ws->pool, newsize);
+
+ ws->pool_size = newsize;
}
/* check if this buffer needs argb and set format */
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk