summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-02-24 18:25:41 -0800
committerMathias Agopian <mathias@google.com>2012-02-24 18:26:01 -0800
commitaf01feafc30152baf8e0a5cfddbf02bd14731fd2 (patch)
treee19b244ff773d206d21ecccf29296f1848790dd6 /include/ui
parentcc0eaa6582563f51c98db1b232200ac4d2a9a996 (diff)
downloadframeworks_base-af01feafc30152baf8e0a5cfddbf02bd14731fd2.zip
frameworks_base-af01feafc30152baf8e0a5cfddbf02bd14731fd2.tar.gz
frameworks_base-af01feafc30152baf8e0a5cfddbf02bd14731fd2.tar.bz2
remove dependency on android_native{s_priv|buffer}.h
Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/ANativeObjectBase.h (renamed from include/ui/egl/android_natives.h)15
-rw-r--r--include/ui/EGLNativeSurface.h55
-rw-r--r--include/ui/FramebufferNativeWindow.h8
-rw-r--r--include/ui/GraphicBuffer.h7
-rw-r--r--include/ui/android_native_buffer.h22
5 files changed, 13 insertions, 94 deletions
diff --git a/include/ui/egl/android_natives.h b/include/ui/ANativeObjectBase.h
index 9ac50a5..76e850f 100644
--- a/include/ui/egl/android_natives.h
+++ b/include/ui/ANativeObjectBase.h
@@ -22,8 +22,7 @@
#include <hardware/gralloc.h>
#include <system/window.h>
-// FIXME: remove this header, it's for legacy use. native_window is pulled from frameworks/base/native/include/android/
-#include <android/native_window.h>
+
// ---------------------------------------------------------------------------
/* FIXME: this is legacy for pixmaps */
@@ -52,11 +51,11 @@ typedef struct egl_native_pixmap_t
namespace android {
/*
- * This helper class turns an EGL android_native_xxx type into a C++
+ * This helper class turns a ANativeXXX object type into a C++
* reference-counted object; with proper type conversions.
*/
template <typename NATIVE_TYPE, typename TYPE, typename REF>
-class EGLNativeBase : public NATIVE_TYPE, public REF
+class ANativeObjectBase : public NATIVE_TYPE, public REF
{
public:
// Disambiguate between the incStrong in REF and NATIVE_TYPE
@@ -68,8 +67,8 @@ public:
}
protected:
- typedef EGLNativeBase<NATIVE_TYPE, TYPE, REF> BASE;
- EGLNativeBase() : NATIVE_TYPE(), REF() {
+ typedef ANativeObjectBase<NATIVE_TYPE, TYPE, REF> BASE;
+ ANativeObjectBase() : NATIVE_TYPE(), REF() {
NATIVE_TYPE::common.incRef = incRef;
NATIVE_TYPE::common.decRef = decRef;
}
@@ -86,11 +85,11 @@ protected:
return getSelf(reinterpret_cast<NATIVE_TYPE const*>(base));
}
static void incRef(android_native_base_t* base) {
- EGLNativeBase* self = getSelf(base);
+ ANativeObjectBase* self = getSelf(base);
self->incStrong(self);
}
static void decRef(android_native_base_t* base) {
- EGLNativeBase* self = getSelf(base);
+ ANativeObjectBase* self = getSelf(base);
self->decStrong(self);
}
};
diff --git a/include/ui/EGLNativeSurface.h b/include/ui/EGLNativeSurface.h
deleted file mode 100644
index 7964e7c..0000000
--- a/include/ui/EGLNativeSurface.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_EGL_NATIVE_SURFACE_H
-#define ANDROID_EGL_NATIVE_SURFACE_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <cutils/atomic.h>
-#include <utils/RefBase.h>
-
-#include <EGL/eglnatives.h>
-
-// ---------------------------------------------------------------------------
-namespace android {
-// ---------------------------------------------------------------------------
-
-template <class TYPE>
-class EGLNativeSurface : public egl_native_window_t, public LightRefBase<TYPE>
-{
-public:
- EGLNativeSurface() {
- memset(egl_native_window_t::reserved, 0,
- sizeof(egl_native_window_t::reserved));
- memset(egl_native_window_t::reserved_proc, 0,
- sizeof(egl_native_window_t::reserved_proc));
- memset(egl_native_window_t::oem, 0,
- sizeof(egl_native_window_t::oem));
- }
-protected:
- EGLNativeSurface& operator = (const EGLNativeSurface& rhs);
- EGLNativeSurface(const EGLNativeSurface& rhs);
- inline ~EGLNativeSurface() { };
-};
-
-// ---------------------------------------------------------------------------
-}; // namespace android
-// ---------------------------------------------------------------------------
-
-#endif // ANDROID_EGL_SURFACE_H
-
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h
index 302d012..b202b95 100644
--- a/include/ui/FramebufferNativeWindow.h
+++ b/include/ui/FramebufferNativeWindow.h
@@ -24,11 +24,9 @@
#include <utils/threads.h>
#include <utils/String8.h>
-#include <ui/Rect.h>
-
-#include <pixelflinger/pixelflinger.h>
-#include <ui/egl/android_natives.h>
+#include <ui/ANativeObjectBase.h>
+#include <ui/Rect.h>
#define NUM_FRAME_BUFFERS 2
@@ -44,7 +42,7 @@ class NativeBuffer;
// ---------------------------------------------------------------------------
class FramebufferNativeWindow
- : public EGLNativeBase<
+ : public ANativeObjectBase<
ANativeWindow,
FramebufferNativeWindow,
LightRefBase<FramebufferNativeWindow> >
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 6ab01f4..f318cd8 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -20,11 +20,11 @@
#include <stdint.h>
#include <sys/types.h>
-#include <ui/android_native_buffer.h>
+#include <ui/ANativeObjectBase.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <utils/Flattenable.h>
-#include <pixelflinger/pixelflinger.h>
+
struct ANativeWindowBuffer;
@@ -37,7 +37,7 @@ class GraphicBufferMapper;
// ===========================================================================
class GraphicBuffer
- : public EGLNativeBase<
+ : public ANativeObjectBase<
ANativeWindowBuffer,
GraphicBuffer,
LightRefBase<GraphicBuffer> >, public Flattenable
@@ -93,7 +93,6 @@ public:
status_t lock(uint32_t usage, void** vaddr);
status_t lock(uint32_t usage, const Rect& rect, void** vaddr);
- status_t lock(GGLSurface* surface, uint32_t usage);
status_t unlock();
ANativeWindowBuffer* getNativeBuffer() const;
diff --git a/include/ui/android_native_buffer.h b/include/ui/android_native_buffer.h
deleted file mode 100644
index b6e1db4..0000000
--- a/include/ui/android_native_buffer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_ANDROID_NATIVES_PRIV_H
-#define ANDROID_ANDROID_NATIVES_PRIV_H
-
-#include <ui/egl/android_natives.h>
-
-#endif /* ANDROID_ANDROID_NATIVES_PRIV_H */