Offscreen framebuffer creation on Mali-400 GPU

Make GPU bug workaround to disable using GL_RGB format on Mali-400

This CL manages offscreen framebuffer creation based on GL_RGBA format
and ignoring GL_RGB format because it is not supported on Mali-400 GPU.

BUG=449150

Review URL: https://codereview.chromium.org/996163003

Cr-Commit-Position: refs/heads/master@{#327487}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 0e69077..2fe9f1b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2624,8 +2624,10 @@
             GL_RGBA8 : GL_RGB8;
       } else {
         offscreen_target_samples_ = 1;
-        offscreen_target_color_format_ = attrib_parser.alpha_size > 0 ?
-            GL_RGBA : GL_RGB;
+        offscreen_target_color_format_ =
+            attrib_parser.alpha_size > 0 || workarounds().disable_gl_rgb_format
+                ? GL_RGBA
+                : GL_RGB;
       }
 
       // ANGLE only supports packed depth/stencil formats, so use it if it is
@@ -2647,8 +2649,10 @@
             GL_STENCIL_INDEX8 : 0;
       }
     } else {
-      offscreen_target_color_format_ = attrib_parser.alpha_size > 0 ?
-          GL_RGBA : GL_RGB;
+      offscreen_target_color_format_ =
+          attrib_parser.alpha_size > 0 || workarounds().disable_gl_rgb_format
+              ? GL_RGBA
+              : GL_RGB;
 
       // If depth is requested at all, use the packed depth stencil format if
       // it's available, as some desktop GL drivers don't support any non-packed
@@ -2670,8 +2674,10 @@
       }
     }
 
-    offscreen_saved_color_format_ = attrib_parser.alpha_size > 0 ?
-        GL_RGBA : GL_RGB;
+    offscreen_saved_color_format_ =
+        attrib_parser.alpha_size > 0 || workarounds().disable_gl_rgb_format
+            ? GL_RGBA
+            : GL_RGB;
 
     // Create the target frame buffer. This is the one that the client renders
     // directly to.