diff options
author | Jamie Gennis <jgennis@google.com> | 2011-01-15 13:05:24 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-01-15 17:00:06 -0800 |
commit | 4559ea41d849714aba4dffeeb13aa9ee648b7327 (patch) | |
tree | d20d3a4940600ae1478dd6d722aa28f5dd97cc7c /libs/gui/SurfaceTextureClient.cpp | |
parent | a47aa87a19c733e28d9d2db1c4eb7f29d668db7b (diff) | |
download | frameworks_base-4559ea41d849714aba4dffeeb13aa9ee648b7327.zip frameworks_base-4559ea41d849714aba4dffeeb13aa9ee648b7327.tar.gz frameworks_base-4559ea41d849714aba4dffeeb13aa9ee648b7327.tar.bz2 |
Compare GraphicBuffers using handles.
This change fixes a bug in SurfaceTextureClient where GraphicBuffers
were being compared using pointer comparison rather than handles.
Change-Id: Ib8989af94be32d4efd86e020a732f5143088a863
Diffstat (limited to 'libs/gui/SurfaceTextureClient.cpp')
-rw-r--r-- | libs/gui/SurfaceTextureClient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp index 24cee24..0ed8be5 100644 --- a/libs/gui/SurfaceTextureClient.cpp +++ b/libs/gui/SurfaceTextureClient.cpp @@ -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); } } |