gralloc: Fix getSize and getAlignedWidthAndHeight

getSize was incorrectly modifying aligned height and allocating
a buffer of lesser than expected size.

All alignments should be done in getAlignedWidthAndHeight so as not
to break the GRALLOC_PERFORM functions.

getSize()'s return type is unsigned, but a signed value is returned.
Instead on error, a size of 0 should be reported.

Change-Id: Ifae5e758de8e689701cd43892324ccc0140675cd
1 file changed