minigbm: cros_gralloc: support GRALLOC_MODULE_API_VERSION_0_3
Let's support GRALLOC_MODULE_API_VERSION_0_3. This will more closely
mirror what gralloc1 and HIDL gralloc does.
We have the option to asychronously unlock with this version of the API,
but decided the added complexity wouldn't lead to any performance benefits.
We'll just set the release fence pointer to be -1, indicating the
the buffer is ready to use after the (*unlock_Async) call.
BUG=b:62069164
TEST=Android boots, play Youtube app, ./gralloctest all passes
Change-Id: Ia21a11b541796c4b36003c50cd8627d189b4bc56
Reviewed-on: https://chromium-review.googlesource.com/422661
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
diff --git a/cros_gralloc/cros_gralloc_helpers.h b/cros_gralloc/cros_gralloc_helpers.h
index f198dd9..cf90ec8 100644
--- a/cros_gralloc/cros_gralloc_helpers.h
+++ b/cros_gralloc/cros_gralloc_helpers.h
@@ -22,6 +22,8 @@
cros_gralloc_handle_t cros_gralloc_convert_handle(buffer_handle_t handle);
+int32_t cros_gralloc_sync_wait(int32_t acquire_fence);
+
__attribute__((format(printf, 4, 5))) void cros_gralloc_log(const char *prefix, const char *file,
int line, const char *format, ...);