SF: Move/Refactor Layer::setPerFrameData
Moves functionality out of ColorLayer, BufferLayer, BufferStateLayer and
BufferQueueLayer related to setting the per-frame data.
Instead each of the front-end classes now implements a minimal function
to set the per-frame state into the LayerFECompositionState structure.
compositionengine::OutputLayer now takes care of sending the state to
the HWC, and in particular with detecting when client composition needs
to be forced due to lack of HWC support (though the front-end can also
set a flag to force client composition for a few things it knows about).
SurfaceFlinger::calculateWorkingSet is also refactored to work with the
changes made, and prepare it to be moved over to CompositionEngine.
Test: atest libsurfaceflinger_unittest libcompositionengine_test
Test: atest CtsColorModeTestCases
Test: atest CtsDisplayTestCases
Test: atest CtsGraphicsTestCases
Test: atest CtsUiRenderingTestCases
Test: atest CtsViewTestCases
Test: atest android.media.cts.EncodeVirtualDisplayWithCompositionTest
Bug: 121291683
Change-Id: I2cb0442f68ec5c5f65f5b4cb418dda4c42e5dc39
diff --git a/services/surfaceflinger/CompositionEngine/src/Display.cpp b/services/surfaceflinger/CompositionEngine/src/Display.cpp
index f9d70e3..8520d70 100644
--- a/services/surfaceflinger/CompositionEngine/src/Display.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Display.cpp
@@ -74,9 +74,14 @@
}
void Display::setColorMode(ui::ColorMode mode, ui::Dataspace dataspace,
- ui::RenderIntent renderIntent) {
+ ui::RenderIntent renderIntent,
+ ui::Dataspace colorSpaceAgnosticDataspace) {
+ ui::Dataspace targetDataspace =
+ getDisplayColorProfile()->getTargetDataspace(mode, dataspace,
+ colorSpaceAgnosticDataspace);
+
if (mode == getState().colorMode && dataspace == getState().dataspace &&
- renderIntent == getState().renderIntent) {
+ renderIntent == getState().renderIntent && targetDataspace == getState().targetDataspace) {
return;
}
@@ -85,7 +90,7 @@
return;
}
- Output::setColorMode(mode, dataspace, renderIntent);
+ Output::setColorMode(mode, dataspace, renderIntent, colorSpaceAgnosticDataspace);
auto& hwc = getCompositionEngine().getHwComposer();
hwc.setActiveColorMode(*mId, mode, renderIntent);
diff --git a/services/surfaceflinger/CompositionEngine/src/DisplayColorProfile.cpp b/services/surfaceflinger/CompositionEngine/src/DisplayColorProfile.cpp
index 130ab1d..5ef9097 100644
--- a/services/surfaceflinger/CompositionEngine/src/DisplayColorProfile.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/DisplayColorProfile.cpp
@@ -64,6 +64,12 @@
RenderIntent::TONE_MAP_COLORIMETRIC,
};
+// Returns true if the given colorMode is considered an HDR color mode
+bool isHdrColorMode(const ColorMode colorMode) {
+ return std::any_of(std::begin(sHdrColorModes), std::end(sHdrColorModes),
+ [colorMode](ColorMode hdrColorMode) { return hdrColorMode == colorMode; });
+}
+
// map known color mode to dataspace
Dataspace colorModeToDataspace(ColorMode mode) {
switch (mode) {
@@ -90,13 +96,7 @@
candidates.push_back(mode);
// check if mode is HDR
- bool isHdr = false;
- for (auto hdrMode : sHdrColorModes) {
- if (hdrMode == mode) {
- isHdr = true;
- break;
- }
- }
+ bool isHdr = isHdrColorMode(mode);
// add other HDR candidates when mode is HDR
if (isHdr) {
@@ -376,6 +376,32 @@
}
}
+bool DisplayColorProfile::isDataspaceSupported(Dataspace dataspace) const {
+ switch (dataspace) {
+ case Dataspace::BT2020_PQ:
+ case Dataspace::BT2020_ITU_PQ:
+ return hasHDR10Support();
+
+ case Dataspace::BT2020_HLG:
+ case Dataspace::BT2020_ITU_HLG:
+ return hasHLGSupport();
+
+ default:
+ return true;
+ }
+}
+
+ui::Dataspace DisplayColorProfile::getTargetDataspace(ColorMode mode, Dataspace dataspace,
+ Dataspace colorSpaceAgnosticDataspace) const {
+ if (isHdrColorMode(mode)) {
+ return Dataspace::UNKNOWN;
+ }
+ if (colorSpaceAgnosticDataspace != ui::Dataspace::UNKNOWN) {
+ return colorSpaceAgnosticDataspace;
+ }
+ return dataspace;
+}
+
void DisplayColorProfile::dump(std::string& out) const {
out.append(" Composition Display Color State:");
diff --git a/services/surfaceflinger/CompositionEngine/src/LayerCompositionState.cpp b/services/surfaceflinger/CompositionEngine/src/LayerCompositionState.cpp
index 40c4da9..37d6eaa 100644
--- a/services/surfaceflinger/CompositionEngine/src/LayerCompositionState.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/LayerCompositionState.cpp
@@ -24,9 +24,10 @@
using android::compositionengine::impl::dumpVal;
-void dumpVal(std::string& out, const char* name, Hwc2::IComposerClient::Color value) {
+void dumpVal(std::string& out, const char* name, half4 value) {
using android::base::StringAppendF;
- StringAppendF(&out, "%s=[%d %d %d] ", name, value.r, value.g, value.b);
+ StringAppendF(&out, "%s=[%f %f %f] ", name, static_cast<float>(value.r),
+ static_cast<float>(value.g), static_cast<float>(value.b));
}
void dumpFrontEnd(std::string& out, const LayerFECompositionState& state) {
@@ -60,8 +61,8 @@
dumpVal(out, "composition type", toString(state.compositionType), state.compositionType);
out.append("\n buffer: ");
+ dumpVal(out, "bufferSlot", state.bufferSlot);
dumpVal(out, "buffer", state.buffer.get());
- dumpVal(out, "slot", state.bufferSlot);
out.append("\n ");
dumpVal(out, "sideband stream", state.sidebandStream.get());
@@ -70,6 +71,7 @@
dumpVal(out, "color", state.color);
out.append("\n ");
+ dumpVal(out, "isColorspaceAgnostic", state.isColorspaceAgnostic);
dumpVal(out, "dataspace", toString(state.dataspace), state.dataspace);
dumpVal(out, "hdr metadata types", state.hdrMetadata.validTypes);
dumpVal(out, "colorTransform", state.colorTransform);
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index 01b5781..0725926 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -104,15 +104,21 @@
}
void Output::setColorMode(ui::ColorMode mode, ui::Dataspace dataspace,
- ui::RenderIntent renderIntent) {
+ ui::RenderIntent renderIntent,
+ ui::Dataspace colorSpaceAgnosticDataspace) {
+ ui::Dataspace targetDataspace =
+ getDisplayColorProfile()->getTargetDataspace(mode, dataspace,
+ colorSpaceAgnosticDataspace);
+
if (mState.colorMode == mode && mState.dataspace == dataspace &&
- mState.renderIntent == renderIntent) {
+ mState.renderIntent == renderIntent && mState.targetDataspace == targetDataspace) {
return;
}
mState.colorMode = mode;
mState.dataspace = dataspace;
mState.renderIntent = renderIntent;
+ mState.targetDataspace = targetDataspace;
mRenderSurface->setBufferDataspace(dataspace);
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputCompositionState.cpp b/services/surfaceflinger/CompositionEngine/src/OutputCompositionState.cpp
index 9549054..0b15dad 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputCompositionState.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputCompositionState.cpp
@@ -44,6 +44,7 @@
dumpVal(out, "renderIntent", toString(renderIntent), renderIntent);
dumpVal(out, "dataspace", toString(dataspace), dataspace);
dumpVal(out, "colorTransform", colorTransform);
+ dumpVal(out, "target dataspace", toString(targetDataspace), targetDataspace);
out.append("\n");
}
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index 5ce72b0..ebfc704 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -16,6 +16,7 @@
#include <android-base/stringprintf.h>
#include <compositionengine/CompositionEngine.h>
+#include <compositionengine/DisplayColorProfile.h>
#include <compositionengine/Layer.h>
#include <compositionengine/LayerFE.h>
#include <compositionengine/Output.h>
@@ -290,20 +291,43 @@
} // namespace impl
void OutputLayer::updateCompositionState(bool includeGeometry) {
+ const auto& layerFEState = mLayer->getState().frontEnd;
+ const auto& outputState = mOutput.getState();
+ const auto& profile = *mOutput.getDisplayColorProfile();
+
if (includeGeometry) {
mState.displayFrame = calculateOutputDisplayFrame();
mState.sourceCrop = calculateOutputSourceCrop();
mState.bufferTransform =
static_cast<Hwc2::Transform>(calculateOutputRelativeBufferTransform());
- if ((mLayer->getState().frontEnd.isSecure && !mOutput.getState().isSecure) ||
+ if ((layerFEState.isSecure && !outputState.isSecure) ||
(mState.bufferTransform & ui::Transform::ROT_INVALID)) {
mState.forceClientComposition = true;
}
}
+
+ // Determine the output dependent dataspace for this layer. If it is
+ // colorspace agnostic, it just uses the dataspace chosen for the output to
+ // avoid the need for color conversion.
+ mState.dataspace = layerFEState.isColorspaceAgnostic &&
+ outputState.targetDataspace != ui::Dataspace::UNKNOWN
+ ? outputState.targetDataspace
+ : layerFEState.dataspace;
+
+ // TODO(lpique): b/121291683 Remove this one we are sure we don't need the
+ // value recomputed / set every frame.
+ mState.visibleRegion = outputState.transform.transform(
+ layerFEState.geomVisibleRegion.intersect(outputState.viewport));
+
+ // These are evaluated every frame as they can potentially change at any
+ // time.
+ if (layerFEState.forceClientComposition || !profile.isDataspaceSupported(mState.dataspace)) {
+ mState.forceClientComposition = true;
+ }
}
-void OutputLayer::writeStateToHWC(bool includeGeometry) const {
+void OutputLayer::writeStateToHWC(bool includeGeometry) {
// Skip doing this if there is no HWC interface
if (!mState.hwc) {
return;
@@ -316,63 +340,213 @@
return;
}
+ const auto& outputIndependentState = mLayer->getState().frontEnd;
+ auto requestedCompositionType = outputIndependentState.compositionType;
+
if (includeGeometry) {
- // Output dependent state
+ writeOutputDependentGeometryStateToHWC(hwcLayer.get(), requestedCompositionType);
+ writeOutputIndependentGeometryStateToHWC(hwcLayer.get(), outputIndependentState);
+ }
- if (auto error = hwcLayer->setDisplayFrame(mState.displayFrame);
- error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set display frame [%d, %d, %d, %d]: %s (%d)",
- mLayerFE->getDebugName(), mState.displayFrame.left, mState.displayFrame.top,
- mState.displayFrame.right, mState.displayFrame.bottom, to_string(error).c_str(),
- static_cast<int32_t>(error));
- }
+ writeOutputDependentPerFrameStateToHWC(hwcLayer.get());
+ writeOutputIndependentPerFrameStateToHWC(hwcLayer.get(), outputIndependentState);
- if (auto error = hwcLayer->setSourceCrop(mState.sourceCrop); error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set source crop [%.3f, %.3f, %.3f, %.3f]: "
- "%s (%d)",
- mLayerFE->getDebugName(), mState.sourceCrop.left, mState.sourceCrop.top,
- mState.sourceCrop.right, mState.sourceCrop.bottom, to_string(error).c_str(),
- static_cast<int32_t>(error));
- }
+ writeCompositionTypeToHWC(hwcLayer.get(), requestedCompositionType);
+}
- if (auto error = hwcLayer->setZOrder(mState.z); error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set Z %u: %s (%d)", mLayerFE->getDebugName(), mState.z,
+void OutputLayer::writeOutputDependentGeometryStateToHWC(
+ HWC2::Layer* hwcLayer, Hwc2::IComposerClient::Composition requestedCompositionType) {
+ const auto& outputDependentState = getState();
+
+ if (auto error = hwcLayer->setDisplayFrame(outputDependentState.displayFrame);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set display frame [%d, %d, %d, %d]: %s (%d)",
+ mLayerFE->getDebugName(), outputDependentState.displayFrame.left,
+ outputDependentState.displayFrame.top, outputDependentState.displayFrame.right,
+ outputDependentState.displayFrame.bottom, to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+
+ if (auto error = hwcLayer->setSourceCrop(outputDependentState.sourceCrop);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set source crop [%.3f, %.3f, %.3f, %.3f]: "
+ "%s (%d)",
+ mLayerFE->getDebugName(), outputDependentState.sourceCrop.left,
+ outputDependentState.sourceCrop.top, outputDependentState.sourceCrop.right,
+ outputDependentState.sourceCrop.bottom, to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+
+ if (auto error = hwcLayer->setZOrder(outputDependentState.z); error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set Z %u: %s (%d)", mLayerFE->getDebugName(), outputDependentState.z,
+ to_string(error).c_str(), static_cast<int32_t>(error));
+ }
+
+ // Solid-color layers should always use an identity transform.
+ const auto bufferTransform =
+ requestedCompositionType != Hwc2::IComposerClient::Composition::SOLID_COLOR
+ ? outputDependentState.bufferTransform
+ : static_cast<Hwc2::Transform>(0);
+ if (auto error = hwcLayer->setTransform(static_cast<HWC2::Transform>(bufferTransform));
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set transform %s: %s (%d)", mLayerFE->getDebugName(),
+ toString(outputDependentState.bufferTransform).c_str(), to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+}
+
+void OutputLayer::writeOutputIndependentGeometryStateToHWC(
+ HWC2::Layer* hwcLayer, const LayerFECompositionState& outputIndependentState) {
+ if (auto error = hwcLayer->setBlendMode(
+ static_cast<HWC2::BlendMode>(outputIndependentState.blendMode));
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set blend mode %s: %s (%d)", mLayerFE->getDebugName(),
+ toString(outputIndependentState.blendMode).c_str(), to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+
+ if (auto error = hwcLayer->setPlaneAlpha(outputIndependentState.alpha);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set plane alpha %.3f: %s (%d)", mLayerFE->getDebugName(),
+ outputIndependentState.alpha, to_string(error).c_str(), static_cast<int32_t>(error));
+ }
+
+ if (auto error = hwcLayer->setInfo(outputIndependentState.type, outputIndependentState.appId);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set info %s (%d)", mLayerFE->getDebugName(), to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+}
+
+void OutputLayer::writeOutputDependentPerFrameStateToHWC(HWC2::Layer* hwcLayer) {
+ const auto& outputDependentState = getState();
+
+ // TODO(lpique): b/121291683 visibleRegion is output-dependent geometry
+ // state and should not change every frame.
+ if (auto error = hwcLayer->setVisibleRegion(outputDependentState.visibleRegion);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set visible region: %s (%d)", mLayerFE->getDebugName(),
+ to_string(error).c_str(), static_cast<int32_t>(error));
+ outputDependentState.visibleRegion.dump(LOG_TAG);
+ }
+
+ if (auto error = hwcLayer->setDataspace(outputDependentState.dataspace);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set dataspace %d: %s (%d)", mLayerFE->getDebugName(),
+ outputDependentState.dataspace, to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+}
+
+void OutputLayer::writeOutputIndependentPerFrameStateToHWC(
+ HWC2::Layer* hwcLayer, const LayerFECompositionState& outputIndependentState) {
+ switch (auto error = hwcLayer->setColorTransform(outputIndependentState.colorTransform)) {
+ case HWC2::Error::None:
+ break;
+ case HWC2::Error::Unsupported:
+ editState().forceClientComposition = true;
+ break;
+ default:
+ ALOGE("[%s] Failed to set color transform: %s (%d)", mLayerFE->getDebugName(),
to_string(error).c_str(), static_cast<int32_t>(error));
- }
+ }
- if (auto error =
- hwcLayer->setTransform(static_cast<HWC2::Transform>(mState.bufferTransform));
+ if (auto error = hwcLayer->setSurfaceDamage(outputIndependentState.surfaceDamage);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set surface damage: %s (%d)", mLayerFE->getDebugName(),
+ to_string(error).c_str(), static_cast<int32_t>(error));
+ outputIndependentState.surfaceDamage.dump(LOG_TAG);
+ }
+
+ // Content-specific per-frame state
+ switch (outputIndependentState.compositionType) {
+ case Hwc2::IComposerClient::Composition::SOLID_COLOR:
+ writeSolidColorStateToHWC(hwcLayer, outputIndependentState);
+ break;
+ case Hwc2::IComposerClient::Composition::SIDEBAND:
+ writeSidebandStateToHWC(hwcLayer, outputIndependentState);
+ break;
+ case Hwc2::IComposerClient::Composition::CURSOR:
+ case Hwc2::IComposerClient::Composition::DEVICE:
+ writeBufferStateToHWC(hwcLayer, outputIndependentState);
+ break;
+ case Hwc2::IComposerClient::Composition::INVALID:
+ case Hwc2::IComposerClient::Composition::CLIENT:
+ // Ignored
+ break;
+ }
+}
+
+void OutputLayer::writeSolidColorStateToHWC(HWC2::Layer* hwcLayer,
+ const LayerFECompositionState& outputIndependentState) {
+ hwc_color_t color = {static_cast<uint8_t>(std::round(255.0f * outputIndependentState.color.r)),
+ static_cast<uint8_t>(std::round(255.0f * outputIndependentState.color.g)),
+ static_cast<uint8_t>(std::round(255.0f * outputIndependentState.color.b)),
+ 255};
+
+ if (auto error = hwcLayer->setColor(color); error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set color: %s (%d)", mLayerFE->getDebugName(),
+ to_string(error).c_str(), static_cast<int32_t>(error));
+ }
+}
+
+void OutputLayer::writeSidebandStateToHWC(HWC2::Layer* hwcLayer,
+ const LayerFECompositionState& outputIndependentState) {
+ if (auto error = hwcLayer->setSidebandStream(outputIndependentState.sidebandStream->handle());
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set sideband stream %p: %s (%d)", mLayerFE->getDebugName(),
+ outputIndependentState.sidebandStream->handle(), to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+}
+
+void OutputLayer::writeBufferStateToHWC(HWC2::Layer* hwcLayer,
+ const LayerFECompositionState& outputIndependentState) {
+ auto supportedPerFrameMetadata =
+ mOutput.getDisplayColorProfile()->getSupportedPerFrameMetadata();
+ if (auto error = hwcLayer->setPerFrameMetadata(supportedPerFrameMetadata,
+ outputIndependentState.hdrMetadata);
+ error != HWC2::Error::None && error != HWC2::Error::Unsupported) {
+ ALOGE("[%s] Failed to set hdrMetadata: %s (%d)", mLayerFE->getDebugName(),
+ to_string(error).c_str(), static_cast<int32_t>(error));
+ }
+
+ uint32_t hwcSlot = 0;
+ sp<GraphicBuffer> hwcBuffer;
+ // We need access to the output-dependent state for the buffer cache there,
+ // though otherwise the buffer is not output-dependent.
+ editState().hwc->hwcBufferCache.getHwcBuffer(outputIndependentState.bufferSlot,
+ outputIndependentState.buffer, &hwcSlot,
+ &hwcBuffer);
+
+ if (auto error = hwcLayer->setBuffer(hwcSlot, hwcBuffer, outputIndependentState.acquireFence);
+ error != HWC2::Error::None) {
+ ALOGE("[%s] Failed to set buffer %p: %s (%d)", mLayerFE->getDebugName(),
+ outputIndependentState.buffer->handle, to_string(error).c_str(),
+ static_cast<int32_t>(error));
+ }
+}
+
+void OutputLayer::writeCompositionTypeToHWC(
+ HWC2::Layer* hwcLayer, Hwc2::IComposerClient::Composition requestedCompositionType) {
+ auto& outputDependentState = editState();
+
+ // If we are forcing client composition, we need to tell the HWC
+ if (outputDependentState.forceClientComposition) {
+ requestedCompositionType = Hwc2::IComposerClient::Composition::CLIENT;
+ }
+
+ // Set the requested composition type with the HWC whenever it changes
+ if (outputDependentState.hwc->hwcCompositionType != requestedCompositionType) {
+ outputDependentState.hwc->hwcCompositionType = requestedCompositionType;
+
+ if (auto error = hwcLayer->setCompositionType(
+ static_cast<HWC2::Composition>(requestedCompositionType));
error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set transform %s: %s (%d)", mLayerFE->getDebugName(),
- toString(mState.bufferTransform).c_str(), to_string(error).c_str(),
+ ALOGE("[%s] Failed to set composition type %s: %s (%d)", mLayerFE->getDebugName(),
+ toString(requestedCompositionType).c_str(), to_string(error).c_str(),
static_cast<int32_t>(error));
}
-
- // Output independent state
-
- const auto& outputIndependentState = mLayer->getState().frontEnd;
-
- if (auto error = hwcLayer->setBlendMode(
- static_cast<HWC2::BlendMode>(outputIndependentState.blendMode));
- error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set blend mode %s: %s (%d)", mLayerFE->getDebugName(),
- toString(outputIndependentState.blendMode).c_str(), to_string(error).c_str(),
- static_cast<int32_t>(error));
- }
-
- if (auto error = hwcLayer->setPlaneAlpha(outputIndependentState.alpha);
- error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set plane alpha %.3f: %s (%d)", mLayerFE->getDebugName(),
- outputIndependentState.alpha, to_string(error).c_str(),
- static_cast<int32_t>(error));
- }
-
- if (auto error =
- hwcLayer->setInfo(outputIndependentState.type, outputIndependentState.appId);
- error != HWC2::Error::None) {
- ALOGE("[%s] Failed to set info %s (%d)", mLayerFE->getDebugName(),
- to_string(error).c_str(), static_cast<int32_t>(error));
- }
}
}
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayerCompositionState.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayerCompositionState.cpp
index 861ea57..e320bee 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayerCompositionState.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayerCompositionState.cpp
@@ -47,6 +47,7 @@
dumpVal(out, "displayFrame", displayFrame);
dumpVal(out, "sourceCrop", sourceCrop);
dumpVal(out, "bufferTransform", toString(bufferTransform), bufferTransform);
+ dumpVal(out, "dataspace", toString(dataspace), dataspace);
dumpVal(out, "z-index", z);
if (hwc) {