hwc: Bump up version to 1.3

Increment hwc version to 1.3.
Create and use a converter from float source crop to integers.

Change-Id: I5e185195c975b3a9434c5d9dce9ae4757ff98739
hwc: Punt layers with non integral source crop

The MDP driver cannot handle such layers right now. Investigate
doing this with pixel phase in the future.

Change-Id: Iabbdd0285234160770ae5a799b07a5b912e5fde3
gralloc: Add allocation support for sRGB formats

Refer to graphics.h for the definition of these new formats.
The HWC doesn't yet support output to these formats.

Change-Id: Ib924e7b41ccedb808631e0a23f706f3d9a209048
Replace sRGB_888 with sRGB_X_8888

Bug: 10357459
Change-Id: I4d462ed21a3b53dbe84319cce802ff92043e5002
get rid of HAL pixelformats 5551 and 4444

Change-Id: I817510c3c7c0c3d95924c2ffc79e5727a6d6c48f
gralloc: Add padding byte for YUV 420

YUV 420 buffers have the chroma starting at consecutive bytes
but end at the same byte. This results in the second chroma size
being one byte shorter in size. This isn't a problem for
hardware, however, the gralloc lock_ycbcr API expects to read the
same number of bytes based on the cstride for both chroma
components. This could lead to it accessing memory beyond what is
allocated leading to a crash in the calling process especially
when the size aligns exactly to the page size. Add one byte
padding when allocating YUV buffers to make sure the users of
this gralloc API get enough bytes to read.

Bug: 10787131
Change-Id: Id18e0739f9fdc2c7a4fbe7724be668a989f1a4a1
(cherry picked from commit ca07ffae967e7137fb0d97fb9999a11c09b4a7b5)
display: Add support to HAL_PIXEL_FORMAT_NV21_ZSL format

Add Support to HAL_PIXEL_FORMAT_NV21_ZSL format in gralloc for
camera capture usecase.
This support is required because, CPP module requires 64 byte
aligned width and height to resolve corruption in bottom/left edge
of the landscape/portrait buffer.

Change-Id: Id3e0e5f3d695d5111f3469f78a1d52aad9bea4f4
(cherry picked from commit 512ee1dcef6fa47dfdcf3990fea29bd85f967f02)
hwc: Add support to smooth streaming feature.

update the source video width and height set by the video decoder
for secure video smooth streaming usecase from metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23
hwcomposer: Clear mVirtualonExtActive on EXTERNAL_OFFLINE

If WFD Client APK is connected and teared down and then hdmi is connecetd
Unblank Virtual display is happening instead of ext display
this results in Display not coming up on External using HDMI.

Change-Id: Id61e9e753f81e90787e2a958f75a4f84b4469f71
hwc: support 8x26 variants

Add support for 8x26 variants (8x26v1, v2 etc..)

Change-Id: Ie316c1f77fdafb8021100f371c2ebc327e1c9da9
libhwcomposer: Optimize layer crops when possible.

With in hwc list of layers if a layer above is opaque,
deduct the opaque layers crops from all the layers below
in z-order if deduction is possible with out creating
any hole.

Change-Id: I6391a13b0501cb972b134f72b58514cb807c7613
(cherry picked from commit 34e5ca67a56585623ea748ca138d6ed7b22a7f44)
libexternal: remove mEDIDs string

Remove mEDIDs string from the External class as it not needed
after parsing the string

Change-Id: I0a624857894a0b5401b33408c09b32ceb4f8a0d4
CRs-fixed: 549578
(cherry picked from commit 3cd94a77a098102aee6dbe8d1dc85c2ae21e7ae0)
libhwcomposer: Make Rect utils generic.

Changes rect utility functions more generic.
Adds more sanity checks.

Change-Id: Ie935302592ac8eb5f7cfaffe03ac49da077a290d
(cherry picked from commit 77dab03bc671c6d4a46497eaecc594d17a4aee76)
hwc: Fix rotator size allocation to max buffer size

When using the metadata for calculating the rotator destination
buffer size, the allocation happens frequently in the smooth
streaming use case leading to fragmentation of rotator memory.
Base the calculation of this buffer size on the actual width and
height of the buffer instead of the metadata.

Change-Id: Ic551a2b1eb7418cb0b03251b26bbf55d612822fd
overlay: Account for transform in size calculation

If we have a transform of 90, we need to swap the width and
height in the origWhf to make sure we get the right size
calculation of the output buffer with all alignment requirements.

Change-Id: I90f4da9cf7d9c56a43058f99c6d406a72e1d3efc
hwc: Do not punt secure layers for non integral crops

GPU cannot handle secure layers so a black screen is seen when we
punt secure layers with non integral source crops.

Bug:11156948
Change-Id: Ie19c631aab55dc8e7c1ad5e1f42162e833f49222