wl2_surface_dmabuf: improve surface flush
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 30 Jan 2018 22:29:32 +0000 (16:29 -0600)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 3 Apr 2018 14:23:50 +0000 (23:23 +0900)
commit66089ef91d0b9800075cd208ac13c4f68ed278b3
treefc73b6251958d28c3dd47a8ab0b037dee5352469
parent56f4ed62ac00cbeb0058bab2065bf8196e547a55
wl2_surface_dmabuf: improve surface flush

We used to abandon all buffers even if they were locked. This can't
actually free them until they're all released by the compositor.

Instead just free any buffer the compositor doesn't have locked, so we can
still re-use them when they're released without needing a full redraw.

There's probably room for additional cleverness here.  If we get a new
frame event before the buffer release we may want to keep it, and if we
get the release first we may want to abandon it.
src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c