gralloc: Modify check for uncompressed RGB buffers

The previous check for RGB formats skipped certain formats and hence
the alignment was incorrect.
Add a check for all non-compressed RGB formats before calling
getGpuAlignedWidthHeight

CRs-fixed: 888733

Change-Id: Icae4cfb92ceae5e593fd6c5658999fc90ef97ea1
diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp
index 13b0638..9788614 100644
--- a/libgralloc/gpu.cpp
+++ b/libgralloc/gpu.cpp
@@ -188,12 +188,9 @@
 {
     *bufferType = BUFFER_TYPE_VIDEO;
 
-    if (inputFormat <= HAL_PIXEL_FORMAT_BGRA_8888) {
+    if (isUncompressedRgbFormat(inputFormat) == TRUE) {
         // RGB formats
         *bufferType = BUFFER_TYPE_UI;
-    } else if ((inputFormat == HAL_PIXEL_FORMAT_R_8) ||
-               (inputFormat == HAL_PIXEL_FORMAT_RG_88)) {
-        *bufferType = BUFFER_TYPE_UI;
     }
 }