diff options
author | Rajesh Yadav <ryadav@codeaurora.org> | 2017-01-06 12:31:07 +0530 |
---|---|---|
committer | Rajesh Yadav <ryadav@codeaurora.org> | 2017-01-06 14:33:15 +0530 |
commit | dbb86f2da6f9fcc126e5be160722a38014347319 (patch) | |
tree | f723d2f27aee66809ef8a1ece933c21c0b227607 /gpu_tonemapper | |
parent | 063f9b6fcfab4c3cba2f45018a3e1c2db32ee945 (diff) | |
download | display-dbb86f2da6f9fcc126e5be160722a38014347319.tar.gz |
gpu_tonemapper: Free eglImage on termination
Buffers used for gpu tone mapping were getting
leaked as eglImage was not destroyed.
Free eglImage on termination.
Change-Id: I4473bc01efd2d7c8e19b7d3cbcd8330eff591081
Crs-fixed: 1106899
Diffstat (limited to 'gpu_tonemapper')
-rw-r--r-- | gpu_tonemapper/EGLImageBuffer.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gpu_tonemapper/EGLImageBuffer.cpp b/gpu_tonemapper/EGLImageBuffer.cpp index e64e16fd..3ed236b1 100644 --- a/gpu_tonemapper/EGLImageBuffer.cpp +++ b/gpu_tonemapper/EGLImageBuffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright 2015 The Android Open Source Project @@ -74,6 +74,13 @@ EGLImageBuffer::~EGLImageBuffer() GL(glDeleteFramebuffers(1, &framebufferID)); framebufferID = 0; } + + // Delete the eglImage + if (eglImageID != 0) + { + eglDestroyImageKHR(eglGetCurrentDisplay(), eglImageID); + eglImageID = 0; + } } //----------------------------------------------------------------------------- |