зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1661869 - Fix screenshotting of WebGL canvases. r=gfx-reviewers,lsalzman
For WebGL canvases with preserveDrawingBuffer:false, frontbuffer snapshotting was not working properly. If the frontbuffer had no user-fb associated with it, was inexplicably calling BindDefaultFBForRead, which binds *webgl*'s default FB, not *gl*'s default FB 0. This caused frontbuffer snappshotting to actually snapshot the (cleared) backbuffer instead of the visible frontbuffer contents. Differential Revision: https://phabricator.services.mozilla.com/D126024
This commit is contained in:
Родитель
f2cfda3e61
Коммит
4d36916392
|
@ -996,14 +996,7 @@ Maybe<uvec2> WebGLContext::FrontBufferSnapshotInto(
|
|||
}
|
||||
});
|
||||
|
||||
if (front->mFb) {
|
||||
gl->fBindFramebuffer(fbTarget, front->mFb->mFB);
|
||||
} else {
|
||||
if (!BindDefaultFBForRead()) {
|
||||
gfxCriticalError() << "BindDefaultFBForRead failed";
|
||||
return {};
|
||||
}
|
||||
}
|
||||
gl->fBindFramebuffer(fbTarget, front->mFb ? front->mFb->mFB : 0);
|
||||
if (pboWas) {
|
||||
BindBuffer(LOCAL_GL_PIXEL_PACK_BUFFER, nullptr);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче