2222
2323#include < hardware/gralloc.h>
2424#include < system/window.h>
25- // FIXME: remove this header, it's for legacy use. native_window is pulled from frameworks/base/native/include/android/
26- #include < android/native_window.h>
25+
2726// ---------------------------------------------------------------------------
2827
2928/* FIXME: this is legacy for pixmaps */
@@ -52,11 +51,11 @@ typedef struct egl_native_pixmap_t
5251namespace android {
5352
5453/*
55- * This helper class turns an EGL android_native_xxx type into a C++
54+ * This helper class turns a ANativeXXX object type into a C++
5655 * reference-counted object; with proper type conversions.
5756 */
5857template <typename NATIVE_TYPE, typename TYPE, typename REF>
59- class EGLNativeBase : public NATIVE_TYPE , public REF
58+ class ANativeObjectBase : public NATIVE_TYPE , public REF
6059{
6160public:
6261 // Disambiguate between the incStrong in REF and NATIVE_TYPE
@@ -68,8 +67,8 @@ class EGLNativeBase : public NATIVE_TYPE, public REF
6867 }
6968
7069protected:
71- typedef EGLNativeBase <NATIVE_TYPE, TYPE, REF> BASE;
72- EGLNativeBase () : NATIVE_TYPE(), REF() {
70+ typedef ANativeObjectBase <NATIVE_TYPE, TYPE, REF> BASE;
71+ ANativeObjectBase () : NATIVE_TYPE(), REF() {
7372 NATIVE_TYPE::common.incRef = incRef;
7473 NATIVE_TYPE::common.decRef = decRef;
7574 }
@@ -86,11 +85,11 @@ class EGLNativeBase : public NATIVE_TYPE, public REF
8685 return getSelf (reinterpret_cast <NATIVE_TYPE const *>(base));
8786 }
8887 static void incRef (android_native_base_t * base) {
89- EGLNativeBase * self = getSelf (base);
88+ ANativeObjectBase * self = getSelf (base);
9089 self->incStrong (self);
9190 }
9291 static void decRef (android_native_base_t * base) {
93- EGLNativeBase * self = getSelf (base);
92+ ANativeObjectBase * self = getSelf (base);
9493 self->decStrong (self);
9594 }
9695};
0 commit comments