diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-02-12 04:11:52 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-02-12 04:11:52 +0000 |
commit | 13327cc461d8f54550866bc404a99205f95ab92f (patch) | |
tree | 3bbca8b95f5be9a8b82ad5a6fe31282a01cb376f /native/android/surface_control.cpp | |
parent | 295083e9e621c9b9e790b304c087858c329e5074 (diff) | |
parent | 9f6f2e7990dd14b89f03a4ce8dd8c648c9ff2855 (diff) |
Snap for 5301221 from 9f6f2e7990dd14b89f03a4ce8dd8c648c9ff2855 to qt-release
Change-Id: Ib7179b6a319109199da3b3d01a987451dd9e3f74
Diffstat (limited to 'native/android/surface_control.cpp')
-rw-r--r-- | native/android/surface_control.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index 7d2934b8554e..d07052bb3b3f 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -440,6 +440,20 @@ void ASurfaceTransaction_setBufferAlpha(ASurfaceTransaction* aSurfaceTransaction transaction->setAlpha(surfaceControl, alpha); } +void ASurfaceTransaction_setBufferDataSpace(ASurfaceTransaction* aSurfaceTransaction, + ASurfaceControl* aSurfaceControl, + ADataSpace aDataSpace) { + CHECK_NOT_NULL(aSurfaceTransaction); + CHECK_NOT_NULL(aSurfaceControl); + + sp<SurfaceControl> surfaceControl = ASurfaceControl_to_SurfaceControl(aSurfaceControl); + LOG_ALWAYS_FATAL_IF(!isDataSpaceValid(surfaceControl, aDataSpace), "invalid dataspace"); + + Transaction* transaction = ASurfaceTransaction_to_Transaction(aSurfaceTransaction); + + transaction->setDataspace(surfaceControl, static_cast<ui::Dataspace>(aDataSpace)); +} + void ASurfaceTransaction_setHdrMetadata_smpte2086(ASurfaceTransaction* aSurfaceTransaction, ASurfaceControl* aSurfaceControl, struct AHdrMetadata_smpte2086* metadata) { |