summaryrefslogtreecommitdiffstats
path: root/include/ui/BufferMapper.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-05-04 14:17:04 -0700
committerMathias Agopian <mathias@google.com>2009-05-04 14:17:04 -0700
commit0926f50664c739eaee60341f8e8c694dc9a4f3eb (patch)
tree642597de2cc52f7636ae74f1a88f3706e3e54a4a /include/ui/BufferMapper.h
parent7be3e5d2d8101a8f5e12bbdf650431a734f88eba (diff)
downloadframeworks_native-0926f50664c739eaee60341f8e8c694dc9a4f3eb.zip
frameworks_native-0926f50664c739eaee60341f8e8c694dc9a4f3eb.tar.gz
frameworks_native-0926f50664c739eaee60341f8e8c694dc9a4f3eb.tar.bz2
update surfaceflinger, libui and libagl to the new gralloc api
- Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually. - factor all the lock/unlock code in SurfaceBuffer. - fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers(). - improved the situation with the dirty-region and fixed a problem that caused GL apps to not update. - make use of LightRefBase() where needed, instead of duplicating its implementation - add LightRefBase::getStrongCount() - renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp - disabled copybits test, since it clashes with the new gralloc api - Camera/Video will be fixed later when we rework the overlay apis
Diffstat (limited to 'include/ui/BufferMapper.h')
-rw-r--r--include/ui/BufferMapper.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/ui/BufferMapper.h b/include/ui/BufferMapper.h
index ff90033..5f084be 100644
--- a/include/ui/BufferMapper.h
+++ b/include/ui/BufferMapper.h
@@ -20,10 +20,7 @@
#include <stdint.h>
#include <sys/types.h>
-#include <utils/CallStack.h>
-#include <utils/threads.h>
#include <utils/Singleton.h>
-#include <utils/KeyedVector.h>
#include <hardware/gralloc.h>
@@ -40,9 +37,14 @@ class BufferMapper : public Singleton<BufferMapper>
{
public:
static inline BufferMapper& get() { return getInstance(); }
- status_t map(buffer_handle_t handle, void** addr, const void* id);
- status_t unmap(buffer_handle_t handle, const void* id);
- status_t lock(buffer_handle_t handle, int usage, const Rect& bounds);
+
+ status_t registerBuffer(buffer_handle_t handle);
+
+ status_t unregisterBuffer(buffer_handle_t handle);
+
+ status_t lock(buffer_handle_t handle,
+ int usage, const Rect& bounds, void** vaddr);
+
status_t unlock(buffer_handle_t handle);
// dumps information about the mapping of this handle
@@ -51,16 +53,7 @@ public:
private:
friend class Singleton<BufferMapper>;
BufferMapper();
- mutable Mutex mLock;
gralloc_module_t const *mAllocMod;
-
- void logMapLocked(buffer_handle_t handle, const void* id);
- void logUnmapLocked(buffer_handle_t handle, const void* id);
- struct map_info_t {
- const void* id;
- CallStack stack;
- };
- KeyedVector<buffer_handle_t, Vector<map_info_t> > mMapInfo;
};
// ---------------------------------------------------------------------------