Camera2: Use HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED

Align camera2's management of platform-opaque formats with rest of
framework. Instead of using CAMERA2_PIXEL_FORMAT_OPAQUE, use
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED as the format for both the
camera HAL and for gralloc, and depend on the gralloc usage flags to
let the gralloc module select the appropriate real format for specific
stream endpoints.

Add a new gralloc usage for ZSL mode, where the camera service will
hold a streaming circular buffer of opaque full-resolution images
during camera preview. Since this is an opaque format that needs to be
optimized for 30fps operation, need gralloc to be aware of this use
case.

Bug: 6243944
Change-Id: If7f2516649381ce9bcffe4e319b63cbc068f643f
diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h
index 86ed95c..4fdd2e6 100644
--- a/include/hardware/gralloc.h
+++ b/include/hardware/gralloc.h
@@ -80,6 +80,8 @@
     GRALLOC_USAGE_HW_CAMERA_WRITE       = 0x00020000,
     /* buffer will be read by the HW camera pipeline */
     GRALLOC_USAGE_HW_CAMERA_READ        = 0x00040000,
+    /* buffer will be used as part of zero-shutter-lag queue */
+    GRALLOC_USAGE_HW_CAMERA_ZSL         = 0x00080000,
     /* mask for the software usage bit-mask */
     GRALLOC_USAGE_HW_MASK               = 0x00071F00,