summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Peiyong Lin <lpy@google.com> 2019-03-05 20:18:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-03-05 20:18:10 +0000
commitd38d88765aca51fd08c258a395d1fc3d88fcedf5 (patch)
treebbd2c589a902306a1d32287c752bd65fa61715c7 /libs/gui/SurfaceComposerClient.cpp
parent7d171b0728975a14c07c6bdba09668352a599255 (diff)
parentc502cb751508dd2008ee5e0601d4aae31cbaf6ca (diff)
Merge "[SurfaceFlinger] Add setColorSpaceAgnostic API."
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 050ba8736b..0a4ad462d9 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -989,6 +989,20 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setDesir
return *this;
}
+SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setColorSpaceAgnostic(
+ const sp<SurfaceControl>& sc, const bool agnostic) {
+ layer_state_t* s = getLayerState(sc);
+ if (!s) {
+ mStatus = BAD_INDEX;
+ return *this;
+ }
+ s->what |= layer_state_t::eColorSpaceAgnosticChanged;
+ s->colorSpaceAgnostic = agnostic;
+
+ registerSurfaceControlForCallback(sc);
+ return *this;
+}
+
SurfaceComposerClient::Transaction&
SurfaceComposerClient::Transaction::addTransactionCompletedCallback(
TransactionCompletedCallbackTakesContext callback, void* callbackContext) {