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
diff --git a/tools/emulator/opengl/system/egl/egl.cpp b/tools/emulator/opengl/system/egl/egl.cpp
index ee195ac..b1be38d 100644
--- a/tools/emulator/opengl/system/egl/egl.cpp
+++ b/tools/emulator/opengl/system/egl/egl.cpp
@@ -263,10 +263,9 @@
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 @@
rcEnc->rcDestroyWindowSurface(rcEnc, rcSurface);
}
if (buffer) {
- nativeWindow->cancelBuffer(nativeWindow, buffer);
+ nativeWindow->cancelBuffer_DEPRECATED(nativeWindow, buffer);
}
nativeWindow->common.decRef(&nativeWindow->common);
}
@@ -316,12 +315,11 @@
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);