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

Commit 89a32780 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "SF: Fix emulator DPI" into rvc-dev am: 4b9467ba

Change-Id: I3376d421cc1aefe8c49b576eb1074bed80c04b94
parents 07c6f06e 4b9467ba
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -189,7 +189,7 @@ struct ConditionalLockGuard {
using ConditionalLock = ConditionalLockGuard<Mutex>;
using ConditionalLock = ConditionalLockGuard<Mutex>;


// TODO(b/141333600): Consolidate with HWC2::Display::Config::Builder::getDefaultDensity.
// TODO(b/141333600): Consolidate with HWC2::Display::Config::Builder::getDefaultDensity.
constexpr float FALLBACK_DENSITY = ACONFIGURATION_DENSITY_TV / 160.f;
constexpr float FALLBACK_DENSITY = ACONFIGURATION_DENSITY_TV;


float getDensityFromProperty(const char* property, bool required) {
float getDensityFromProperty(const char* property, bool required) {
    char value[PROPERTY_VALUE_MAX];
    char value[PROPERTY_VALUE_MAX];
@@ -198,7 +198,7 @@ float getDensityFromProperty(const char* property, bool required) {
        ALOGE("%s must be defined as a build property", property);
        ALOGE("%s must be defined as a build property", property);
        return FALLBACK_DENSITY;
        return FALLBACK_DENSITY;
    }
    }
    return density / 160.f;
    return density;
}
}


// Currently we only support V0_SRGB and DISPLAY_P3 as composition preference.
// Currently we only support V0_SRGB and DISPLAY_P3 as composition preference.
@@ -829,6 +829,7 @@ status_t SurfaceFlinger::getDisplayInfo(const sp<IBinder>& displayToken, Display
                ? mInternalDisplayDensity
                ? mInternalDisplayDensity
                : FALLBACK_DENSITY;
                : FALLBACK_DENSITY;
    }
    }
    info->density /= ACONFIGURATION_DENSITY_MEDIUM;


    info->secure = display->isSecure();
    info->secure = display->isSecure();
    info->deviceProductInfo = getDeviceProductInfoLocked(*display);
    info->deviceProductInfo = getDeviceProductInfoLocked(*display);