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

Commit 10f48690 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove obsolete debug option"

parents 4319bd4a 2ec5391a
Loading
Loading
Loading
Loading
+0 −14
Original line number Original line Diff line number Diff line
@@ -539,20 +539,6 @@ bool BufferLayer::isProtected() const {
    return (buffer != 0) && (buffer->getUsage() & GRALLOC_USAGE_PROTECTED);
    return (buffer != 0) && (buffer->getUsage() & GRALLOC_USAGE_PROTECTED);
}
}


bool BufferLayer::latchUnsignaledBuffers() {
    static bool propertyLoaded = false;
    static bool latch = false;
    static std::mutex mutex;
    std::lock_guard<std::mutex> lock(mutex);
    if (!propertyLoaded) {
        char value[PROPERTY_VALUE_MAX] = {};
        property_get("debug.sf.latch_unsignaled", value, "0");
        latch = atoi(value);
        propertyLoaded = true;
    }
    return latch;
}

// h/w composer set-up
// h/w composer set-up
bool BufferLayer::allTransactionsSignaled(nsecs_t expectedPresentTime) {
bool BufferLayer::allTransactionsSignaled(nsecs_t expectedPresentTime) {
    const auto headFrameNumber = getHeadFrameNumber(expectedPresentTime);
    const auto headFrameNumber = getHeadFrameNumber(expectedPresentTime);
+0 −3
Original line number Original line Diff line number Diff line
@@ -187,9 +187,6 @@ protected:
    bool onPreComposition(nsecs_t) override;
    bool onPreComposition(nsecs_t) override;
    void preparePerFrameCompositionState() override;
    void preparePerFrameCompositionState() override;


    // Loads the corresponding system property once per process
    static bool latchUnsignaledBuffers();

    // Check all of the local sync points to ensure that all transactions
    // Check all of the local sync points to ensure that all transactions
    // which need to have been applied prior to the frame which is about to
    // which need to have been applied prior to the frame which is about to
    // be latched have signaled
    // be latched have signaled
+0 −4
Original line number Original line Diff line number Diff line
@@ -131,10 +131,6 @@ bool BufferQueueLayer::shouldPresentNow(nsecs_t expectedPresentTime) const {
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------


bool BufferQueueLayer::fenceHasSignaled() const {
bool BufferQueueLayer::fenceHasSignaled() const {
    if (latchUnsignaledBuffers()) {
        return true;
    }

    if (!hasFrameUpdate()) {
    if (!hasFrameUpdate()) {
        return true;
        return true;
    }
    }
+0 −4
Original line number Original line Diff line number Diff line
@@ -422,10 +422,6 @@ FloatRect BufferStateLayer::computeSourceBounds(const FloatRect& parentBounds) c
// Interface implementation for BufferLayer
// Interface implementation for BufferLayer
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
bool BufferStateLayer::fenceHasSignaled() const {
bool BufferStateLayer::fenceHasSignaled() const {
    if (latchUnsignaledBuffers()) {
        return true;
    }

    const bool fenceSignaled =
    const bool fenceSignaled =
            getDrawingState().acquireFence->getStatus() == Fence::Status::Signaled;
            getDrawingState().acquireFence->getStatus() == Fence::Status::Signaled;
    if (!fenceSignaled) {
    if (!fenceSignaled) {
+2 −9
Original line number Original line Diff line number Diff line
@@ -399,10 +399,6 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI
    int debugDdms = atoi(value);
    int debugDdms = atoi(value);
    ALOGI_IF(debugDdms, "DDMS debugging not supported");
    ALOGI_IF(debugDdms, "DDMS debugging not supported");


    property_get("debug.sf.disable_backpressure", value, "0");
    mPropagateBackpressure = !atoi(value);
    ALOGI_IF(!mPropagateBackpressure, "Disabling backpressure propagation");

    property_get("debug.sf.enable_gl_backpressure", value, "0");
    property_get("debug.sf.enable_gl_backpressure", value, "0");
    mPropagateBackpressureClientComposition = atoi(value);
    mPropagateBackpressureClientComposition = atoi(value);
    ALOGI_IF(mPropagateBackpressureClientComposition,
    ALOGI_IF(mPropagateBackpressureClientComposition,
@@ -1842,10 +1838,7 @@ void SurfaceFlinger::onMessageInvalidate(nsecs_t expectedVSyncTime) {
    // for the present fence to fire instead of just giving up on this frame to handle cases
    // for the present fence to fire instead of just giving up on this frame to handle cases
    // where present fence is just about to get signaled.
    // where present fence is just about to get signaled.
    const int graceTimeForPresentFenceMs =
    const int graceTimeForPresentFenceMs =
            (mPropagateBackpressure &&
            (mPropagateBackpressureClientComposition || !mHadClientComposition) ? 1 : 0;
             (mPropagateBackpressureClientComposition || !mHadClientComposition))
            ? 1
            : 0;


    // Pending frames may trigger backpressure propagation.
    // Pending frames may trigger backpressure propagation.
    const TracedOrdinal<bool> framePending = {"PrevFramePending",
    const TracedOrdinal<bool> framePending = {"PrevFramePending",
@@ -1904,7 +1897,7 @@ void SurfaceFlinger::onMessageInvalidate(nsecs_t expectedVSyncTime) {
        ON_MAIN_THREAD(setActiveConfigInternal());
        ON_MAIN_THREAD(setActiveConfigInternal());
    }
    }


    if (framePending && mPropagateBackpressure) {
    if (framePending) {
        if ((hwcFrameMissed && !gpuFrameMissed) || mPropagateBackpressureClientComposition) {
        if ((hwcFrameMissed && !gpuFrameMissed) || mPropagateBackpressureClientComposition) {
            signalLayerUpdate();
            signalLayerUpdate();
            return;
            return;
Loading