Bug 1506179 - rename webgl::AttribBaseType::Bool to Boolean; r=jgilbert

X11.h defines a macro named "Bool", which can cause surprising compile errors due to include order.

Differential Revision: https://phabricator.services.mozilla.com/D11494

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alex Gaynor 2018-11-09 21:38:31 +00:00
parent a0fb02038c
commit 6a9c2e7073
6 changed files with 7 additions and 7 deletions

View File

@ -140,7 +140,7 @@ ElemBaseType(const GLenum elemType)
case LOCAL_GL_BOOL_VEC2:
case LOCAL_GL_BOOL_VEC3:
case LOCAL_GL_BOOL_VEC4:
return webgl::AttribBaseType::Bool;
return webgl::AttribBaseType::Boolean;
// -

View File

@ -859,7 +859,7 @@ WebGLContext::DoFakeVertexAttrib0(const uint64_t vertexCount)
////
switch (mGenericVertexAttribTypes[0]) {
case webgl::AttribBaseType::Bool:
case webgl::AttribBaseType::Boolean:
case webgl::AttribBaseType::Float:
gl->fVertexAttribPointer(0, 4, LOCAL_GL_FLOAT, false, 0, 0);
break;

View File

@ -255,7 +255,7 @@ WebGLContext::GetVertexAttrib(JSContext* cx, GLuint index, GLenum pname,
obj = GetVertexAttribUint32Array(cx, index);
break;
case webgl::AttribBaseType::Bool:
case webgl::AttribBaseType::Boolean:
MOZ_CRASH("impossible");
}

View File

@ -474,7 +474,7 @@ webgl::ToString(const webgl::AttribBaseType x)
return "INT";
case webgl::AttribBaseType::UInt:
return "UINT";
case webgl::AttribBaseType::Bool:
case webgl::AttribBaseType::Boolean:
return "BOOL";
}
MOZ_CRASH("pacify gcc6 warning");
@ -554,7 +554,7 @@ webgl::LinkedProgramInfo::GetDrawFetchLimits() const
const auto& progBaseType = progAttrib.mActiveInfo->mBaseType;
if ((attribDataBaseType != progBaseType) &
(progBaseType != webgl::AttribBaseType::Bool))
(progBaseType != webgl::AttribBaseType::Boolean))
{
const auto& dataType = ToString(attribDataBaseType);
const auto& progType = ToString(progBaseType);

View File

@ -193,7 +193,7 @@ enum class AttribBaseType : uint8_t {
Int,
UInt,
Float, // Also includes NormU?Int
Bool, // Can convert from anything.
Boolean, // Can convert from anything.
};
const char* ToString(AttribBaseType);

View File

@ -62,7 +62,7 @@ WebGLUniformLocation::ValidateSizeAndType(const uint8_t setterElemSize,
const auto& uniformType = mInfo->mActiveInfo->mBaseType;
if (setterType != uniformType &&
uniformType != webgl::AttribBaseType::Bool)
uniformType != webgl::AttribBaseType::Boolean)
{
const auto& uniformStr = EnumString(mInfo->mActiveInfo->mElemType);
mContext->ErrorInvalidOperation("Function used is incompatible with uniform"