summaryrefslogtreecommitdiff
path: root/EGL/yagl_render.c
diff options
context:
space:
mode:
authorVasiliy Ulyanov <v.ulyanov@samsung.com>2016-03-15 11:56:29 +0300
committerVasiliy Ulyanov <v.ulyanov@samsung.com>2016-03-16 12:58:13 +0300
commitb8e8e9c98eb6e4925fb8841777f19ef60188aa20 (patch)
tree64cfd593c0e4eb382c87d1d077c8a95cc458b08a /EGL/yagl_render.c
parent246a7db9c03797276b650b955139210c04f80e84 (diff)
downloademulator-yagl-b8e8e9c98eb6e4925fb8841777f19ef60188aa20.tar.gz
emulator-yagl-b8e8e9c98eb6e4925fb8841777f19ef60188aa20.tar.bz2
emulator-yagl-b8e8e9c98eb6e4925fb8841777f19ef60188aa20.zip
This reverts commit 246a7db9c03797276b650b955139210c04f80e84. The race condition was occuring because of improper glFinish call handling with surfaceless context. The commit also adds explicit transport flushing to ensure all the rendering commands are offloaded to the host in this case. Change-Id: Ic70d7f82904c1636acc495fb2e500115f62c6125 Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Diffstat (limited to 'EGL/yagl_render.c')
-rw-r--r--EGL/yagl_render.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/EGL/yagl_render.c b/EGL/yagl_render.c
index eab10a1..0bcf932 100644
--- a/EGL/yagl_render.c
+++ b/EGL/yagl_render.c
@@ -35,6 +35,8 @@
#include "yagl_egl_state.h"
#include "yagl_surface.h"
#include "yagl_context.h"
+#include "yagl_transport.h"
+#include "yagl_state.h"
void yagl_render_invalidate(int throttle)
{
@@ -63,5 +65,12 @@ void yagl_render_finish()
if (draw_sfc) {
draw_sfc->wait_gl(draw_sfc);
+ } else {
+ /*
+ * GL_OES_surfaceless_context: if current context has no draw_sfc
+ * we still need to ensure all the offscreen rendering is completed.
+ * Transport flush should be sufficient in this case.
+ */
+ yagl_transport_flush(yagl_get_transport(), NULL);
}
}