Merge "Revert "error out when SurfaceTexture APIs are called while not connected""
This commit is contained in:
commit
544ea69c90
@ -154,10 +154,6 @@ status_t SurfaceTexture::setBufferCount(int bufferCount) {
|
|||||||
LOGE("setBufferCount: SurfaceTexture has been abandoned!");
|
LOGE("setBufferCount: SurfaceTexture has been abandoned!");
|
||||||
return NO_INIT;
|
return NO_INIT;
|
||||||
}
|
}
|
||||||
if (mConnectedApi == NO_CONNECTED_API) {
|
|
||||||
LOGE("setBufferCount: SurfaceTexture is not connected!");
|
|
||||||
return NO_INIT;
|
|
||||||
}
|
|
||||||
if (bufferCount > NUM_BUFFER_SLOTS) {
|
if (bufferCount > NUM_BUFFER_SLOTS) {
|
||||||
LOGE("setBufferCount: bufferCount larger than slots available");
|
LOGE("setBufferCount: bufferCount larger than slots available");
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
@ -217,10 +213,6 @@ status_t SurfaceTexture::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
|
|||||||
LOGE("requestBuffer: SurfaceTexture has been abandoned!");
|
LOGE("requestBuffer: SurfaceTexture has been abandoned!");
|
||||||
return NO_INIT;
|
return NO_INIT;
|
||||||
}
|
}
|
||||||
if (mConnectedApi == NO_CONNECTED_API) {
|
|
||||||
LOGE("requestBuffer: SurfaceTexture is not connected!");
|
|
||||||
return NO_INIT;
|
|
||||||
}
|
|
||||||
if (slot < 0 || mBufferCount <= slot) {
|
if (slot < 0 || mBufferCount <= slot) {
|
||||||
LOGE("requestBuffer: slot index out of range [0, %d]: %d",
|
LOGE("requestBuffer: slot index out of range [0, %d]: %d",
|
||||||
mBufferCount, slot);
|
mBufferCount, slot);
|
||||||
@ -252,10 +244,6 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
|
|||||||
LOGE("dequeueBuffer: SurfaceTexture has been abandoned!");
|
LOGE("dequeueBuffer: SurfaceTexture has been abandoned!");
|
||||||
return NO_INIT;
|
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
|
// We need to wait for the FIFO to drain if the number of buffer
|
||||||
// needs to change.
|
// needs to change.
|
||||||
@ -446,10 +434,6 @@ status_t SurfaceTexture::queueBuffer(int buf, int64_t timestamp,
|
|||||||
LOGE("queueBuffer: SurfaceTexture has been abandoned!");
|
LOGE("queueBuffer: SurfaceTexture has been abandoned!");
|
||||||
return NO_INIT;
|
return NO_INIT;
|
||||||
}
|
}
|
||||||
if (mConnectedApi == NO_CONNECTED_API) {
|
|
||||||
LOGE("queueBuffer: SurfaceTexture is not connected!");
|
|
||||||
return NO_INIT;
|
|
||||||
}
|
|
||||||
if (buf < 0 || buf >= mBufferCount) {
|
if (buf < 0 || buf >= mBufferCount) {
|
||||||
LOGE("queueBuffer: slot index out of range [0, %d]: %d",
|
LOGE("queueBuffer: slot index out of range [0, %d]: %d",
|
||||||
mBufferCount, buf);
|
mBufferCount, buf);
|
||||||
@ -520,10 +504,6 @@ void SurfaceTexture::cancelBuffer(int buf) {
|
|||||||
LOGW("cancelBuffer: SurfaceTexture has been abandoned!");
|
LOGW("cancelBuffer: SurfaceTexture has been abandoned!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mConnectedApi == NO_CONNECTED_API) {
|
|
||||||
LOGE("cancelBuffer: SurfaceTexture is not connected!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buf < 0 || buf >= mBufferCount) {
|
if (buf < 0 || buf >= mBufferCount) {
|
||||||
LOGE("cancelBuffer: slot index out of range [0, %d]: %d",
|
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!");
|
LOGE("setCrop: SurfaceTexture has been abandoned!");
|
||||||
return NO_INIT;
|
return NO_INIT;
|
||||||
}
|
}
|
||||||
if (mConnectedApi == NO_CONNECTED_API) {
|
|
||||||
LOGE("setCrop: SurfaceTexture is not connected!");
|
|
||||||
return NO_INIT;
|
|
||||||
}
|
|
||||||
mNextCrop = crop;
|
mNextCrop = crop;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -560,10 +536,6 @@ status_t SurfaceTexture::setTransform(uint32_t transform) {
|
|||||||
LOGE("setTransform: SurfaceTexture has been abandoned!");
|
LOGE("setTransform: SurfaceTexture has been abandoned!");
|
||||||
return NO_INIT;
|
return NO_INIT;
|
||||||
}
|
}
|
||||||
if (mConnectedApi == NO_CONNECTED_API) {
|
|
||||||
LOGE("setTransform: SurfaceTexture is not connected!");
|
|
||||||
return NO_INIT;
|
|
||||||
}
|
|
||||||
mNextTransform = transform;
|
mNextTransform = transform;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user