Redesign robust resource init as a display extension.

Also correct the enum allocation to values that are available to ANGLE.

BUG=angleproject:1635

Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e
Reviewed-on: https://chromium-review.googlesource.com/520002
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 671f5ed..8213f3d 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -20,6 +20,7 @@
 #include "common/version.h"
 #include "libANGLE/Buffer.h"
 #include "libANGLE/Compiler.h"
+#include "libANGLE/Display.h"
 #include "libANGLE/Fence.h"
 #include "libANGLE/Framebuffer.h"
 #include "libANGLE/FramebufferAttachment.h"
@@ -203,11 +204,6 @@
     return (attribs.get(EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE, EGL_TRUE) == EGL_TRUE);
 }
 
-bool GetRobustResourceInit(const egl::AttributeMap &attribs)
-{
-    return (attribs.get(EGL_CONTEXT_ROBUST_RESOURCE_INITIALIZATION_ANGLE, EGL_FALSE) == EGL_TRUE);
-}
-
 std::string GetObjectLabelFromPointer(GLsizei length, const GLchar *label)
 {
     std::string labelName;
@@ -248,7 +244,8 @@
                  const Context *shareContext,
                  TextureManager *shareTextures,
                  const egl::AttributeMap &attribs,
-                 const egl::DisplayExtensions &displayExtensions)
+                 const egl::DisplayExtensions &displayExtensions,
+                 bool robustResourceInit)
 
     : ValidationContext(shareContext,
                         shareTextures,
@@ -284,7 +281,7 @@
 
     mGLState.initialize(mCaps, mExtensions, getClientVersion(), GetDebug(attribs),
                         GetBindGeneratesResource(attribs), GetClientArraysEnabled(attribs),
-                        GetRobustResourceInit(attribs));
+                        robustResourceInit);
 
     mFenceNVHandleAllocator.setBaseHandle(0);
 
@@ -2670,7 +2667,7 @@
 
     // Determine robust resource init availability from EGL.
     mExtensions.robustResourceInitialization =
-        displayExtensions.createContextRobustResourceInitialization;
+        egl::Display::GetClientExtensions().displayRobustResourceInitialization;
 
     // Apply implementation limits
     mCaps.maxVertexAttributes = std::min<GLuint>(mCaps.maxVertexAttributes, MAX_VERTEX_ATTRIBS);