split libandroid.so
- ANativeWindow (native_window.h) and
AHardwareBuffer (hardware_buffer.h) now live
in libnativewindow.so, which is a vodka library.
- libandroid.so still provide those symbols
via a static library version (libnativewindow.a)
- removed libbinder dependency as well
Test: compiled & booted
Bug: 35164655
Change-Id: Ib4bc8e8fc9ec1891bcbee63c28fd0131d82edf29
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index f15c29d..d0943a9 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -28,6 +28,8 @@
#include <EGL/eglext.h>
#include <android/hardware_buffer.h>
+#include <private/android/AHardwareBufferHelpers.h>
+
#include <cutils/atomic.h>
#include <cutils/compiler.h>
#include <cutils/memory.h>
@@ -38,6 +40,7 @@
#include <ui/GraphicBuffer.h>
+
#include <utils/KeyedVector.h>
#include <utils/SortedVector.h>
#include <utils/String8.h>
@@ -1991,9 +1994,7 @@
if (!buffer) return setError(EGL_BAD_PARAMETER, (EGLClientBuffer)0);
- // FIXME: remove this dangerous reinterpret_cast.
- const GraphicBuffer* graphicBuffer =
- reinterpret_cast<const GraphicBuffer*>(buffer);
+ const GraphicBuffer* graphicBuffer = AHardwareBuffer_to_GraphicBuffer(buffer);
return static_cast<EGLClientBuffer>(graphicBuffer->getNativeBuffer());
}