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

Commit e5af068f 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

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

Change-Id: Ia06b36daaa1ca5de67041c6c5f5f6335bc0107e6
parents 99656856 90b688e0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -562,6 +562,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
@@ -126,6 +126,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
@@ -6858,7 +6858,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);
        }
    }