Create and read color buffer when expecting reads

Make sure color buffers are created when gralloc is allocating buffers
that indicate that software reads are going to happen. In this case
software will require the rendered data to be available from the host at
a later point and that means that rendering has to be stored in a color
buffer. Also make sure that when gralloc locks a buffer for reading it
will actually read the data from the host if the buffer is marked for
reading.

BUG: 28932862

Change-Id: Ief4b7fe34401727cabec9fdd5c2b9812a6c49612
(cherry picked from commit 2637058369fe1ba1a692e5eb9da95624f1bc6f9c)
1 file changed