Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
roytam1 2021-03-12 09:00:51 +08:00
commit e54fcd15f1
56 changed files with 23 additions and 1671 deletions

View file

@ -145,9 +145,6 @@ WebGLContext::BindFramebuffer(GLenum target, WebGLFramebuffer* wfb)
} else {
GLuint framebuffername = wfb->mGLName;
gl->fBindFramebuffer(target, framebuffername);
#ifdef ANDROID
wfb->mIsFB = true;
#endif
}
switch (target) {
@ -982,14 +979,6 @@ WebGLContext::IsFramebuffer(const WebGLFramebuffer* fb)
if (!ValidateIsObject("isFramebuffer", fb))
return false;
#ifdef ANDROID
if (gl->WorkAroundDriverBugs() &&
gl->Renderer() == GLRenderer::AndroidEmulator)
{
return fb->mIsFB;
}
#endif
MakeContextCurrent();
return gl->fIsFramebuffer(fb->mGLName);
}

View file

@ -621,9 +621,6 @@ WebGLFBAttachPoint::GetParameter(const char* funcName, WebGLContext* webgl, JSCo
WebGLFramebuffer::WebGLFramebuffer(WebGLContext* webgl, GLuint fbo)
: WebGLRefCountedObject(webgl)
, mGLName(fbo)
#ifdef ANDROID
, mIsFB(false)
#endif
, mDepthAttachment(this, LOCAL_GL_DEPTH_ATTACHMENT)
, mStencilAttachment(this, LOCAL_GL_STENCIL_ATTACHMENT)
, mDepthStencilAttachment(this, LOCAL_GL_DEPTH_STENCIL_ATTACHMENT)
@ -657,10 +654,6 @@ WebGLFramebuffer::Delete()
mContext->gl->fDeleteFramebuffers(1, &mGLName);
LinkedListElement<WebGLFramebuffer>::removeFrom(mContext->mFramebuffers);
#ifdef ANDROID
mIsFB = false;
#endif
}
////

View file

@ -155,17 +155,6 @@ public:
const GLuint mGLName;
protected:
#ifdef ANDROID
// Bug 1140459: Some drivers (including our test slaves!) don't
// give reasonable answers for IsRenderbuffer, maybe others.
// This shows up on Android 2.3 emulator.
//
// So we track the `is a Framebuffer` state ourselves.
bool mIsFB;
#endif
////
WebGLFBAttachPoint mDepthAttachment;
WebGLFBAttachPoint mStencilAttachment;
WebGLFBAttachPoint mDepthStencilAttachment;