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

Commit e8c8be54 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5713042 from ee07312a to qt-qpr1-release

Change-Id: Id143721e5d37a1815246acaa9c40436a325ac670
parents d5b86347 ee07312a
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -311,6 +311,9 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    wideColorGamutCompositionPixelFormat =
            static_cast<ui::PixelFormat>(wcg_composition_pixel_format(ui::PixelFormat::RGBA_8888));

    mColorSpaceAgnosticDataspace =
            static_cast<ui::Dataspace>(color_space_agnostic_dataspace(Dataspace::UNKNOWN));

    useContextPriority = use_context_priority(true);

    auto tmpPrimaryDisplayOrientation = primary_display_orientation(
@@ -1879,7 +1882,14 @@ void SurfaceFlinger::calculateWorkingSet() {
            RenderIntent renderIntent;
            pickColorMode(displayDevice, &colorMode, &targetDataspace, &renderIntent);
            display->setColorMode(colorMode, targetDataspace, renderIntent);

            if (isHdrColorMode(colorMode)) {
                targetDataspace = Dataspace::UNKNOWN;
            } else if (mColorSpaceAgnosticDataspace != Dataspace::UNKNOWN) {
                targetDataspace = mColorSpaceAgnosticDataspace;
            }
        }

        for (auto& layer : displayDevice->getVisibleLayersSortedByZ()) {
            if (layer->isHdrY410()) {
                layer->forceClientComposition(displayDevice);
@@ -1906,9 +1916,7 @@ void SurfaceFlinger::calculateWorkingSet() {

            const auto& displayState = display->getState();
            layer->setPerFrameData(displayDevice, displayState.transform, displayState.viewport,
                                   displayDevice->getSupportedPerFrameMetadata(),
                                   isHdrColorMode(displayState.colorMode) ? Dataspace::UNKNOWN
                                                                          : targetDataspace);
                                   displayDevice->getSupportedPerFrameMetadata(), targetDataspace);
        }
    }

+1 −0
Original line number Diff line number Diff line
@@ -1115,6 +1115,7 @@ private:

    ui::Dataspace mDefaultCompositionDataspace;
    ui::Dataspace mWideColorGamutCompositionDataspace;
    ui::Dataspace mColorSpaceAgnosticDataspace;

    SurfaceFlingerBE mBE;
    std::unique_ptr<compositionengine::CompositionEngine> mCompositionEngine;
+8 −0
Original line number Diff line number Diff line
@@ -218,6 +218,14 @@ int32_t wcg_composition_pixel_format(PixelFormat defaultValue) {
    return static_cast<int32_t>(defaultValue);
}

int64_t color_space_agnostic_dataspace(Dataspace defaultValue) {
    auto temp = SurfaceFlingerProperties::color_space_agnostic_dataspace();
    if (temp.has_value()) {
        return *temp;
    }
    return static_cast<int64_t>(defaultValue);
}

int32_t set_idle_timer_ms(int32_t defaultValue) {
    auto temp = SurfaceFlingerProperties::set_idle_timer_ms();
    if (temp.has_value()) {
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ int64_t wcg_composition_dataspace(
int32_t wcg_composition_pixel_format(
        android::hardware::graphics::common::V1_2::PixelFormat defaultValue);

int64_t color_space_agnostic_dataspace(
        android::hardware::graphics::common::V1_2::Dataspace defaultValue);

int32_t set_idle_timer_ms(int32_t defaultValue);

int32_t set_touch_timer_ms(int32_t defaultValue);
+14 −0
Original line number Diff line number Diff line
@@ -251,6 +251,20 @@ prop {
    prop_name: "ro.surface_flinger.wcg_composition_pixel_format"
}

# colorSpaceAgnosticDataspace specifies the data space that
# SurfaceFlinger expects for surfaces which are color space agnostic.
# The variable works only when useColorManagement is specified. If
# unspecified, the data space follows what SurfaceFlinger expects for
# surfaces when useColorManagement is specified.

prop {
    api_name: "color_space_agnostic_dataspace"
    type: Long
    scope: System
    access: Readonly
    prop_name: "ro.surface_flinger.color_space_agnostic_dataspace"
}

# Return the native panel primary data. The data includes red, green,
# blue and white. The primary format is CIE 1931 XYZ color space.
# If unspecified, the primaries is sRGB gamut by default.
Loading