Refer to GLSL extensions through TExtension enum

Extensions are now referred to by enum values instead of strings most
of the time. This gets rid of unnecessary copying of strings. The code
is easier to work with than before as typoing the extension enum names
will be caught by the compiler.

BUG=angleproject:2147
TEST=angle_unittests

Change-Id: Ifa61b9f86ef03211188fc23bc23a5ce4e4d8c390
Reviewed-on: https://chromium-review.googlesource.com/571002
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 1719ee1..a13e9a3 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -138,7 +138,7 @@
     void checkIsParameterQualifierValid(const TSourceLoc &line,
                                         const TTypeQualifierBuilder &typeQualifierBuilder,
                                         TType *type);
-    bool checkCanUseExtension(const TSourceLoc &line, const TString &extension);
+    bool checkCanUseExtension(const TSourceLoc &line, TExtension extension);
 
     // Done for all declarations, whether empty or not.
     void declarationQualifierErrorCheck(const sh::TQualifier qualifier,
@@ -168,12 +168,8 @@
     {
         return mDirectiveHandler.extensionBehavior();
     }
-    bool supportsExtension(const char *extension);
-    bool isExtensionEnabled(const char *extension) const;
-    bool isMultiviewExtensionEnabled() const
-    {
-        return mMultiviewAvailable && isExtensionEnabled("GL_OVR_multiview");
-    }
+    bool supportsExtension(TExtension extension);
+    bool isExtensionEnabled(TExtension extension) const;
     void handleExtensionDirective(const TSourceLoc &loc, const char *extName, const char *behavior);
     void handlePragmaDirective(const TSourceLoc &loc,
                                const char *name,
@@ -580,8 +576,6 @@
     int mMinProgramTexelOffset;
     int mMaxProgramTexelOffset;
 
-    bool mMultiviewAvailable;
-
     // keep track of local group size declared in layout. It should be declared only once.
     bool mComputeShaderLocalSizeDeclared;
     sh::WorkGroupSize mComputeShaderLocalSize;