Merge "Update to renamed ANativeWindow methods"

This commit is contained in:
Jesse Hall
2012-06-22 09:59:50 -07:00
committed by Android (Google) Code Review

View File

@@ -263,10 +263,9 @@ egl_window_surface_t::egl_window_surface_t (
EGLBoolean egl_window_surface_t::init()
{
if (nativeWindow->dequeueBuffer(nativeWindow, &buffer) != NO_ERROR) {
if (nativeWindow->dequeueBuffer_DEPRECATED(nativeWindow, &buffer) != NO_ERROR) {
setErrorReturn(EGL_BAD_ALLOC, EGL_FALSE);
}
nativeWindow->lockBuffer(nativeWindow, buffer);
DEFINE_AND_VALIDATE_HOST_CONNECTION(EGL_FALSE);
rcSurface = rcEnc->rcCreateWindowSurface(rcEnc, (uint32_t)config,
@@ -300,7 +299,7 @@ egl_window_surface_t::~egl_window_surface_t() {
rcEnc->rcDestroyWindowSurface(rcEnc, rcSurface);
}
if (buffer) {
nativeWindow->cancelBuffer(nativeWindow, buffer);
nativeWindow->cancelBuffer_DEPRECATED(nativeWindow, buffer);
}
nativeWindow->common.decRef(&nativeWindow->common);
}
@@ -316,12 +315,11 @@ EGLBoolean egl_window_surface_t::swapBuffers()
rcEnc->rcFlushWindowColorBuffer(rcEnc, rcSurface);
nativeWindow->queueBuffer(nativeWindow, buffer);
if (nativeWindow->dequeueBuffer(nativeWindow, &buffer)) {
nativeWindow->queueBuffer_DEPRECATED(nativeWindow, buffer);
if (nativeWindow->dequeueBuffer_DEPRECATED(nativeWindow, &buffer)) {
buffer = NULL;
setErrorReturn(EGL_BAD_ALLOC, EGL_FALSE);
}
nativeWindow->lockBuffer(nativeWindow, buffer);
rcEnc->rcSetWindowColorBuffer(rcEnc, rcSurface,
((cb_handle_t *)(buffer->handle))->hostHandle);