Match AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM HW buffer format

Match AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM to
kRGBA_8888_SkColorType instead of kRGB_888x_SkColorType.

Bug: b/116117654
Change-Id: Icde4773cf525bf7d5ce6c091c05de5ad8ba770cb
Reviewed-on: https://skia-review.googlesource.com/c/160600
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp
index 7f99b3c..afde089 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.cpp
+++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -72,6 +72,7 @@
     SkColorType colorType;
     switch (bufferDesc.format) {
     case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM:
+    case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM:
         colorType = kRGBA_8888_SkColorType;
         break;
     case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT:
@@ -80,7 +81,6 @@
     case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM:
         colorType = kRGB_565_SkColorType;
         break;
-    case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM:
     case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM:
         colorType = kRGB_888x_SkColorType;
         break;
@@ -443,6 +443,7 @@
         switch (bufferFormat) {
             //TODO: find out if we can detect, which graphic buffers support GR_GL_TEXTURE_2D
             case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM:
+            case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM:
                 return GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_EXTERNAL);
             case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT:
                 return GrBackendFormat::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_EXTERNAL);
@@ -450,7 +451,6 @@
                 return GrBackendFormat::MakeGL(GR_GL_RGB565, GR_GL_TEXTURE_EXTERNAL);
             case AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM:
                 return GrBackendFormat::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_EXTERNAL);
-            case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM:
             case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM:
                 return GrBackendFormat::MakeGL(GR_GL_RGB8, GR_GL_TEXTURE_EXTERNAL);
             default: