gpu_tonemapper: Fix compilation issue with GraphicBuffer

Handle different version of GraphicBuffer with a compile time
flag.

CRs-Fixed: 1111917
Change-Id: I11aa6d64a8e61a4d7658cb5f924ee4dc38c40bc9
diff --git a/gpu_tonemapper/EGLImageWrapper.cpp b/gpu_tonemapper/EGLImageWrapper.cpp
index 298475f..1d5d57e 100644
--- a/gpu_tonemapper/EGLImageWrapper.cpp
+++ b/gpu_tonemapper/EGLImageWrapper.cpp
@@ -41,8 +41,12 @@
     }
 
     android::sp<android::GraphicBuffer> graphicBuffer =
-        new android::GraphicBuffer(src->width, src->height, src->format, flags,
-                                   src->width /*src->stride*/, native_handle, false);
+        new android::GraphicBuffer(src->width, src->height, src->format,
+#ifndef __NOUGAT__
+                                   1, // Layer count
+#endif
+                                   flags, src->width /*src->stride*/,
+                                   native_handle, false);
 
     result = new EGLImageBuffer(graphicBuffer);