From 38605fc3825897338fc284bbb79ee7557f3a6f07 Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Mon, 29 Mar 2021 20:33:42 +0000 Subject: Clarify that the buffer passed to ASurfaceTransaction_setBuffer needs to have AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE. Test: N/A Bug: 183950013 Change-Id: I35de7fba1a15ec8fd96277d946c985b5a5876169 --- include/android/surface_control.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/android') diff --git a/include/android/surface_control.h b/include/android/surface_control.h index eb9c5280e2..91726cd737 100644 --- a/include/android/surface_control.h +++ b/include/android/surface_control.h @@ -286,6 +286,9 @@ void ASurfaceTransaction_setZOrder(ASurfaceTransaction* transaction, * The frameworks takes ownership of the \a acquire_fence_fd passed and is responsible * for closing it. * + * Note that the buffer must be allocated with AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE + * as the surface control might be composited using the GPU. + * * Available since API level 29. */ void ASurfaceTransaction_setBuffer(ASurfaceTransaction* transaction, -- cgit v1.2.3-59-g8ed1b