summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-10-29 18:29:39 -0700
committerMathias Agopian <mathias@google.com>2009-10-30 14:38:22 -0700
commitcd2433f3804a537aedc26f595b1c05f95a05244a (patch)
treefd65c065d879a624444eea3ad02c9b00434166f0
parent4016d6bc35b36277574e0cfb8dc47c8559fec079 (diff)
downloadlibhardware-cd2433f3804a537aedc26f595b1c05f95a05244a.tar.gz
fix[2222341] Soft reset while going back from camcorder settings
add a way to convert a mapped "pushbuffer" buffer to a gralloc handle which then can be safely used by surfaceflinger
-rw-r--r--include/hardware/gralloc.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h
index 5e868e68..d50c8956 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -75,6 +75,14 @@ enum {
typedef const native_handle* buffer_handle_t;
+enum {
+ /* FIXME: this only exists to work-around some issues with
+ * the video and camera frameworks. don't implement unless
+ * you know what you're doing.
+ */
+ GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER = 0x080000001,
+};
+
/**
* Every hardware module must have a data structure named HAL_MODULE_INFO_SYM
* and the fields of this data structure must begin with hw_module_t
@@ -83,7 +91,6 @@ typedef const native_handle* buffer_handle_t;
typedef struct gralloc_module_t {
struct hw_module_t common;
-
/*
* (*registerBuffer)() must be called before a buffer_handle_t that has not
* been created with (*alloc_device_t::alloc)() can be used.
@@ -162,8 +169,13 @@ typedef struct gralloc_module_t {
int (*unlock)(struct gralloc_module_t const* module,
buffer_handle_t handle);
+
/* reserved for future use */
- void* reserved_proc[8];
+ int (*perform)(struct gralloc_module_t const* module,
+ int operation, ... );
+
+ /* reserved for future use */
+ void* reserved_proc[7];
} gralloc_module_t;
/*****************************************************************************/