Merge "When disconnecting a surface, cancel don't queue the buffer" into jb-mr2-dev

This commit is contained in:
Jesse Hall 2013-03-07 23:43:56 +00:00 committed by Android (Google) Code Review
commit 49385ec7c3
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}