hwc: gpu_tonemapper: Create Secure EGL Context

- HWC tonemapper passes secure flag to GPU tonemapper to create object
  with secure EGL context.
- Tonemapper object gets created with secure EGL context for the tone
  mapping of secure HDR layer.

CRs-Fixed: 2048764
Change-Id: I7129505283527dbab17f1e9731d8f141b48bb310
diff --git a/gpu_tonemapper/Tonemapper.cpp b/gpu_tonemapper/Tonemapper.cpp
index c6646f6..981863d 100644
--- a/gpu_tonemapper/Tonemapper.cpp
+++ b/gpu_tonemapper/Tonemapper.cpp
@@ -65,7 +65,7 @@
 
 //-----------------------------------------------------------------------------
 Tonemapper *Tonemapper::build(int type, void *colorMap, int colorMapSize, void *lutXform,
-                              int lutXformSize)
+                              int lutXformSize, bool isSecure)
 //-----------------------------------------------------------------------------
 {
   if (colorMapSize <= 0) {
@@ -76,7 +76,7 @@
   // build new tonemapper
   Tonemapper *tonemapper = new Tonemapper();
 
-  tonemapper->engineContext = engine_initialize();
+  tonemapper->engineContext = engine_initialize(isSecure);
 
   void* caller_context = engine_backup();
   engine_bind(tonemapper->engineContext);