Update to renamed ANativeWindow methods

A few ANativeWindow methods were updatd to take a Sync HAL file
descriptor, and the existing methods were renamed with a _DEPRECATED
suffix. Since the emulator graphics acceleration doesn't yet support
the sync HAL, this change continues calling the deprecated functions
via their new names.

Change-Id: I5b1760811fafb6723ede887e32e63f94cbaeffe5
This commit is contained in:
Jesse Hall
2012-06-21 23:16:56 -07:00
parent c5fd927f4a
commit e705cdde0d

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);