From ed54efa6e3d6b1403d07e0b68e0e741ec4d26cc4 Mon Sep 17 00:00:00 2001 From: Valerie Hau Date: Fri, 11 Jan 2019 20:03:14 -0800 Subject: Add Color Layer to ASurfaceControl Bug:122326454 Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTests Change-Id: Ib05ad70d838c79aa6f2e309217b93906c950b6fa --- include/android/surface_control.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/android') diff --git a/include/android/surface_control.h b/include/android/surface_control.h index 430f81be56..05731871d9 100644 --- a/include/android/surface_control.h +++ b/include/android/surface_control.h @@ -240,6 +240,17 @@ void ASurfaceTransaction_setBuffer(ASurfaceTransaction* transaction, ASurfaceControl* surface_control, AHardwareBuffer* buffer, int acquire_fence_fd = -1) __INTRODUCED_IN(29); +/** + * Updates the color for |surface_control|. This will make the background color for the + * ASurfaceControl visible in transparent regions of the surface. Colors |r|, |g|, + * and |b| must be within the range that is valid for |dataspace|. |dataspace| and |alpha| + * will be the dataspace and alpha set for the background color layer. + */ +void ASurfaceTransaction_setColor(ASurfaceTransaction* transaction, + ASurfaceControl* surface_control, float r, float g, float b, + float alpha, ADataSpace dataspace) + __INTRODUCED_IN(29); + /** * |source| the sub-rect within the buffer's content to be rendered inside the surface's area * The surface's source rect is clipped by the bounds of its current buffer. The source rect's width -- cgit v1.2.3-59-g8ed1b