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

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

Merge "Revert "Cache NATIVE_WINDOW_MAX_BUFFER_COUNT in Surface""

parents 3a74f6e1 b2b26909
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1199,7 +1199,6 @@ status_t BufferQueueProducer::connect(const sp<IProducerListener>& listener,
                    static_cast<uint32_t>(mCore->mQueue.size());
            output->nextFrameNumber = mCore->mFrameCounter + 1;
            output->bufferReplaced = false;
            output->maxBufferCount = mCore->mMaxBufferCount;

            if (listener != nullptr) {
                // Set up a death notification so that we can disconnect
+0 −6
Original line number Diff line number Diff line
@@ -96,7 +96,6 @@ Surface::Surface(const sp<IGraphicBufferProducer>& bufferProducer, bool controll
    mConnectedToCpu = false;
    mProducerControlledByApp = controlledByApp;
    mSwapIntervalZero = false;
    mMaxBufferCount = 0;
}

Surface::~Surface() {
@@ -962,10 +961,6 @@ int Surface::query(int what, int* value) const {
                *value = static_cast<int>(mDataSpace);
                return NO_ERROR;
            }
            case NATIVE_WINDOW_MAX_BUFFER_COUNT: {
                *value = mMaxBufferCount;
                return NO_ERROR;
            }
        }
    }
    return mGraphicBufferProducer->query(what, value);
@@ -1303,7 +1298,6 @@ int Surface::connect(
        mDefaultWidth = output.width;
        mDefaultHeight = output.height;
        mNextFrameNumber = output.nextFrameNumber;
        mMaxBufferCount = output.maxBufferCount;

        // Ignore transform hint if sticky transform is set or transform to display inverse flag is
        // set. Transform hint should be ignored if the client is expected to always submit buffers
+0 −1
Original line number Diff line number Diff line
@@ -412,7 +412,6 @@ public:
        uint64_t nextFrameNumber{0};
        FrameEventHistoryDelta frameTimestamps;
        bool bufferReplaced{false};
        int maxBufferCount{0};
    };

    virtual status_t queueBuffer(int slot, const QueueBufferInput& input,
+0 −1
Original line number Diff line number Diff line
@@ -465,7 +465,6 @@ protected:

    bool mReportRemovedBuffers = false;
    std::vector<sp<GraphicBuffer>> mRemovedBuffers;
    int mMaxBufferCount;
};

} // namespace android