Skip to content
Browse files

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

This reverts commit 7523410.

Revert "Allow 3+ undequeued buffers for SurfaceTextureLayer"

This reverts commit 3c77f87.
  • Loading branch information...
1 parent 8f72c48 commit 77f53327482a2ac5dea215657be07a9c42c369e4 @cyanogen cyanogen committed with Whitehawkx Sep 5, 2012
View
6 include/gui/BufferQueue.h
@@ -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 @@ class BufferQueue : public BnSurfaceTexture {
// 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.
View
2 include/gui/ISurfaceTexture.h
@@ -154,8 +154,6 @@ class ISurfaceTexture : public IInterface
// 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
View
2 include/gui/SurfaceTextureClient.h
@@ -84,7 +84,6 @@ class SurfaceTextureClient
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 @@ class SurfaceTextureClient
virtual int setSwapInterval(int interval);
#ifdef QCOM_HARDWARE
virtual int setBuffersSize(int size);
- virtual int setMinUndequeuedBufferCount(int count);
#endif
virtual int connect(int api);
View
11 libs/gui/BufferQueue.cpp
@@ -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)
View
20 libs/gui/ISurfaceTexture.cpp
@@ -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 @@ class BpSurfaceTexture : public BpInterface<ISurfaceTexture>
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);
View
21 libs/gui/SurfaceTextureClient.cpp
@@ -353,9 +353,6 @@ int SurfaceTextureClient::perform(int operation, va_list args)
case NATIVE_WINDOW_SET_BUFFERS_SIZE:
res = dispatchSetBuffersSize(args);
break;
- case NATIVE_WINDOW_SET_MIN_UNDEQUEUED_BUFFER_COUNT:
- res = dispatchSetMinUndequeuedBufferCount(args);
- break;
#endif
case NATIVE_WINDOW_LOCK:
res = dispatchLock(args);
@@ -437,11 +434,6 @@ int SurfaceTextureClient::dispatchSetBuffersSize(va_list args) {
int size = va_arg(args, int);
return setBuffersSize(size);
}
-
-int SurfaceTextureClient::dispatchSetMinUndequeuedBufferCount(va_list args) {
- int count = va_arg(args, int);
- return setMinUndequeuedBufferCount(count);
-}
#endif
int SurfaceTextureClient::dispatchSetScalingMode(va_list args) {
@@ -632,19 +624,6 @@ int SurfaceTextureClient::setBuffersSize(int size)
status_t err = mSurfaceTexture->setBuffersSize(size);
return NO_ERROR;
}
-
-int SurfaceTextureClient::setMinUndequeuedBufferCount(int count)
-{
- ATRACE_CALL();
- ALOGV("SurfaceTextureClient::setMinUndequeuedBufferCount");
-
- if (count<0)
- return BAD_VALUE;
-
- Mutex::Autolock lock(mMutex);
- status_t err = mSurfaceTexture->setMinUndequeuedBufferCount(count);
- return NO_ERROR;
-}
#endif
int SurfaceTextureClient::setScalingMode(int mode)
View
3 services/surfaceflinger/SurfaceTextureLayer.cpp
@@ -28,8 +28,7 @@ namespace android {
SurfaceTextureLayer::SurfaceTextureLayer()
- : BufferQueue(true)
-{
+ : BufferQueue(true) {
}
SurfaceTextureLayer::~SurfaceTextureLayer() {

0 comments on commit 77f5332

Please sign in to comment.
Something went wrong with that request. Please try again.