From 5f555569e757d280f707e2587b3d154c9d8c872f Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Thu, 7 Mar 2013 15:14:18 -0800 Subject: [PATCH] When disconnecting a surface, cancel don't queue the buffer This isn't really right either, but avoids having an extra buffer that the consumer has to drain which it might not be expecting. To be correct, disconnecting a surface from a context should retain the current buffer and continue using it when reconnected. The buffer should only be canceled when the surface is destroyed. That will wait for a later change. Bug: 8320762 Change-Id: I5efa39c741193ca4f5612ea9de001ccbb683b345 --- opengl/libagl/egl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index bc1cf3636..0ed572717 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -420,9 +420,8 @@ void egl_window_surface_v2_t::disconnect() bits = NULL; unlock(buffer); } - // enqueue the last frame - nativeWindow->queueBuffer(nativeWindow, buffer, -1); if (buffer) { + nativeWindow->cancelBuffer(nativeWindow, buffer, -1); buffer->common.decRef(&buffer->common); buffer = 0; }