gpu_tonemapper: Clear EGLImage mappings in Tonemapper
Tonemapper does not clear the eglImage/fd mappings in the destructor,
which leads to incorrect usage of those fds, when a tone map session
gets deleted and a new session gets created, leading to artifcats.
CRs-Fixed: 1104823
Change-Id: I9697eff93f9e5f150796a582f471246bca3b2816
diff --git a/gpu_tonemapper/EGLImageWrapper.h b/gpu_tonemapper/EGLImageWrapper.h
index d7fc84b..90aaf58 100644
--- a/gpu_tonemapper/EGLImageWrapper.h
+++ b/gpu_tonemapper/EGLImageWrapper.h
@@ -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
@@ -24,11 +24,11 @@
#include "EGLImageBuffer.h"
class EGLImageWrapper {
- static std::map<int, EGLImageBuffer *> eglImageBufferMap;
+ std::map<int, EGLImageBuffer *> eglImageBufferMap;
public:
- static EGLImageBuffer *wrap(const void *pvt_handle);
- static void destroy();
+ EGLImageBuffer *wrap(const void *pvt_handle);
+ void destroy();
};
-#endif //__TONEMAPPER_EGLIMAGEWRAPPER_H__
\ No newline at end of file
+#endif //__TONEMAPPER_EGLIMAGEWRAPPER_H__