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

Commit 79f31011 authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

Merge "SF: fix BufferTX counter for null buffers" into sc-dev am: 90b688e0 am: e5af068f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15240586

Change-Id: I0d0bbf57f2842b57f457969f91d9b59bf8c33401
parents 5ed4f5f2 e5af068f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -564,6 +564,10 @@ bool layer_state_t::hasBufferChanges() const {
    return (what & layer_state_t::eBufferChanged) || (what & layer_state_t::eCachedBufferChanged);
}

bool layer_state_t::hasValidBuffer() const {
    return buffer || cachedBuffer.isValid();
}

status_t layer_state_t::matrix22_t::write(Parcel& output) const {
    SAFE_PARCEL(output.writeFloat, dsdx);
    SAFE_PARCEL(output.writeFloat, dtdx);
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ struct layer_state_t {
    status_t write(Parcel& output) const;
    status_t read(const Parcel& input);
    bool hasBufferChanges() const;
    bool hasValidBuffer() const;

    struct matrix22_t {
        float dsdx{0};
+1 −1
Original line number Diff line number Diff line
@@ -6832,7 +6832,7 @@ int SurfaceFlinger::getMaxAcquiredBufferCountForRefreshRate(Fps refreshRate) con
void SurfaceFlinger::TransactionState::traverseStatesWithBuffers(
        std::function<void(const layer_state_t&)> visitor) {
    for (const auto& state : states) {
        if (state.state.hasBufferChanges() && (state.state.surface)) {
        if (state.state.hasBufferChanges() && state.state.hasValidBuffer() && state.state.surface) {
            visitor(state.state);
        }
    }