Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 151f8c46 authored by Neha Jain's avatar Neha Jain Committed by Automerger Merge Worker
Browse files

Merge "Revert "Clean up debug.sf.ignore_hwc_physical_display_orientation""...

Merge "Revert "Clean up debug.sf.ignore_hwc_physical_display_orientation"" into tm-qpr-dev am: b8252965 am: b2318e3e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/20920163



Change-Id: I194d6536f8be47bea73c6843489d37133c23ceb3
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 584afe21 b2318e3e
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -440,6 +440,9 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    property_get("debug.sf.treat_170m_as_sRGB", value, "0");
    property_get("debug.sf.treat_170m_as_sRGB", value, "0");
    mTreat170mAsSrgb = atoi(value);
    mTreat170mAsSrgb = atoi(value);


    mIgnoreHwcPhysicalDisplayOrientation =
            base::GetBoolProperty("debug.sf.ignore_hwc_physical_display_orientation"s, false);

    // We should be reading 'persist.sys.sf.color_saturation' here
    // We should be reading 'persist.sys.sf.color_saturation' here
    // but since /data may be encrypted, we need to wait until after vold
    // but since /data may be encrypted, we need to wait until after vold
    // comes online to attempt to read the property. The property is
    // comes online to attempt to read the property. The property is
@@ -2442,7 +2445,8 @@ ui::Rotation SurfaceFlinger::getPhysicalDisplayOrientation(DisplayId displayId,
    if (!id) {
    if (!id) {
        return ui::ROTATION_0;
        return ui::ROTATION_0;
    }
    }
    if (getHwComposer().getComposer()->isSupported(
    if (!mIgnoreHwcPhysicalDisplayOrientation &&
        getHwComposer().getComposer()->isSupported(
                Hwc2::Composer::OptionalFeature::PhysicalDisplayOrientation)) {
                Hwc2::Composer::OptionalFeature::PhysicalDisplayOrientation)) {
        switch (getHwComposer().getPhysicalDisplayOrientation(*id)) {
        switch (getHwComposer().getPhysicalDisplayOrientation(*id)) {
            case Hwc2::AidlTransform::ROT_90:
            case Hwc2::AidlTransform::ROT_90:
+5 −0
Original line number Original line Diff line number Diff line
@@ -311,6 +311,11 @@ public:
    // on this behavior to increase contrast for some media sources.
    // on this behavior to increase contrast for some media sources.
    bool mTreat170mAsSrgb = false;
    bool mTreat170mAsSrgb = false;


    // Allows to ignore physical orientation provided through hwc API in favour of
    // 'ro.surface_flinger.primary_display_orientation'.
    // TODO(b/246793311): Clean up a temporary property
    bool mIgnoreHwcPhysicalDisplayOrientation = false;

protected:
protected:
    // We're reference counted, never destroy SurfaceFlinger directly
    // We're reference counted, never destroy SurfaceFlinger directly
    virtual ~SurfaceFlinger();
    virtual ~SurfaceFlinger();