There is no buffer and android_surface_present should be a no-op when
eglSwapBuffers is called twice in a row.
struct android_surface *asurf = android_surface(nsurf);
struct android_display *adpy = asurf->adpy;
- if (!asurf->buf)
- return TRUE;
-
android_surface_enqueue_buffer(&asurf->base);
asurf->stamp++;
if (ctrl->swap_interval || ctrl->natt != NATIVE_ATTACHMENT_BACK_LEFT)
return FALSE;
+ /* this happens when eglSwapBuffers is called more than once in a row */
+ if (!asurf->buf)
+ return TRUE;
+
/* we always render to color_res first when it exists */
if (asurf->color_res) {
copy_resources(&adpy->base, asurf->color_res, asurf->buf_res);