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