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

Commit e5a06e09 authored by Ana Krulec's avatar Ana Krulec
Browse files

SF: Adding sysprop flag for video detection

The flag will be turned on in a new CL.

Test: manual
Bug: 126272046

Change-Id: Ie15c0abbde641a731616cf94b076e43feafe7bc7
parent fefd6ae0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -370,8 +370,13 @@ SurfaceFlinger::SurfaceFlinger(surfaceflinger::Factory& factory)
    auto listSize = property_get_int32("debug.sf.max_igbp_list_size", int32_t(defaultListSize));
    mMaxGraphicBufferProducerListSize = (listSize > 0) ? size_t(listSize) : defaultListSize;

    mUseSmart90ForVideo = use_smart_90_for_video(false);
    property_get("debug.sf.use_smart_90_for_video", value, "0");
    mUseSmart90ForVideo = atoi(value);

    int int_value = atoi(value);
    if (int_value) {
        mUseSmart90ForVideo = true;
    }

    property_get("debug.sf.luma_sampling", value, "1");
    mLumaSampling = atoi(value);
+8 −0
Original line number Diff line number Diff line
@@ -217,6 +217,14 @@ int32_t set_idle_timer_ms(int32_t defaultValue) {
    return defaultValue;
}

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

#define DISPLAY_PRIMARY_SIZE 3

constexpr float kSrgbRedX = 0.4123f;
+2 −0
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ int32_t wcg_composition_pixel_format(

int32_t set_idle_timer_ms(int32_t defaultValue);

bool use_smart_90_for_video(bool defaultValue);

android::ui::DisplayPrimaries getDisplayNativePrimaries();
} // namespace sysprop
} // namespace android
+10 −0
Original line number Diff line number Diff line
@@ -297,3 +297,13 @@ prop {
    access: Readonly
    prop_name: "ro.surface_flinger.set_idle_timer_ms"
}

# useSmart90ForVideo indicates whether Scheduler should detect content FPS, and try to adjust the
# screen refresh rate based on that.
prop {
    api_name: "use_smart_90_for_video"
    type: Boolean
    scope: Internal
    access: Readonly
    prop_name: "ro.surface_flinger.use_smart_90_for_video"
}