gralloc: Mark buffers used by HWC

Some clients need to distinguish between buffers going to HWC
for composition and other regular buffers.

Change-Id: Ia05a765afe2f8bd223f3e47edd0fb746d6ade531
gralloc: Mark buffers used by HW Texture

Consumer of gralloc buffers need to distinguish between buffers
with different usage flags, such as HW_TEXTURE vs VIDEO_ENCODER.

Change-Id: Idc330390c184ea942c096b84d29afe7705c06e4d
gralloc: Align protected allocations with the spec

The specification for GRALLOC_USAGE_PROTECTED indicates that
allocations with that flag must be protected by securing with
hardware. If such protection is not possible, the buffer must not
be composited. In our current software only the MM_HEAP is
secured. If we allocate protected buffers from any other heap we
block those from being displayed.

CRs-fixed: 465012
Change-Id: I9d47aba3d28192db3fcc394fd6b38efe42ae118b

Conflicts:

	liboverlay/overlayMem.h
remove composition type

Change-Id: I9701bd683d02ea93d8b15f7f47d34cff29af50e6
libgralloc: Set the Adreno raster mode as "unknown"

Set the raster mode as "unknown" when calling libadreno_utils to
compute the surface stride. This allows libadreno_utils to decide
the best stride to pick up based on the specific GPU.

Change-Id: Id88f5887168564398492ab03d160ddd0ce5e083a
gralloc: Add support for "RAW" and "BLOB" formats

The allocation is done as specified in system/graphics.h
Raw formats are 16 bit and aligned to 32 bytes, blob formats have
a height of 1 and the size of the buffer is equal to the width.

Change-Id: If762a34dde3b78f138689ced1077c9529020ebf0
gralloc: Add missing break statement

Change-Id: I5ac1b5d504a0d6d026c3cf8f73c5be99426f7e0f
Signed-off-by: Ed Tam <etam@google.com>
gralloc: Add ITU-R standard info for YUV formats

These format qualifiers will help graphics decide which standard to use when
working with a YUV texture.

Bug: 8223174
Change-Id: I6ad464e6b070d3b375c5e07f03228308d15407cd
Signed-off-by: Iliyan Malchev <malchev@google.com>
gralloc: Set correct private gralloc format for video buffers

For IMPLEMENTATION_DEFINED pixel format, if the usage flag is
HW_VIDEO_ENCODER, the private gralloc format should be
HAL_PIXEL_FORMAT_NV12_ENCODEABLE.

Change-Id: I61e8aabe124179e8bebda5d50ad1d8681060b99a
gralloc: Add support for lock_ycbcr

Fill the android_ycbcr struct for HAL_PIXEL_FORMAT_YCbCr_*_888
formats.

Change-Id: If0c7abf5e206bf982ad333da2dae57cbac302733

Conflicts:

	libgralloc/gralloc.cpp
	libgralloc/mapper.cpp
Gralloc: Fix HAL_PIXEL_FORMAT_YCrCb_420_SP structure init

The initialization was overrunning the end of the structure.

Bug: 8946915
Change-Id: I24b594316956f73366f8c1941c9270faf38e431d
kill references to 5551 and 4444 RGBA

Change-Id: I74b4d66f929b41cc605dd3aee20f825c8988052f

Conflicts:

	libgralloc/alloc_controller.cpp
more references to 5551 and 4444 RGBA

Change-Id: I4781f0676cd0b4a63a88ff37d4dadeb5299384eb