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

Commit 70dcb1b1 authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "surfacetexture: Add API to set the min undequeued buffer count"

This reverts commit 7523410a.

Revert "Allow 3+ undequeued buffers for SurfaceTextureLayer"

This reverts commit 3c77f875.
parent b0f55352
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -34,11 +34,7 @@ namespace android {

class BufferQueue : public BnSurfaceTexture {
public:
#ifdef QCOM_HARDWARE
    enum { MIN_UNDEQUEUED_BUFFERS = 3 };
#else
    enum { MIN_UNDEQUEUED_BUFFERS = 2 };
#endif
    enum { NUM_BUFFER_SLOTS = 32 };
    enum { NO_CONNECTED_API = 0 };
    enum { INVALID_BUFFER_SLOT = -1 };
@@ -147,8 +143,6 @@ public:
    // for interlaced use cases where the user can pass extra information about
    // the type of the frame whether it is interlaced or progressive frame.
    virtual status_t setBuffersSize(int size);

    virtual status_t setMinUndequeuedBufferCount(int count);
#endif

    // connect attempts to connect a producer client API to the BufferQueue.
+0 −2
Original line number Diff line number Diff line
@@ -154,8 +154,6 @@ protected:
   // for interlaced use cases where the user can pass extra information about
   // the type of the frame whether it is interlaced or progressive frame.
    virtual status_t setBuffersSize(int size) = 0;

    virtual status_t setMinUndequeuedBufferCount(int count) = 0;
#endif

    // connect attempts to connect a client API to the SurfaceTexture.  This
+0 −2
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ private:
    int dispatchSetUsage(va_list args);
#ifdef QCOM_HARDWARE
    int dispatchSetBuffersSize(va_list args);
    int dispatchSetMinUndequeuedBufferCount(va_list args);
#endif
    int dispatchLock(va_list args);
    int dispatchUnlockAndPost(va_list args);
@@ -99,7 +98,6 @@ protected:
    virtual int setSwapInterval(int interval);
#ifdef QCOM_HARDWARE
    virtual int setBuffersSize(int size);
    virtual int setMinUndequeuedBufferCount(int count);
#endif

    virtual int connect(int api);
+1 −10
Original line number Diff line number Diff line
@@ -105,8 +105,6 @@ BufferQueue::BufferQueue( bool allowSynchronousMode, int bufferCount ) :
    mConsumerName = String8::format("unnamed-%d-%d", getpid(), createProcessUniqueId());

    ST_LOGV("BufferQueue");

    ALOGI("BufferQueue: minUndequeued=%d", mMinUndequeuedBuffers);
    sp<ISurfaceComposer> composer(ComposerService::getComposerService());
    mGraphicBufferAlloc = composer->createGraphicBufferAlloc();
    if (mGraphicBufferAlloc == 0) {
@@ -182,7 +180,7 @@ status_t BufferQueue::setTransformHint(uint32_t hint) {
}

status_t BufferQueue::setBufferCount(int bufferCount) {
    ALOGI("setBufferCount: count=%d", bufferCount);
    ST_LOGV("setBufferCount: count=%d", bufferCount);

    sp<ConsumerListener> listener;
    {
@@ -245,13 +243,6 @@ status_t BufferQueue::setBuffersSize(int size) {
    mGraphicBufferAlloc->setGraphicBufferSize(size);
    return NO_ERROR;
}

status_t BufferQueue::setMinUndequeuedBufferCount(int count) {
    ALOGI("setMinUndequeuedBufferCount: count=%d", count);
    Mutex::Autolock lock(mMutex);
    mMinUndequeuedBuffers = count;
    return NO_ERROR;
}
#endif

int BufferQueue::query(int what, int* outValue)
+0 −20
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ enum {
    SET_SYNCHRONOUS_MODE,
#ifdef QCOM_HARDWARE
    SET_BUFFERS_SIZE,
    SET_MIN_UNDEQUEUED_BUFFER_COUNT,
#endif
    CONNECT,
    DISCONNECT,
@@ -161,18 +160,6 @@ public:
        result = reply.readInt32();
        return result;
    }

    virtual status_t setMinUndequeuedBufferCount(int count) {
        Parcel data, reply;
        data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
        data.writeInt32(count);
        status_t result = remote()->transact(SET_MIN_UNDEQUEUED_BUFFER_COUNT, data, &reply);
        if (result != NO_ERROR) {
            return result;
        }
        result = reply.readInt32();
        return result;
    }
#endif

    virtual status_t connect(int api, QueueBufferOutput* output) {
@@ -283,13 +270,6 @@ status_t BnSurfaceTexture::onTransact(
            reply->writeInt32(res);
            return NO_ERROR;
        } break;
        case SET_MIN_UNDEQUEUED_BUFFER_COUNT: {
            CHECK_INTERFACE(ISurfaceTexture, data, reply);
            int size = data.readInt32();
            status_t res = setMinUndequeuedBufferCount(size);
            reply->writeInt32(res);
            return NO_ERROR;
        } break;
#endif
        case CONNECT: {
            CHECK_INTERFACE(ISurfaceTexture, data, reply);
Loading