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/Tonemapper.h b/gpu_tonemapper/Tonemapper.h
index 9c41670..0f9bd51 100644
--- a/gpu_tonemapper/Tonemapper.h
+++ b/gpu_tonemapper/Tonemapper.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
@@ -23,11 +23,14 @@
#define TONEMAP_FORWARD 0
#define TONEMAP_INVERSE 1
+#include "EGLImageWrapper.h"
+
class Tonemapper {
private:
unsigned int tonemapTexture;
unsigned int lutXformTexture;
unsigned int programID;
+ EGLImageWrapper* eglImageWrapper;
Tonemapper();
public: