Add output dataspace to CachedSet rendering
This ensures that:
* The proper color conversion is applied to the rendered output.
* Color information is correctly provided when passing the cached buffer
over to HWC
Also rename dataspace to outputDataspace whenever the dataspace is used
for output, so that it's less confusing than just "dataspace"
Bug: 181192086
Bug: 181192080
Test: libcompositionengine_test
Change-Id: I024ab471a9139209d2a51add145e6b14d9ed3745
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index 54784a2..b364649 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -681,6 +681,7 @@
.buffer = getState().overrideInfo.buffer,
.fence = getState().overrideInfo.acquireFence,
}};
+ settings.sourceDataspace = getState().overrideInfo.dataspace;
settings.alpha = 1.0f;
return {static_cast<LayerFE::LayerSettings>(settings)};