Revert "error out when SurfaceTexture APIs are called while not connected"

This reverts commit a04cda9986366ab480ad8008c4d923271b05d78e.

Conflicts:

	include/gui/SurfaceTexture.h
	libs/gui/SurfaceTexture.cpp

Change-Id: Ib655016462c496ee2a27f7cb33a6e8b18cfe684a
This commit is contained in:
Dave Burke 2011-08-11 13:46:47 +01:00
parent 45e323c87d
commit 4925ee11f9

View File

@ -154,10 +154,6 @@ status_t SurfaceTexture::setBufferCount(int bufferCount) {
LOGE("setBufferCount: SurfaceTexture has been abandoned!");
return NO_INIT;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("setBufferCount: SurfaceTexture is not connected!");
return NO_INIT;
}
if (bufferCount > NUM_BUFFER_SLOTS) {
LOGE("setBufferCount: bufferCount larger than slots available");
return BAD_VALUE;
@ -217,10 +213,6 @@ status_t SurfaceTexture::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
LOGE("requestBuffer: SurfaceTexture has been abandoned!");
return NO_INIT;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("requestBuffer: SurfaceTexture is not connected!");
return NO_INIT;
}
if (slot < 0 || mBufferCount <= slot) {
LOGE("requestBuffer: slot index out of range [0, %d]: %d",
mBufferCount, slot);
@ -252,10 +244,6 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
LOGE("dequeueBuffer: SurfaceTexture has been abandoned!");
return NO_INIT;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("dequeueBuffer: SurfaceTexture is not connected!");
return NO_INIT;
}
// We need to wait for the FIFO to drain if the number of buffer
// needs to change.
@ -446,10 +434,6 @@ status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp,
LOGE("queueBuffer: SurfaceTexture has been abandoned!");
return NO_INIT;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("queueBuffer: SurfaceTexture is not connected!");
return NO_INIT;
}
if (buf < 0 || buf >= mBufferCount) {
LOGE("queueBuffer: slot index out of range [0, %d]: %d",
mBufferCount, buf);
@ -520,10 +504,6 @@ void SurfaceTexture::cancelBuffer(int buf) {
LOGW("cancelBuffer: SurfaceTexture has been abandoned!");
return;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("cancelBuffer: SurfaceTexture is not connected!");
return;
}
if (buf < 0 || buf >= mBufferCount) {
LOGE("cancelBuffer: slot index out of range [0, %d]: %d",
@ -545,10 +525,6 @@ status_t SurfaceTexture::setCrop(const Rect& crop) {
LOGE("setCrop: SurfaceTexture has been abandoned!");
return NO_INIT;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("setCrop: SurfaceTexture is not connected!");
return NO_INIT;
}
mNextCrop = crop;
return OK;
}
@ -560,10 +536,6 @@ status_t SurfaceTexture::setTransform(uint32_t transform) {
LOGE("setTransform: SurfaceTexture has been abandoned!");
return NO_INIT;
}
if (mConnectedApi == NO_CONNECTED_API) {
LOGE("setTransform: SurfaceTexture is not connected!");
return NO_INIT;
}
mNextTransform = transform;
return OK;
}