Loading services/core/java/com/android/server/display/DisplayDevice.java +6 −7 Original line number Diff line number Diff line Loading @@ -82,21 +82,15 @@ abstract class DisplayDevice { // Do not use for any other purpose. DisplayDeviceInfo mDebugLastLoggedDeviceInfo; private final boolean mIsAnisotropyCorrectionEnabled; private boolean mIsAnisotropyCorrectionEnabled; DisplayDevice(DisplayAdapter displayAdapter, IBinder displayToken, String uniqueId, Context context) { this(displayAdapter, displayToken, uniqueId, context, false); } DisplayDevice(DisplayAdapter displayAdapter, IBinder displayToken, String uniqueId, Context context, boolean isAnisotropyCorrectionEnabled) { mDisplayAdapter = displayAdapter; mDisplayToken = displayToken; mUniqueId = uniqueId; mDisplayDeviceConfig = null; mContext = context; mIsAnisotropyCorrectionEnabled = isAnisotropyCorrectionEnabled; } /** Loading Loading @@ -463,6 +457,11 @@ abstract class DisplayDevice { pw.println("mCurrentLayerStackRect=" + mCurrentLayerStackRect); pw.println("mCurrentDisplayRect=" + mCurrentDisplayRect); pw.println("mCurrentSurface=" + mCurrentSurface); pw.println("mIsAnisotropyCorrectionEnabled=" + mIsAnisotropyCorrectionEnabled); } void setAnisotropyCorrectionEnabled(boolean enabled) { mIsAnisotropyCorrectionEnabled = enabled; } /** Loading services/core/java/com/android/server/display/LocalDisplayAdapter.java +1 −2 Original line number Diff line number Diff line Loading @@ -271,8 +271,7 @@ final class LocalDisplayAdapter extends DisplayAdapter { SurfaceControl.DynamicDisplayInfo dynamicInfo, SurfaceControl.DesiredDisplayModeSpecs modeSpecs, boolean isFirstDisplay) { super(LocalDisplayAdapter.this, displayToken, UNIQUE_ID_PREFIX + physicalDisplayId, getContext(), getFeatureFlags().isPixelAnisotropyCorrectionInLogicalDisplayEnabled()); getContext()); mPhysicalDisplayId = physicalDisplayId; mIsFirstDisplay = isFirstDisplay; updateDisplayPropertiesLocked(staticDisplayInfo, dynamicInfo, modeSpecs); Loading services/core/java/com/android/server/display/LogicalDisplay.java +10 −4 Original line number Diff line number Diff line Loading @@ -219,18 +219,17 @@ final class LogicalDisplay { * 3. If a setting on the display itself is set to "fill the entire display panel" then the * display will stretch the pixels to fill the display fully. */ private final boolean mIsAnisotropyCorrectionEnabled; private boolean mIsAnisotropyCorrectionEnabled; private final boolean mSyncedResolutionSwitchEnabled; private boolean mCanHostTasks; LogicalDisplay(int displayId, int layerStack, DisplayDevice primaryDisplayDevice) { this(displayId, layerStack, primaryDisplayDevice, false, false); this(displayId, layerStack, primaryDisplayDevice, false); } LogicalDisplay(int displayId, int layerStack, DisplayDevice primaryDisplayDevice, boolean isAnisotropyCorrectionEnabled, boolean isSyncedResolutionSwitchEnabled) { mDisplayId = displayId; mLayerStack = layerStack; Loading @@ -242,13 +241,17 @@ final class LogicalDisplay { mThermalBrightnessThrottlingDataId = DisplayDeviceConfig.DEFAULT_ID; mPowerThrottlingDataId = DisplayDeviceConfig.DEFAULT_ID; mBaseDisplayInfo.thermalBrightnessThrottlingDataId = mThermalBrightnessThrottlingDataId; mIsAnisotropyCorrectionEnabled = isAnisotropyCorrectionEnabled; mSyncedResolutionSwitchEnabled = isSyncedResolutionSwitchEnabled; // No need to initialize mCanHostTasks here; it's handled in // DisplayManagerService#setupLogicalDisplay(). } public void setAnisotropyCorrectionEnabled(boolean enabled) { mIsAnisotropyCorrectionEnabled = enabled; mPrimaryDisplayDevice.setAnisotropyCorrectionEnabled(enabled); } public void setDevicePositionLocked(int position) { if (mDevicePosition != position) { mDevicePosition = position; Loading Loading @@ -424,6 +427,9 @@ final class LogicalDisplay { return; } // TODO(b/375563565): Implement per-display setting to enable/disable anisotropy correction. setAnisotropyCorrectionEnabled(true); // Bootstrap the logical display using its associated primary physical display. // We might use more elaborate configurations later. It's possible that the // configuration of several physical displays might be used to determine the Loading services/core/java/com/android/server/display/LogicalDisplayMapper.java +0 −1 Original line number Diff line number Diff line Loading @@ -1314,7 +1314,6 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener { private LogicalDisplay createNewLogicalDisplayLocked(DisplayDevice device, int displayId) { final int layerStack = assignLayerStackLocked(displayId); final LogicalDisplay display = new LogicalDisplay(displayId, layerStack, device, mFlags.isPixelAnisotropyCorrectionInLogicalDisplayEnabled(), mFlags.isSyncedResolutionSwitchEnabled()); display.updateLocked(mDisplayDeviceRepo, mSyntheticModeManager); Loading services/core/java/com/android/server/display/feature/DisplayManagerFlags.java +0 −10 Original line number Diff line number Diff line Loading @@ -101,11 +101,6 @@ public class DisplayManagerFlags { Flags.FLAG_FAST_HDR_TRANSITIONS, Flags::fastHdrTransitions); private final FlagState mPixelAnisotropyCorrectionEnabled = new FlagState( Flags.FLAG_ENABLE_PIXEL_ANISOTROPY_CORRECTION, Flags::enablePixelAnisotropyCorrection ); private final FlagState mSensorBasedBrightnessThrottling = new FlagState( Flags.FLAG_SENSOR_BASED_BRIGHTNESS_THROTTLING, Flags::sensorBasedBrightnessThrottling Loading Loading @@ -357,10 +352,6 @@ public class DisplayManagerFlags { return mFastHdrTransitions.isEnabled(); } public boolean isPixelAnisotropyCorrectionInLogicalDisplayEnabled() { return mPixelAnisotropyCorrectionEnabled.isEnabled(); } public boolean isSensorBasedBrightnessThrottlingEnabled() { return mSensorBasedBrightnessThrottling.isEnabled(); } Loading Loading @@ -572,7 +563,6 @@ public class DisplayManagerFlags { pw.println(" " + mBrightnessWearBedtimeModeClamperFlagState); pw.println(" " + mAutoBrightnessModesFlagState); pw.println(" " + mFastHdrTransitions); pw.println(" " + mPixelAnisotropyCorrectionEnabled); pw.println(" " + mSensorBasedBrightnessThrottling); pw.println(" " + mRefactorDisplayPowerController); pw.println(" " + mDozeBrightnessStrategy); Loading Loading
services/core/java/com/android/server/display/DisplayDevice.java +6 −7 Original line number Diff line number Diff line Loading @@ -82,21 +82,15 @@ abstract class DisplayDevice { // Do not use for any other purpose. DisplayDeviceInfo mDebugLastLoggedDeviceInfo; private final boolean mIsAnisotropyCorrectionEnabled; private boolean mIsAnisotropyCorrectionEnabled; DisplayDevice(DisplayAdapter displayAdapter, IBinder displayToken, String uniqueId, Context context) { this(displayAdapter, displayToken, uniqueId, context, false); } DisplayDevice(DisplayAdapter displayAdapter, IBinder displayToken, String uniqueId, Context context, boolean isAnisotropyCorrectionEnabled) { mDisplayAdapter = displayAdapter; mDisplayToken = displayToken; mUniqueId = uniqueId; mDisplayDeviceConfig = null; mContext = context; mIsAnisotropyCorrectionEnabled = isAnisotropyCorrectionEnabled; } /** Loading Loading @@ -463,6 +457,11 @@ abstract class DisplayDevice { pw.println("mCurrentLayerStackRect=" + mCurrentLayerStackRect); pw.println("mCurrentDisplayRect=" + mCurrentDisplayRect); pw.println("mCurrentSurface=" + mCurrentSurface); pw.println("mIsAnisotropyCorrectionEnabled=" + mIsAnisotropyCorrectionEnabled); } void setAnisotropyCorrectionEnabled(boolean enabled) { mIsAnisotropyCorrectionEnabled = enabled; } /** Loading
services/core/java/com/android/server/display/LocalDisplayAdapter.java +1 −2 Original line number Diff line number Diff line Loading @@ -271,8 +271,7 @@ final class LocalDisplayAdapter extends DisplayAdapter { SurfaceControl.DynamicDisplayInfo dynamicInfo, SurfaceControl.DesiredDisplayModeSpecs modeSpecs, boolean isFirstDisplay) { super(LocalDisplayAdapter.this, displayToken, UNIQUE_ID_PREFIX + physicalDisplayId, getContext(), getFeatureFlags().isPixelAnisotropyCorrectionInLogicalDisplayEnabled()); getContext()); mPhysicalDisplayId = physicalDisplayId; mIsFirstDisplay = isFirstDisplay; updateDisplayPropertiesLocked(staticDisplayInfo, dynamicInfo, modeSpecs); Loading
services/core/java/com/android/server/display/LogicalDisplay.java +10 −4 Original line number Diff line number Diff line Loading @@ -219,18 +219,17 @@ final class LogicalDisplay { * 3. If a setting on the display itself is set to "fill the entire display panel" then the * display will stretch the pixels to fill the display fully. */ private final boolean mIsAnisotropyCorrectionEnabled; private boolean mIsAnisotropyCorrectionEnabled; private final boolean mSyncedResolutionSwitchEnabled; private boolean mCanHostTasks; LogicalDisplay(int displayId, int layerStack, DisplayDevice primaryDisplayDevice) { this(displayId, layerStack, primaryDisplayDevice, false, false); this(displayId, layerStack, primaryDisplayDevice, false); } LogicalDisplay(int displayId, int layerStack, DisplayDevice primaryDisplayDevice, boolean isAnisotropyCorrectionEnabled, boolean isSyncedResolutionSwitchEnabled) { mDisplayId = displayId; mLayerStack = layerStack; Loading @@ -242,13 +241,17 @@ final class LogicalDisplay { mThermalBrightnessThrottlingDataId = DisplayDeviceConfig.DEFAULT_ID; mPowerThrottlingDataId = DisplayDeviceConfig.DEFAULT_ID; mBaseDisplayInfo.thermalBrightnessThrottlingDataId = mThermalBrightnessThrottlingDataId; mIsAnisotropyCorrectionEnabled = isAnisotropyCorrectionEnabled; mSyncedResolutionSwitchEnabled = isSyncedResolutionSwitchEnabled; // No need to initialize mCanHostTasks here; it's handled in // DisplayManagerService#setupLogicalDisplay(). } public void setAnisotropyCorrectionEnabled(boolean enabled) { mIsAnisotropyCorrectionEnabled = enabled; mPrimaryDisplayDevice.setAnisotropyCorrectionEnabled(enabled); } public void setDevicePositionLocked(int position) { if (mDevicePosition != position) { mDevicePosition = position; Loading Loading @@ -424,6 +427,9 @@ final class LogicalDisplay { return; } // TODO(b/375563565): Implement per-display setting to enable/disable anisotropy correction. setAnisotropyCorrectionEnabled(true); // Bootstrap the logical display using its associated primary physical display. // We might use more elaborate configurations later. It's possible that the // configuration of several physical displays might be used to determine the Loading
services/core/java/com/android/server/display/LogicalDisplayMapper.java +0 −1 Original line number Diff line number Diff line Loading @@ -1314,7 +1314,6 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener { private LogicalDisplay createNewLogicalDisplayLocked(DisplayDevice device, int displayId) { final int layerStack = assignLayerStackLocked(displayId); final LogicalDisplay display = new LogicalDisplay(displayId, layerStack, device, mFlags.isPixelAnisotropyCorrectionInLogicalDisplayEnabled(), mFlags.isSyncedResolutionSwitchEnabled()); display.updateLocked(mDisplayDeviceRepo, mSyntheticModeManager); Loading
services/core/java/com/android/server/display/feature/DisplayManagerFlags.java +0 −10 Original line number Diff line number Diff line Loading @@ -101,11 +101,6 @@ public class DisplayManagerFlags { Flags.FLAG_FAST_HDR_TRANSITIONS, Flags::fastHdrTransitions); private final FlagState mPixelAnisotropyCorrectionEnabled = new FlagState( Flags.FLAG_ENABLE_PIXEL_ANISOTROPY_CORRECTION, Flags::enablePixelAnisotropyCorrection ); private final FlagState mSensorBasedBrightnessThrottling = new FlagState( Flags.FLAG_SENSOR_BASED_BRIGHTNESS_THROTTLING, Flags::sensorBasedBrightnessThrottling Loading Loading @@ -357,10 +352,6 @@ public class DisplayManagerFlags { return mFastHdrTransitions.isEnabled(); } public boolean isPixelAnisotropyCorrectionInLogicalDisplayEnabled() { return mPixelAnisotropyCorrectionEnabled.isEnabled(); } public boolean isSensorBasedBrightnessThrottlingEnabled() { return mSensorBasedBrightnessThrottling.isEnabled(); } Loading Loading @@ -572,7 +563,6 @@ public class DisplayManagerFlags { pw.println(" " + mBrightnessWearBedtimeModeClamperFlagState); pw.println(" " + mAutoBrightnessModesFlagState); pw.println(" " + mFastHdrTransitions); pw.println(" " + mPixelAnisotropyCorrectionEnabled); pw.println(" " + mSensorBasedBrightnessThrottling); pw.println(" " + mRefactorDisplayPowerController); pw.println(" " + mDozeBrightnessStrategy); Loading