summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libhwc2.1/libdevice/ExynosLayer.cpp4
-rw-r--r--libhwc2.1/libdevice/ExynosLayer.h10
2 files changed, 13 insertions, 1 deletions
diff --git a/libhwc2.1/libdevice/ExynosLayer.cpp b/libhwc2.1/libdevice/ExynosLayer.cpp
index 79a9ca1..dbf8cbd 100644
--- a/libhwc2.1/libdevice/ExynosLayer.cpp
+++ b/libhwc2.1/libdevice/ExynosLayer.cpp
@@ -39,6 +39,7 @@ ExynosLayer::ExynosLayer(ExynosDisplay* display)
: ExynosMPPSource(MPP_SOURCE_LAYER, this),
mDisplay(display),
mCompositionType(HWC2_COMPOSITION_INVALID),
+ mRequestedCompositionType(HWC2_COMPOSITION_INVALID),
mExynosCompositionType(HWC2_COMPOSITION_INVALID),
mValidateCompositionType(HWC2_COMPOSITION_INVALID),
mValidateExynosCompositionType(HWC2_COMPOSITION_INVALID),
@@ -512,11 +513,12 @@ int32_t ExynosLayer::setLayerCompositionType(int32_t /*hwc2_composition_t*/ type
type = HWC2_COMPOSITION_DEVICE;
#endif
- if (type != mCompositionType) {
+ if (type != mCompositionType && type != mRequestedCompositionType) {
setGeometryChanged(GEOMETRY_LAYER_TYPE_CHANGED);
}
mCompositionType = type;
+ mRequestedCompositionType = type;
return HWC2_ERROR_NONE;
}
diff --git a/libhwc2.1/libdevice/ExynosLayer.h b/libhwc2.1/libdevice/ExynosLayer.h
index 4dc2423..e1df54d 100644
--- a/libhwc2.1/libdevice/ExynosLayer.h
+++ b/libhwc2.1/libdevice/ExynosLayer.h
@@ -92,10 +92,20 @@ class ExynosLayer : public ExynosMPPSource {
/**
* Layer's compositionType
+ *
+ * If acceptDisplayChanges() is called, it will be set to the validated type
+ * since SF may update their state and doesn't call back into HWC
*/
int32_t mCompositionType;
/**
+ * Composition type that is originally requested by SF only using setLayerComposisionType()
+ *
+ * It will not be changed if applyDisplayChanges() is called.
+ */
+ int32_t mRequestedCompositionType;
+
+ /**
* Composition type that is used by HAL
* (ex: COMPOSITION_G2D)
*/