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

Commit d37705c6 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9428515 from 3dd864dd to tm-qpr2-release

Change-Id: I38c2e91833d69fbdbd77fd1859343833d4b11bc7
parents 2249770a 3dd864dd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -422,6 +422,9 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    property_get("debug.sf.treat_170m_as_sRGB", value, "0");
    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
    // but since /data may be encrypted, we need to wait until after vold
    // comes online to attempt to read the property. The property is
@@ -2401,7 +2404,8 @@ ui::Rotation SurfaceFlinger::getPhysicalDisplayOrientation(DisplayId displayId,
    if (!id) {
        return ui::ROTATION_0;
    }
    if (getHwComposer().getComposer()->isSupported(
    if (!mIgnoreHwcPhysicalDisplayOrientation &&
        getHwComposer().getComposer()->isSupported(
                Hwc2::Composer::OptionalFeature::PhysicalDisplayOrientation)) {
        switch (getHwComposer().getPhysicalDisplayOrientation(*id)) {
            case Hwc2::AidlTransform::ROT_90:
+5 −0
Original line number Diff line number Diff line
@@ -353,6 +353,11 @@ public:
    // on this behavior to increase contrast for some media sources.
    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:
    // We're reference counted, never destroy SurfaceFlinger directly
    virtual ~SurfaceFlinger();