Issue #1751 -- Remove XP_MACOSX conditionals from /dom

This commit is contained in:
Moonchild 2021-04-30 21:22:08 +00:00 committed by roytam1
commit d29e4f8306
71 changed files with 100 additions and 5342 deletions

View file

@ -295,16 +295,6 @@ WebGLContext::BindBufferRange(GLenum target, GLuint index, WebGLBuffer* buffer,
////
#ifdef XP_MACOSX
if (buffer && buffer->Content() == WebGLBuffer::Kind::Undefined &&
gl->WorkAroundDriverBugs())
{
// BindBufferRange will fail if the buffer's contents is undefined.
// Bind so driver initializes the buffer.
gl->fBindBuffer(target, buffer->mGLName);
}
#endif
gl->fBindBufferRange(target, index, buffer ? buffer->mGLName : 0, offset, size);
////
@ -352,12 +342,6 @@ WebGLContext::BufferData(GLenum target, WebGLsizeiptr size, GLenum usage)
if (!checkedSize.isValid())
return ErrorOutOfMemory("%s: Size too large for platform.", funcName);
#if defined(XP_MACOSX)
if (gl->WorkAroundDriverBugs() && size > 1200000000) {
return ErrorOutOfMemory("Allocations larger than 1200000000 fail on MacOS.");
}
#endif
const UniqueBuffer zeroBuffer(calloc(size, 1));
if (!zeroBuffer)
return ErrorOutOfMemory("%s: Failed to allocate zeros.", funcName);