diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-02-02 02:16:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-02-02 02:16:34 +0000 |
commit | 433448527019306bebd8c6537de75bb249f6340b (patch) | |
tree | 6ffde233e72e37bd39218f9f531b898bc23a537b | |
parent | 5cc75e347f53b5a06b989a2a69bdba9831c2ec32 (diff) | |
parent | 80f7903418e022e11695fd9025e51659e5904fdb (diff) | |
download | native-433448527019306bebd8c6537de75bb249f6340b.tar.gz |
Merge "[surfacetexture] Add patch to release current EglImage"
-rw-r--r-- | libs/nativedisplay/surfacetexture/EGLConsumer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/nativedisplay/surfacetexture/EGLConsumer.cpp b/libs/nativedisplay/surfacetexture/EGLConsumer.cpp index 6882ea3090..0128859ca6 100644 --- a/libs/nativedisplay/surfacetexture/EGLConsumer.cpp +++ b/libs/nativedisplay/surfacetexture/EGLConsumer.cpp @@ -593,6 +593,10 @@ status_t EGLConsumer::doGLFenceWaitLocked(SurfaceTexture& st) const { } void EGLConsumer::onFreeBufferLocked(int slotIndex) { + if (mEglSlots[slotIndex].mEglImage != nullptr && + mEglSlots[slotIndex].mEglImage == mCurrentTextureImage) { + mCurrentTextureImage.clear(); + } mEglSlots[slotIndex].mEglImage.clear(); } |