Reformat all cpp and h files.

This applies git cl format --full to all ANGLE sources.

Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/Config.cpp b/src/libANGLE/Config.cpp
index 18019ee..2ecdb6d 100644
--- a/src/libANGLE/Config.cpp
+++ b/src/libANGLE/Config.cpp
@@ -14,8 +14,8 @@
 #include <algorithm>
 #include <vector>
 
-#include "angle_gl.h"
 #include <EGL/eglext.h>
+#include "angle_gl.h"
 
 #include "common/debug.h"
 
@@ -60,12 +60,9 @@
       transparentBlueValue(0),
       optimalOrientation(0),
       colorComponentType(EGL_COLOR_COMPONENT_TYPE_FIXED_EXT)
-{
-}
+{}
 
-Config::~Config()
-{
-}
+Config::~Config() {}
 
 Config::Config(const Config &other) = default;
 
@@ -121,7 +118,8 @@
     return false;
 }
 
-// Function object used by STL sorting routines for ordering Configs according to [EGL 1.5] section 3.4.1.2 page 28.
+// Function object used by STL sorting routines for ordering Configs according to [EGL 1.5]
+// section 3.4.1.2 page 28.
 class ConfigSorter
 {
   public:
@@ -135,20 +133,18 @@
         scanForWantedComponents(attributeMap);
     }
 
-    bool operator()(const Config *x, const Config *y) const
-    {
-        return (*this)(*x, *y);
-    }
+    bool operator()(const Config *x, const Config *y) const { return (*this)(*x, *y); }
 
     bool operator()(const Config &x, const Config &y) const
     {
-        #define SORT(attribute)                        \
-            if (x.attribute != y.attribute)            \
-            {                                          \
-                return x.attribute < y.attribute;      \
-            }
+#define SORT(attribute)                   \
+    if (x.attribute != y.attribute)       \
+    {                                     \
+        return x.attribute < y.attribute; \
+    }
 
-        static_assert(EGL_NONE < EGL_SLOW_CONFIG && EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG, "Unexpected EGL enum value.");
+        static_assert(EGL_NONE < EGL_SLOW_CONFIG && EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG,
+                      "Unexpected EGL enum value.");
         SORT(configCaveat);
 
         static_assert(EGL_COLOR_COMPONENT_TYPE_FIXED_EXT < EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT,
@@ -158,7 +154,8 @@
         static_assert(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER, "Unexpected EGL enum value.");
         SORT(colorBufferType);
 
-        // By larger total number of color bits, only considering those that are requested to be > 0.
+        // By larger total number of color bits, only considering those that are requested to be >
+        // 0.
         EGLint xComponentsSize = wantedComponentsSize(x);
         EGLint yComponentsSize = wantedComponentsSize(y);
         if (xComponentsSize != yComponentsSize)
@@ -175,7 +172,7 @@
         SORT(nativeVisualType);
         SORT(configID);
 
-        #undef SORT
+#undef SORT
 
         return false;
     }
@@ -203,11 +200,16 @@
     {
         EGLint total = 0;
 
-        if (mWantRed)       total += config.redSize;
-        if (mWantGreen)     total += config.greenSize;
-        if (mWantBlue)      total += config.blueSize;
-        if (mWantAlpha)     total += config.alphaSize;
-        if (mWantLuminance) total += config.luminanceSize;
+        if (mWantRed)
+            total += config.redSize;
+        if (mWantGreen)
+            total += config.greenSize;
+        if (mWantBlue)
+            total += config.blueSize;
+        if (mWantAlpha)
+            total += config.alphaSize;
+        if (mWantLuminance)
+            total += config.luminanceSize;
 
         return total;
     }
@@ -219,15 +221,15 @@
     bool mWantLuminance;
 };
 
-std::vector<const Config*> ConfigSet::filter(const AttributeMap &attributeMap) const
+std::vector<const Config *> ConfigSet::filter(const AttributeMap &attributeMap) const
 {
-    std::vector<const Config*> result;
+    std::vector<const Config *> result;
     result.reserve(mConfigs.size());
 
     for (auto configIter = mConfigs.begin(); configIter != mConfigs.end(); configIter++)
     {
         const Config &config = configIter->second;
-        bool match = true;
+        bool match           = true;
 
         for (auto attribIter = attributeMap.begin(); attribIter != attributeMap.end(); attribIter++)
         {
@@ -241,45 +243,111 @@
 
             switch (attributeKey)
             {
-              case EGL_BUFFER_SIZE:               match = config.bufferSize >= attributeValue;                        break;
-              case EGL_ALPHA_SIZE:                match = config.alphaSize >= attributeValue;                         break;
-              case EGL_BLUE_SIZE:                 match = config.blueSize >= attributeValue;                          break;
-              case EGL_GREEN_SIZE:                match = config.greenSize >= attributeValue;                         break;
-              case EGL_RED_SIZE:                  match = config.redSize >= attributeValue;                           break;
-              case EGL_DEPTH_SIZE:                match = config.depthSize >= attributeValue;                         break;
-              case EGL_STENCIL_SIZE:              match = config.stencilSize >= attributeValue;                       break;
-              case EGL_CONFIG_CAVEAT:             match = config.configCaveat == (EGLenum)attributeValue;             break;
-              case EGL_CONFIG_ID:                 match = config.configID == attributeValue;                          break;
-              case EGL_LEVEL:                     match = config.level >= attributeValue;                             break;
-              case EGL_NATIVE_RENDERABLE:         match = config.nativeRenderable == (EGLBoolean)attributeValue;      break;
-              case EGL_NATIVE_VISUAL_TYPE:        match = config.nativeVisualType == attributeValue;                  break;
-              case EGL_SAMPLES:                   match = config.samples >= attributeValue;                           break;
-              case EGL_SAMPLE_BUFFERS:            match = config.sampleBuffers >= attributeValue;                     break;
-              case EGL_SURFACE_TYPE:              match = (config.surfaceType & attributeValue) == attributeValue;    break;
-              case EGL_TRANSPARENT_TYPE:          match = config.transparentType == (EGLenum)attributeValue;          break;
-              case EGL_TRANSPARENT_BLUE_VALUE:    match = config.transparentBlueValue == attributeValue;              break;
-              case EGL_TRANSPARENT_GREEN_VALUE:   match = config.transparentGreenValue == attributeValue;             break;
-              case EGL_TRANSPARENT_RED_VALUE:     match = config.transparentRedValue == attributeValue;               break;
-              case EGL_BIND_TO_TEXTURE_RGB:       match = config.bindToTextureRGB == (EGLBoolean)attributeValue;      break;
-              case EGL_BIND_TO_TEXTURE_RGBA:      match = config.bindToTextureRGBA == (EGLBoolean)attributeValue;     break;
-              case EGL_MIN_SWAP_INTERVAL:         match = config.minSwapInterval == attributeValue;                   break;
-              case EGL_MAX_SWAP_INTERVAL:         match = config.maxSwapInterval == attributeValue;                   break;
-              case EGL_LUMINANCE_SIZE:            match = config.luminanceSize >= attributeValue;                     break;
-              case EGL_ALPHA_MASK_SIZE:           match = config.alphaMaskSize >= attributeValue;                     break;
-              case EGL_COLOR_BUFFER_TYPE:         match = config.colorBufferType == (EGLenum)attributeValue;          break;
-              case EGL_RENDERABLE_TYPE:           match = (config.renderableType & attributeValue) == attributeValue; break;
-              case EGL_MATCH_NATIVE_PIXMAP:       match = false; UNIMPLEMENTED();                                     break;
-              case EGL_CONFORMANT:                match = (config.conformant & attributeValue) == attributeValue;     break;
-              case EGL_MAX_PBUFFER_WIDTH:         match = config.maxPBufferWidth >= attributeValue;                   break;
-              case EGL_MAX_PBUFFER_HEIGHT:        match = config.maxPBufferHeight >= attributeValue;                  break;
-              case EGL_MAX_PBUFFER_PIXELS:        match = config.maxPBufferPixels >= attributeValue;                  break;
-              case EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE:
-                  match = config.optimalOrientation == attributeValue;
-                  break;
-              case EGL_COLOR_COMPONENT_TYPE_EXT:
-                  match = config.colorComponentType == static_cast<EGLenum>(attributeValue);
-                  break;
-              default: UNREACHABLE();
+                case EGL_BUFFER_SIZE:
+                    match = config.bufferSize >= attributeValue;
+                    break;
+                case EGL_ALPHA_SIZE:
+                    match = config.alphaSize >= attributeValue;
+                    break;
+                case EGL_BLUE_SIZE:
+                    match = config.blueSize >= attributeValue;
+                    break;
+                case EGL_GREEN_SIZE:
+                    match = config.greenSize >= attributeValue;
+                    break;
+                case EGL_RED_SIZE:
+                    match = config.redSize >= attributeValue;
+                    break;
+                case EGL_DEPTH_SIZE:
+                    match = config.depthSize >= attributeValue;
+                    break;
+                case EGL_STENCIL_SIZE:
+                    match = config.stencilSize >= attributeValue;
+                    break;
+                case EGL_CONFIG_CAVEAT:
+                    match = config.configCaveat == (EGLenum)attributeValue;
+                    break;
+                case EGL_CONFIG_ID:
+                    match = config.configID == attributeValue;
+                    break;
+                case EGL_LEVEL:
+                    match = config.level >= attributeValue;
+                    break;
+                case EGL_NATIVE_RENDERABLE:
+                    match = config.nativeRenderable == (EGLBoolean)attributeValue;
+                    break;
+                case EGL_NATIVE_VISUAL_TYPE:
+                    match = config.nativeVisualType == attributeValue;
+                    break;
+                case EGL_SAMPLES:
+                    match = config.samples >= attributeValue;
+                    break;
+                case EGL_SAMPLE_BUFFERS:
+                    match = config.sampleBuffers >= attributeValue;
+                    break;
+                case EGL_SURFACE_TYPE:
+                    match = (config.surfaceType & attributeValue) == attributeValue;
+                    break;
+                case EGL_TRANSPARENT_TYPE:
+                    match = config.transparentType == (EGLenum)attributeValue;
+                    break;
+                case EGL_TRANSPARENT_BLUE_VALUE:
+                    match = config.transparentBlueValue == attributeValue;
+                    break;
+                case EGL_TRANSPARENT_GREEN_VALUE:
+                    match = config.transparentGreenValue == attributeValue;
+                    break;
+                case EGL_TRANSPARENT_RED_VALUE:
+                    match = config.transparentRedValue == attributeValue;
+                    break;
+                case EGL_BIND_TO_TEXTURE_RGB:
+                    match = config.bindToTextureRGB == (EGLBoolean)attributeValue;
+                    break;
+                case EGL_BIND_TO_TEXTURE_RGBA:
+                    match = config.bindToTextureRGBA == (EGLBoolean)attributeValue;
+                    break;
+                case EGL_MIN_SWAP_INTERVAL:
+                    match = config.minSwapInterval == attributeValue;
+                    break;
+                case EGL_MAX_SWAP_INTERVAL:
+                    match = config.maxSwapInterval == attributeValue;
+                    break;
+                case EGL_LUMINANCE_SIZE:
+                    match = config.luminanceSize >= attributeValue;
+                    break;
+                case EGL_ALPHA_MASK_SIZE:
+                    match = config.alphaMaskSize >= attributeValue;
+                    break;
+                case EGL_COLOR_BUFFER_TYPE:
+                    match = config.colorBufferType == (EGLenum)attributeValue;
+                    break;
+                case EGL_RENDERABLE_TYPE:
+                    match = (config.renderableType & attributeValue) == attributeValue;
+                    break;
+                case EGL_MATCH_NATIVE_PIXMAP:
+                    match = false;
+                    UNIMPLEMENTED();
+                    break;
+                case EGL_CONFORMANT:
+                    match = (config.conformant & attributeValue) == attributeValue;
+                    break;
+                case EGL_MAX_PBUFFER_WIDTH:
+                    match = config.maxPBufferWidth >= attributeValue;
+                    break;
+                case EGL_MAX_PBUFFER_HEIGHT:
+                    match = config.maxPBufferHeight >= attributeValue;
+                    break;
+                case EGL_MAX_PBUFFER_PIXELS:
+                    match = config.maxPBufferPixels >= attributeValue;
+                    break;
+                case EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE:
+                    match = config.optimalOrientation == attributeValue;
+                    break;
+                case EGL_COLOR_COMPONENT_TYPE_EXT:
+                    match = config.colorComponentType == static_cast<EGLenum>(attributeValue);
+                    break;
+                default:
+                    UNREACHABLE();
             }
 
             if (!match)
@@ -309,4 +377,4 @@
 {
     return mConfigs.end();
 }
-}
+}  // namespace egl