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

Commit 68eef91f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8233919 from 80f319d7 to tm-release

Change-Id: I74a1809849c28bc769455d02f2022dcf18bcff96
parents 5ab9cad3 80f319d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ void convertToSensorEvent(const Event &src, sensors_event_t *dst) {
                    break;
                }
                default: {
                    ALOGE("Invalid sensor additional info tag: %d", srcInfo.payload.getTag());
                    ALOGE("Invalid sensor additional info tag: %d", (int)srcInfo.payload.getTag());
                }
            }
            break;
+16 −1
Original line number Diff line number Diff line
@@ -500,6 +500,8 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    if (!mIsUserBuild && base::GetBoolProperty("debug.sf.enable_transaction_tracing"s, true)) {
        mTransactionTracing.emplace();
    }

    mIgnoreHdrCameraLayers = ignore_hdr_camera_layers(false);
}

LatchUnsignaledConfig SurfaceFlinger::getLatchUnsignaledConfig() {
@@ -2376,6 +2378,19 @@ void SurfaceFlinger::setCompositorTimingSnapped(const DisplayStatInfo& stats,
    getBE().mCompositorTiming.presentLatency = snappedCompositeToPresentLatency;
}

bool SurfaceFlinger::isHdrLayer(Layer* layer) const {
    if (!isHdrDataspace(layer->getDataSpace())) {
        return false;
    }
    if (mIgnoreHdrCameraLayers) {
        auto buffer = layer->getBuffer();
        if (buffer && (buffer->getUsage() & GRALLOC_USAGE_HW_CAMERA_WRITE) != 0) {
            return false;
        }
    }
    return true;
}

void SurfaceFlinger::postComposition() {
    ATRACE_CALL();
    ALOGV("postComposition");
@@ -2461,7 +2476,7 @@ void SurfaceFlinger::postComposition() {
            mDrawingState.traverse([&, compositionDisplay = compositionDisplay](Layer* layer) {
                const auto layerFe = layer->getCompositionEngineLayerFE();
                if (layer->isVisible() && compositionDisplay->includesLayer(layerFe)) {
                    if (isHdrDataspace(layer->getDataSpace())) {
                    if (isHdrLayer(layer)) {
                        const auto* outputLayer =
                            compositionDisplay->getOutputLayerForLayer(layerFe);
                        if (outputLayer) {
+3 −0
Original line number Diff line number Diff line
@@ -1131,6 +1131,8 @@ private:
    void updateInternalDisplayVsyncLocked(const sp<DisplayDevice>& activeDisplay)
            REQUIRES(mStateLock);

    bool isHdrLayer(Layer* layer) const;

    sp<StartPropertySetThread> mStartPropertySetThread;
    surfaceflinger::Factory& mFactory;
    pid_t mPid;
@@ -1179,6 +1181,7 @@ private:
    // Used to ensure we omit a callback when HDR layer info listener is newly added but the
    // scene hasn't changed
    bool mAddingHDRLayerInfoListener = false;
    bool mIgnoreHdrCameraLayers = false;

    // Set during transaction application stage to track if the input info or children
    // for a layer has changed.
+4 −0
Original line number Diff line number Diff line
@@ -371,5 +371,9 @@ bool enable_layer_caching(bool defaultValue) {
    return SurfaceFlingerProperties::enable_layer_caching().value_or(defaultValue);
}

bool ignore_hdr_camera_layers(bool defaultValue) {
    return SurfaceFlingerProperties::ignore_hdr_camera_layers().value_or(defaultValue);
}

} // namespace sysprop
} // namespace android
+2 −0
Original line number Diff line number Diff line
@@ -100,6 +100,8 @@ bool enable_layer_caching(bool defaultValue);

bool enable_sdr_dimming(bool defaultValue);

bool ignore_hdr_camera_layers(bool defaultValue);

} // namespace sysprop
} // namespace android
#endif // SURFACEFLINGERPROPERTIES_H_
Loading