diff options
| author | 2020-05-08 23:29:57 +0000 | |
|---|---|---|
| committer | 2020-05-08 23:29:57 +0000 | |
| commit | 4b9467baece87329eca045ee6d9ec9363b84078a (patch) | |
| tree | 388b281d925082967077ca5c452c74d02761a53c | |
| parent | ca4cf8ad870a59f6930804fb79f10efc08e438e0 (diff) | |
| parent | d125d0eb528fbb51a04526cbf3d50dc51759e72c (diff) | |
Merge "SF: Fix emulator DPI" into rvc-dev
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index bc878871a0..2daecaebca 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -189,7 +189,7 @@ struct ConditionalLockGuard { using ConditionalLock = ConditionalLockGuard<Mutex>; // 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) { 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); return FALLBACK_DENSITY; } - return density / 160.f; + return density; } // 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 : FALLBACK_DENSITY; } + info->density /= ACONFIGURATION_DENSITY_MEDIUM; info->secure = display->isSecure(); info->deviceProductInfo = getDeviceProductInfoLocked(*display); |