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

Commit 82de19bc authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

Remove dead code around use_frame_rate_api

There's no se polixy for ro.surface_flinger.use_frame_rate_api
and it cannot be used by vendors, so the code is dead. Removing
it cos there isn't a use case for disabling this API.

Bug: 199911262
Test: n/a
Change-Id: I45aabf5ced73d565a5d7adc73971f3615dde0abe
parent ccfc0b73
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1157,9 +1157,6 @@ void Layer::updateTreeHasFrameRateVote() {
}

bool Layer::setFrameRate(FrameRate frameRate) {
    if (!mFlinger->useFrameRateApi) {
        return false;
    }
    if (mDrawingState.frameRate == frameRate) {
        return false;
    }
+0 −3
Original line number Diff line number Diff line
@@ -339,7 +339,6 @@ Dataspace SurfaceFlinger::defaultCompositionDataspace = Dataspace::V0_SRGB;
ui::PixelFormat SurfaceFlinger::defaultCompositionPixelFormat = ui::PixelFormat::RGBA_8888;
Dataspace SurfaceFlinger::wideColorGamutCompositionDataspace = Dataspace::V0_SRGB;
ui::PixelFormat SurfaceFlinger::wideColorGamutCompositionPixelFormat = ui::PixelFormat::RGBA_8888;
bool SurfaceFlinger::useFrameRateApi;
bool SurfaceFlinger::enableSdrDimming;
bool SurfaceFlinger::enableLatchUnsignaled;

@@ -494,8 +493,6 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
        android::hardware::details::setTrebleTestingOverride(true);
    }

    useFrameRateApi = use_frame_rate_api(true);

    mRefreshRateOverlaySpinner = property_get_bool("sf.debug.show_refresh_rate_overlay_spinner", 0);

    // Debug property overrides ro. property
+0 −5
Original line number Diff line number Diff line
@@ -246,11 +246,6 @@ public:
    static ui::Dataspace wideColorGamutCompositionDataspace;
    static ui::PixelFormat wideColorGamutCompositionPixelFormat;

    // Whether to use frame rate API when deciding about the refresh rate of the display. This
    // variable is caches in SF, so that we can check it with each layer creation, and a void the
    // overhead that is caused by reading from sysprop.
    static bool useFrameRateApi;

    static constexpr SkipInitializationTag SkipInitialization;

    // Whether or not SDR layers should be dimmed to the desired SDR white point instead of
+0 −8
Original line number Diff line number Diff line
@@ -304,14 +304,6 @@ bool support_kernel_idle_timer(bool defaultValue) {
    return defaultValue;
}

bool use_frame_rate_api(bool defaultValue) {
    auto temp = SurfaceFlingerProperties::use_frame_rate_api();
    if (temp.has_value()) {
        return *temp;
    }
    return defaultValue;
}

bool enable_sdr_dimming(bool defaultValue) {
    return SurfaceFlingerProperties::enable_sdr_dimming().value_or(defaultValue);
}
+0 −2
Original line number Diff line number Diff line
@@ -88,8 +88,6 @@ bool enable_protected_contents(bool defaultValue);

bool support_kernel_idle_timer(bool defaultValue);

bool use_frame_rate_api(bool defaultValue);

int32_t display_update_imminent_timeout_ms(int32_t defaultValue);

android::ui::DisplayPrimaries getDisplayNativePrimaries();
Loading