egl/android: Use per surface out fence
authorZhongmin Wu <zhongmin.wu@intel.com>
Fri, 15 Sep 2017 17:32:43 +0000 (18:32 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 19 Sep 2017 11:12:29 +0000 (12:12 +0100)
commit7343d271367d9a15063ea8093108f829eb593c8d
tree5058e7f31d87bc0c9e31a11ee9ba0968f175ba12
parente013ce8d0d91f6558af50f285e6a96ab697ec90c
egl/android: Use per surface out fence

Use the plumbing introduced with previous patch to interact with the
Android framework.

Namely: currently we use an invalid fd of -1 for our calls to
ANativeWindow::{queue,cancel}Buffer.

At the same time applications (like flatland) may rely on it being
a valid one. Thus as they attempt to query the timestamp of the fence,
they get unexpected results/behaviour.

In the case of flatland - the benchmark hang inside getSignalTime().

Make use of the out fence and pass the correct fd to Android.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655
Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: split from larger patch]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/platform_android.c