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

Commit 4153fa44 authored by Oleg Blinnikov's avatar Oleg Blinnikov Committed by Android (Google) Code Review
Browse files

Merge "Remove enable_pixel_anisotropy_correction flag" into main

parents d9314af4 f3dd1bf9
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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;
    }

    /**
@@ -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;
    }

    /**
+1 −2
Original line number Diff line number Diff line
@@ -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);
+10 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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);

+0 −10
Original line number Diff line number Diff line
@@ -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
@@ -357,10 +352,6 @@ public class DisplayManagerFlags {
        return mFastHdrTransitions.isEnabled();
    }

    public boolean isPixelAnisotropyCorrectionInLogicalDisplayEnabled() {
        return mPixelAnisotropyCorrectionEnabled.isEnabled();
    }

    public boolean isSensorBasedBrightnessThrottlingEnabled() {
        return mSensorBasedBrightnessThrottling.isEnabled();
    }
@@ -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