[olv: Use the real name provided by the patch author. Ideally this could be
moved to somewhere higher level so that we would not need to create a pipe
context to flush resources. Plus, it is not clear if flushing resources for
another context is valid.]
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
struct android_surface *asurf = android_surface(nsurf);
struct android_display *adpy = asurf->adpy;
+ struct native_display *ndpy = &adpy->base;
+ struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
+
+ /* flush buffer */
+ pipe->flush_resource(pipe, asurf->buf_res);
+ pipe->flush(pipe, NULL, 0);
+
android_surface_enqueue_buffer(&asurf->base);
asurf->stamp++;