DO NOT MERGE Add ANativeWindow dataSpace; update graphics formats, color spaces

First stage of adding a new dataSpace field for ANativeWindow,
for communicating format- (and endpoint-) dependent information
about graphics buffers. For most formats, dataSpace describes the
color space of the buffer, while format describes the memory layout.

For some formats, the dataSpace may also specify that the buffer
contains depth measurements, encoded images, or other kinds of
information that is not necessarily a simple 2D image.
Rename the existing colorspace enumeration to dataspace, with an added
dataspace for depth, and sRGB gamma-corrected and linear colorspaces.

Add in a definition for Android depth point clouds as a
variable-length list of float-triplet coordinates, as the underlying
layout of buffers with format HAL_PIXEL_FORMAT_BLOB and dataSpace of
HAL_DATASPACE_DEPTH.

Also remove now-unnecessary sRGB HAL graphics formats, and remove the
alias RAW_SENSOR that was left in to ease transition to RAW16.

Cherry pick of I8797f67fb9c2b18da5975f2145303ca0bf98e62d with the
following diff to maintain source compatibility:

@@ -58,6 +58,11 @@ enum {
     HAL_PIXEL_FORMAT_RGB_565            = 4,
     HAL_PIXEL_FORMAT_BGRA_8888          = 5,

+    // Deprecated sRGB formats for source code compatibility
+    // Not for use in new code
+    HAL_PIXEL_FORMAT_sRGB_A_8888        = 0xC,
+    HAL_PIXEL_FORMAT_sRGB_X_8888        = 0xD,
+
     /*
      * 0x100 - 0x1FF
      *
@@ -189,6 +194,9 @@ enum {
      */
     HAL_PIXEL_FORMAT_RAW16 = 0x20,

+    // Temporary alias for source code compatibility; do not use in new code
+    HAL_PIXEL_FORMAT_RAW_SENSOR = HAL_PIXEL_FORMAT_RAW16,
+
     /*
      * Android RAW10 format:
      *

Change-Id: I5c5ba98b297436f950e06a181eb0ff955747680f
2 files changed