Fix emulator build
getDataSpace was inside HWC2 ifdef when it didn't need to be.
Breaking builds that were not HWC2.
Test: build android auto or emulator
Change-Id: Ief68f458a29ae985780af9defcfeccb9baf7a701
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 5f4856b..ae731f7 100755
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -874,9 +874,6 @@
}
}
-android_dataspace Layer::getDataSpace() const {
- return mCurrentState.dataSpace;
-}
#else
void Layer::setPerFrameData(const sp<const DisplayDevice>& hw,
HWComposer::HWCLayerInterface& layer) {
@@ -1887,6 +1884,10 @@
return true;
}
+android_dataspace Layer::getDataSpace() const {
+ return mCurrentState.dataSpace;
+}
+
uint32_t Layer::getLayerStack() const {
auto p = getParent();
if (p == nullptr) {
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 9f45435..92353ae 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -192,6 +192,7 @@
bool setFlags(uint8_t flags, uint8_t mask);
bool setLayerStack(uint32_t layerStack);
bool setDataSpace(android_dataspace dataSpace);
+ android_dataspace getDataSpace() const;
uint32_t getLayerStack() const;
void deferTransactionUntil(const sp<IBinder>& barrierHandle, uint64_t frameNumber);
void deferTransactionUntil(const sp<Layer>& barrierLayer, uint64_t frameNumber);
@@ -275,8 +276,6 @@
void forceClientComposition(int32_t hwcId);
void setPerFrameData(const sp<const DisplayDevice>& 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,