summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-07-30 11:45:17 -0400
committerChris Michael <cp.michael@samsung.com>2015-07-30 11:45:17 -0400
commitcf3434a9276546f1b271e42177ada1bb0178a88e (patch)
tree4ca15d658efce7a2c744440160000db6a42ec7b4
parent157ad667b491071a92d1480256b79f859c045783 (diff)
wayland-shm: Remove curr_buff from Shm_Surface
Summary: We already have *current, but we're not using it properly. Let's throw out curr_buff and just use *current. This temporarily makes swapmode_get do full renders, this will be fixed in a future commit that adds proper buffer ages. Reviewers: zmike, devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2890
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.h1
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c9
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c3
3 files changed, 5 insertions, 8 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h
index a702155749..94779e9936 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -79,7 +79,6 @@ struct _Shm_Surface
79 int w, h; 79 int w, h;
80 int dx, dy; 80 int dx, dy;
81 int num_buff; 81 int num_buff;
82 int curr_buff;
83 82
84 Shm_Leaf leaf[MAX_BUFFERS]; 83 Shm_Leaf leaf[MAX_BUFFERS];
85 Shm_Leaf *current; 84 Shm_Leaf *current;
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index 6fac50ec2f..68bf028d91 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -251,15 +251,12 @@ _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects EINA_UNUSED, Evas_Render_Mode
251Render_Engine_Swap_Mode 251Render_Engine_Swap_Mode
252_evas_outbuf_swapmode_get(Outbuf *ob) 252_evas_outbuf_swapmode_get(Outbuf *ob)
253{ 253{
254 int i = 0, n = 0, count = 0, ret = 0; 254 int count = 0, ret = 0;
255 255
256 LOGFN(__FILE__, __LINE__, __FUNCTION__); 256 LOGFN(__FILE__, __LINE__, __FUNCTION__);
257 257
258 for (; i < ob->surface->num_buff; i++) 258 /* This was broken, for now we just do full redraws */
259 { 259 return MODE_FULL;
260 n = (ob->surface->num_buff + ob->surface->curr_buff - (i)) % ob->surface->num_buff;
261 if (ob->surface->leaf[n].busy) count++;
262 }
263 260
264 if (count == ob->surface->num_buff) ret = MODE_FULL; 261 if (count == ob->surface->num_buff) ret = MODE_FULL;
265 else if (count == 0) ret = MODE_COPY; 262 else if (count == 0) ret = MODE_COPY;
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index ee01f12d01..90df6933bb 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -453,7 +453,7 @@ _evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int
453 453
454 LOGFN(__FILE__, __LINE__, __FUNCTION__); 454 LOGFN(__FILE__, __LINE__, __FUNCTION__);
455 455
456 leaf = &surface->leaf[surface->curr_buff]; 456 leaf = surface->current;
457 if (!leaf) return; 457 if (!leaf) return;
458 458
459 if (!surface->surface) return; 459 if (!surface->surface) return;
@@ -478,4 +478,5 @@ _evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int
478 wl_surface_commit(surface->surface); 478 wl_surface_commit(surface->surface);
479 479
480 leaf->busy = 1; 480 leaf->busy = 1;
481 surface->current = NULL;
481} 482}