am 39de4584: Merge "Compare GraphicBuffers using handles." into honeycomb

* commit '39de45846cd9431e9fc1ee44591152bc566f9858':
  Compare GraphicBuffers using handles.
This commit is contained in:
Jamie Gennis 2011-01-15 17:03:28 -08:00 committed by Android Git Automerger
commit 1cec8c0c15

View File

@ -111,7 +111,7 @@ int SurfaceTextureClient::cancelBuffer(android_native_buffer_t* buffer) {
LOGV("SurfaceTextureClient::cancelBuffer");
Mutex::Autolock lock(mMutex);
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
if (mSlots[i].get() == buffer) {
if (mSlots[i]->handle == buffer->handle) {
mSurfaceTexture->cancelBuffer(i);
return OK;
}
@ -129,7 +129,7 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
LOGV("SurfaceTextureClient::queueBuffer");
Mutex::Autolock lock(mMutex);
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
if (mSlots[i].get() == GraphicBuffer::getSelf(buffer)) {
if (mSlots[i]->handle == buffer->handle) {
return mSurfaceTexture->queueBuffer(i);
}
}