From 9551fd3acc2b0bbdfed02ed2bf97c5e560933abe Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Thu, 20 Oct 2016 17:18:15 -0600 Subject: Add getDataSpace to layer class Test: TBD Change-Id: I1d583bc6dae4cfb1569f053b2480e94b6ca9cc6f --- services/surfaceflinger/Layer.cpp | 6 ++++-- services/surfaceflinger/Layer.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 295b22982d..861a7d93b7 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -760,9 +760,7 @@ void Layer::forceClientComposition(int32_t hwcId) { mHwcLayers[hwcId].forceClientComposition = true; } -#endif -#ifdef USE_HWC2 void Layer::setPerFrameData(const sp& displayDevice) { // Apply this display's projection's viewport to the visible region // before giving it to the HWC HAL. @@ -865,6 +863,10 @@ void Layer::setPerFrameData(const sp& displayDevice) { static_cast(error)); } } + +android_dataspace Layer::getDataSpace() const { + return mCurrentState.dataSpace; +} #else void Layer::setPerFrameData(const sp& hw, HWComposer::HWCLayerInterface& layer) { diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index 6b228b00ac..afe6074d7a 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -261,6 +261,8 @@ public: void forceClientComposition(int32_t hwcId); void setPerFrameData(const sp& displayDevice); + android_dataspace getDataSpace() const; + // callIntoHwc exists so we can update our local state and call // acceptDisplayChanges without unnecessarily updating the device's state void setCompositionType(int32_t hwcId, HWC2::Composition type, -- cgit v1.2.3-59-g8ed1b