summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValerie Hau <vhau@google.com>2019-04-23 22:52:31 +0000
committerValerie Hau <vhau@google.com>2019-04-23 22:55:18 +0000
commitae6d8a3e339315b6317d01ff5452da9d89a16c1e (patch)
treea29a02244c001213b37847717ae6fcaa55b6d218
parent491378a3d400c45aa63290315d4a5ab8e773de33 (diff)
downloadlibhardware-ae6d8a3e339315b6317d01ff5452da9d89a16c1e.tar.gz
Revert "Add validateBufferSize and getTransportSize to gralloc.h"
This reverts commit 491378a3d400c45aa63290315d4a5ab8e773de33. Reason for revert: Break Elfin Bug: 130669566 Change-Id: I07c6883872ed9033ec5edbf27b0bd423ead39962
-rw-r--r--include/hardware/gralloc.h32
-rw-r--r--tests/hardware/struct-offset.cpp4
2 files changed, 2 insertions, 34 deletions
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h
index 10a153c0..b4f7e5a4 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -314,38 +314,8 @@ typedef struct gralloc_module_t {
int l, int t, int w, int h,
struct android_ycbcr *ycbcr, int fenceFd);
- /* getTransportSize(..., outNumFds, outNumInts)
- * This function is mandatory on devices running IMapper2.1 or higher.
- *
- * Get the transport size of a buffer. An imported buffer handle is a raw
- * buffer handle with the process-local runtime data appended. This
- * function, for example, allows a caller to omit the process-local
- * runtime data at the tail when serializing the imported buffer handle.
- *
- * Note that a client might or might not omit the process-local runtime
- * data when sending an imported buffer handle. The mapper must support
- * both cases on the receiving end.
- */
- int32_t (*getTransportSize)(
- struct gralloc_module_t const* module, buffer_handle_t handle, uint32_t *outNumFds,
- uint32_t *outNumInts);
-
- /* validateBufferSize(..., w, h, format, usage, stride)
- * This function is mandatory on devices running IMapper2.1 or higher.
- *
- * Validate that the buffer can be safely accessed by a caller who assumes
- * the specified width, height, format, usage, and stride. This must at least validate
- * that the buffer size is large enough. Validating the buffer against
- * individual buffer attributes is optional.
- */
- int32_t (*validateBufferSize)(
- struct gralloc_module_t const* device, buffer_handle_t handle,
- uint32_t w, uint32_t h, int32_t format, int usage,
- uint32_t stride);
-
/* reserved for future use */
- void* reserved_proc[1];
-
+ void* reserved_proc[3];
} gralloc_module_t;
/*****************************************************************************/
diff --git a/tests/hardware/struct-offset.cpp b/tests/hardware/struct-offset.cpp
index 82411ada..0cf145a1 100644
--- a/tests/hardware/struct-offset.cpp
+++ b/tests/hardware/struct-offset.cpp
@@ -185,9 +185,7 @@ void CheckOffsets(void) {
CHECK_MEMBER_AT(gralloc_module_t, lockAsync, 152, 296);
CHECK_MEMBER_AT(gralloc_module_t, unlockAsync, 156, 304);
CHECK_MEMBER_AT(gralloc_module_t, lockAsync_ycbcr, 160, 312);
- CHECK_MEMBER_AT(gralloc_module_t, getTransportSize, 164, 320);
- CHECK_MEMBER_AT(gralloc_module_t, validateBufferSize, 168, 328);
- CHECK_MEMBER_AT(gralloc_module_t, reserved_proc, 172, 336);
+ CHECK_MEMBER_AT(gralloc_module_t, reserved_proc, 164, 320);
CHECK_MEMBER_AT(alloc_device_t, common, 0, 0);
CHECK_MEMBER_AT(alloc_device_t, alloc, 64, 120);