summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/hardware/gralloc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h
index 2dbd1fa..0a68b52 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -207,6 +207,21 @@ typedef struct gralloc_module_t {
typedef struct alloc_device_t {
struct hw_device_t common;
+#ifdef QCOM_HARDWARE
+ /*
+ * (*allocSize)() Allocates a buffer in graphic memory with the requested
+ * bufferSize parameter and returns a buffer_handle_t and the stride in
+ * pixels to allow the implementation to satisfy hardware constraints on
+ * the width of a pixmap (eg: it may have to be multiple of 8 pixels).
+ * The CALLER TAKES OWNERSHIP of the buffer_handle_t.
+ *
+ * Returns 0 on success or -errno on error.
+ */
+ int (*allocSize)(struct alloc_device_t* dev,
+ int w, int h, int format, int usage,
+ buffer_handle_t* handle, int* stride, int bufferSize);
+#endif
+
/*
* (*alloc)() Allocates a buffer in graphic memory with the requested
* parameters and returns a buffer_handle_t and the stride in pixels to