From 5d567578230110edb9598e0e01a6058599ac63a3 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 30 Apr 2021 21:22:08 +0000 Subject: Issue mcp-graveyard/UXP#1751 -- Remove XP_MACOSX conditionals from /dom --- dom/canvas/WebGLProgram.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'dom/canvas/WebGLProgram.cpp') diff --git a/dom/canvas/WebGLProgram.cpp b/dom/canvas/WebGLProgram.cpp index 9b204358bb..1ff27e1d2f 100644 --- a/dom/canvas/WebGLProgram.cpp +++ b/dom/canvas/WebGLProgram.cpp @@ -689,24 +689,6 @@ WebGLProgram::GetFragDataLocation(const nsAString& userName_wide) const gl->MakeCurrent(); const NS_LossyConvertUTF16toASCII userName(userName_wide); -#ifdef XP_MACOSX - if (gl->WorkAroundDriverBugs()) { - // OSX doesn't return locs for indexed names, just the base names. - // Indicated by failure in: conformance2/programs/gl-get-frag-data-location.html - bool isArray; - size_t arrayIndex; - nsCString baseUserName; - if (!ParseName(userName, &baseUserName, &isArray, &arrayIndex)) - return -1; - - if (arrayIndex >= mContext->mImplMaxDrawBuffers) - return -1; - - const auto baseLoc = GetFragDataByUserName(this, baseUserName); - const auto loc = baseLoc + GLint(arrayIndex); - return loc; - } -#endif return GetFragDataByUserName(this, userName); } @@ -770,11 +752,6 @@ WebGLProgram::GetProgramParameter(GLenum pname) const return JS::BooleanValue(IsLinked()); case LOCAL_GL_VALIDATE_STATUS: -#ifdef XP_MACOSX - // See comment in ValidateProgram. - if (gl->WorkAroundDriverBugs()) - return JS::BooleanValue(true); -#endif // Todo: Implement this in our code. return JS::BooleanValue(bool(GetProgramiv(gl, mGLName, pname))); @@ -1377,17 +1354,6 @@ WebGLProgram::ValidateProgram() const { mContext->MakeContextCurrent(); gl::GLContext* gl = mContext->gl; - -#ifdef XP_MACOSX - // See bug 593867 for NVIDIA and bug 657201 for ATI. The latter is confirmed - // with Mac OS 10.6.7. - if (gl->WorkAroundDriverBugs()) { - mContext->GenerateWarning("validateProgram: Implemented as a no-op on" - " Mac to work around crashes."); - return; - } -#endif - gl->fValidateProgram(mGLName); } -- cgit v1.2.3