Update internal AttributeMap type to EGLAttrib.
Newer EGL functions use EGLAttrib to pass in attributes, which can be
either 32-bit or 64-bit depending on the system while the old attributes
are passed in as EGLints, which are usually 32-bits. To support these
newer functions, AttributeMap now uses EGLAttrib internally instead of
EGLint, and all the code using AttributeMap has been updated to cast
properly.
BUG=angleproject:1348
Change-Id: I7c4dd9ef23ea1b1741f3a565502fb5e26bf962d7
Reviewed-on: https://chromium-review.googlesource.com/337162
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Ian Ewell <ewell@google.com>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 24548dc..dcb6b21 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -82,13 +82,13 @@
// Attribute map queries.
EGLint GetClientVersion(const egl::AttributeMap &attribs)
{
- return attribs.get(EGL_CONTEXT_CLIENT_VERSION, 1);
+ return static_cast<EGLint>(attribs.get(EGL_CONTEXT_CLIENT_VERSION, 1));
}
GLenum GetResetStrategy(const egl::AttributeMap &attribs)
{
- EGLenum attrib = attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
- EGL_NO_RESET_NOTIFICATION_EXT);
+ EGLAttrib attrib = attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
+ EGL_NO_RESET_NOTIFICATION_EXT);
switch (attrib)
{
case EGL_NO_RESET_NOTIFICATION: