Clarify that the buffer passed to ASurfaceTransaction_setBuffer
needs to have AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE.
Test: N/A
Bug: 183950013
Change-Id: I35de7fba1a15ec8fd96277d946c985b5a5876169
diff --git a/include/android/surface_control.h b/include/android/surface_control.h
index eb9c528..91726cd 100644
--- a/include/android/surface_control.h
+++ b/include/android/surface_control.h
@@ -286,6 +286,9 @@
* 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,