gralloc: Allow host to distinguish HAL_PIXEL_FORMAT_565

bug: 64724103

Otherwise, we will create a RGB8 buffer on the host, which
will result in GL_INVALID_OPERATION down the line when
rcUpdateColorBuffer is called.

Change-Id: Ie2a88717b1c4f0a317cdde9e06fd018fe975650e
diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp
index f6bce5d..a98506c 100644
--- a/system/gralloc/gralloc.cpp
+++ b/system/gralloc/gralloc.cpp
@@ -516,7 +516,10 @@
             break;
         case HAL_PIXEL_FORMAT_RGB_565:
             bpp = 2;
-            glFormat = GL_RGB;
+            // Workaround: distinguish vs the RGB8/RGBA8
+            // by changing |glFormat| to GL_RGB565
+            // (previously, it was still GL_RGB)
+            glFormat = GL_RGB565;
             glType = GL_UNSIGNED_SHORT_5_6_5;
             break;
 #if PLATFORM_SDK_VERSION >= 26