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

Commit 4d5e98a1 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "[sf] Add bufferless surfaceframe to frametime in new fe" into main

parents 8731ebd2 c1d19d7c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -835,12 +835,12 @@ uint32_t Layer::doTransaction(uint32_t flags) {
        mFlinger->mUpdateInputInfo = true;
    }

    commitTransaction(mDrawingState);
    commitTransaction();

    return flags;
}

void Layer::commitTransaction(State&) {
void Layer::commitTransaction() {
    // Set the present state for all bufferlessSurfaceFramesTX to Presented. The
    // bufferSurfaceFrameTX will be presented in latchBuffer.
    for (auto& [token, surfaceFrame] : mDrawingState.bufferlessSurfaceFramesTX) {
+1 −1
Original line number Diff line number Diff line
@@ -910,6 +910,7 @@ public:
    void setTransformHint(std::optional<ui::Transform::RotationFlags> transformHint) {
        mTransformHint = transformHint;
    }
    void commitTransaction();
    // Keeps track of the previously presented layer stacks. This is used to get
    // the release fences from the correct displays when we release the last buffer
    // from the layer.
@@ -930,7 +931,6 @@ protected:
    void preparePerFrameCompositionState();
    void preparePerFrameBufferCompositionState();
    void preparePerFrameEffectsCompositionState();
    virtual void commitTransaction(State& stateToCommit);
    void gatherBufferInfo();
    void onSurfaceFrameCreated(const std::shared_ptr<frametimeline::SurfaceFrame>&);

+1 −0
Original line number Diff line number Diff line
@@ -2337,6 +2337,7 @@ bool SurfaceFlinger::updateLayerSnapshots(VsyncId vsyncId, nsecs_t frameTimeNs,
    if (!mLegacyFrontEndEnabled) {
        ATRACE_NAME("DisplayCallbackAndStatsUpdates");
        applyTransactions(update.transactions, vsyncId);
        traverseLegacyLayers([&](Layer* layer) { layer->commitTransaction(); });
        const nsecs_t latchTime = systemTime();
        bool unused = false;

+1 −2
Original line number Diff line number Diff line
@@ -99,8 +99,7 @@ void RefreshRateSelectionTest::setParent(Layer* child, Layer* parent) {
}

void RefreshRateSelectionTest::commitTransaction(Layer* layer) {
    auto c = layer->getDrawingState();
    layer->commitTransaction(c);
    layer->commitTransaction();
}

namespace {
+1 −2
Original line number Diff line number Diff line
@@ -85,8 +85,7 @@ void SetFrameRateTest::removeChild(sp<Layer> layer, sp<Layer> child) {

void SetFrameRateTest::commitTransaction() {
    for (auto layer : mLayers) {
        auto c = layer->getDrawingState();
        layer->commitTransaction(c);
        layer->commitTransaction();
    }
}

Loading