diff --git a/android/gralloc_handle.h b/android/gralloc_handle.h index b0f5048c..43255ba5 100644 --- a/android/gralloc_handle.h +++ b/android/gralloc_handle.h @@ -76,6 +76,11 @@ struct gralloc_handle_t { ((sizeof(struct gralloc_handle_t) - sizeof(native_handle_t))/sizeof(int)) \ - GRALLOC_HANDLE_NUM_FDS) +static inline struct gralloc_handle_t *gralloc_handle(buffer_handle_t handle) +{ + return (struct gralloc_handle_t *)handle; +} + /** * Create a buffer handle. */