* commit '5d721ef6a14dc22c6b44042f83f3a48ad68d05d4': EmuGL: remove broken EGL buffer refcounting
This commit is contained in:
@@ -310,8 +310,6 @@ EGLBoolean egl_window_surface_t::connect()
|
||||
setErrorReturn(EGL_BAD_ALLOC, EGL_FALSE);
|
||||
}
|
||||
|
||||
buffer->common.incRef(&buffer->common);
|
||||
|
||||
// lock the buffer
|
||||
nativeWindow->lockBuffer(nativeWindow, buffer);
|
||||
|
||||
@@ -325,7 +323,6 @@ void egl_window_surface_t::disconnect()
|
||||
{
|
||||
if (buffer) {
|
||||
nativeWindow->queueBuffer(nativeWindow, buffer);
|
||||
buffer->common.decRef(&buffer->common);
|
||||
buffer = 0;
|
||||
}
|
||||
}
|
||||
@@ -340,16 +337,9 @@ EGLBoolean egl_window_surface_t::swapBuffers()
|
||||
|
||||
rcEnc->rcFlushWindowColorBuffer(rcEnc, rcSurface);
|
||||
|
||||
android_native_buffer_t* prevBuf = buffer;
|
||||
//post the back buffer
|
||||
nativeWindow->queueBuffer(nativeWindow, buffer);
|
||||
|
||||
buffer->common.incRef(&buffer->common);
|
||||
|
||||
if (prevBuf) {
|
||||
prevBuf->common.decRef(&prevBuf->common);
|
||||
}
|
||||
|
||||
// dequeue a new buffer
|
||||
if (nativeWindow->dequeueBuffer(nativeWindow, &buffer)) {
|
||||
setErrorReturn(EGL_BAD_ALLOC, EGL_FALSE);
|
||||
|
||||
Reference in New Issue
Block a user