forked from enlightenment/efl
wayland_shm: Return buffer age from shm_surface_assign
This makes refactoring the Surface abstraction a little easier.
This commit is contained in:
parent
7c743b6754
commit
f92c2d2330
|
@ -150,7 +150,7 @@ Shm_Surface *_evas_shm_surface_create(struct wl_display *disp, struct wl_shm *sh
|
|||
void _evas_shm_surface_destroy(Shm_Surface *surface);
|
||||
void _evas_shm_surface_reconfigure(Shm_Surface *surface, int dx, int dy, int w, int h, int num_buff, uint32_t flags);
|
||||
void *_evas_shm_surface_data_get(Shm_Surface *surface, int *w, int *h);
|
||||
Eina_Bool _evas_shm_surface_assign(Shm_Surface *surface);
|
||||
int _evas_shm_surface_assign(Shm_Surface *surface);
|
||||
void _evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle *rects, unsigned int count);
|
||||
|
||||
Outbuf *_evas_outbuf_setup(int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, struct wl_shm *shm, struct wl_surface *surface, struct wl_display *disp, int compositor_version);
|
||||
|
|
|
@ -269,9 +269,7 @@ _evas_outbuf_swap_mode_get(Outbuf *ob)
|
|||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
if (!_evas_shm_surface_assign(ob->surface)) return MODE_FULL;
|
||||
|
||||
age = ob->surface->current->age;
|
||||
age = _evas_shm_surface_assign(ob->surface);
|
||||
if (age > ob->surface->num_buff) return MODE_FULL;
|
||||
else if (age == 1) return MODE_COPY;
|
||||
else if (age == 2) return MODE_DOUBLE;
|
||||
|
|
|
@ -468,7 +468,7 @@ _evas_shm_surface_wait(Shm_Surface *surface)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
int
|
||||
_evas_shm_surface_assign(Shm_Surface *surface)
|
||||
{
|
||||
int i;
|
||||
|
@ -487,7 +487,7 @@ _evas_shm_surface_assign(Shm_Surface *surface)
|
|||
surface->leaf[i].age = 0;
|
||||
}
|
||||
}
|
||||
return EINA_FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Increment ages of all valid buffers */
|
||||
|
@ -504,7 +504,7 @@ _evas_shm_surface_assign(Shm_Surface *surface)
|
|||
}
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
return surface->current->age;
|
||||
}
|
||||
|
||||
void *
|
||||
|
|
Loading…
Reference in New Issue