summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-11-17 17:12:45 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-17 17:12:45 -0800
commit8bf35429f91358bb0da47f6d298378f584411ca3 (patch)
treed9605779a6f79c79478dfbfd15fa01cad96095d4 /libs
parent3cb3e21339b17a62e7af50c3be3cdb7d8dc4dfb1 (diff)
parent2ba13186b268de3527af6da1933a4b65877548d9 (diff)
downloadframeworks_base-8bf35429f91358bb0da47f6d298378f584411ca3.zip
frameworks_base-8bf35429f91358bb0da47f6d298378f584411ca3.tar.gz
frameworks_base-8bf35429f91358bb0da47f6d298378f584411ca3.tar.bz2
am 2ba13186: Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1
* commit '2ba13186b268de3527af6da1933a4b65877548d9': SurfaceTexture: fix a bug with buffer reallocation
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/SurfaceTexture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 3c0d475..0561909 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -437,6 +437,11 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
mSlots[buf].mEglImage = EGL_NO_IMAGE_KHR;
mSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
}
+ if (mCurrentTexture == buf) {
+ // The current texture no longer references the buffer in this slot
+ // since we just allocated a new buffer.
+ mCurrentTexture = INVALID_BUFFER_SLOT;
+ }
returnFlags |= ISurfaceTexture::BUFFER_NEEDS_REALLOCATION;
}
ST_LOGV("dequeueBuffer: returning slot=%d buf=%p flags=%#x", buf,