зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1779410
- Ensure SwapChainPresenter destructor is called before we access the front buffer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D151732
This commit is contained in:
Родитель
41d7ccc557
Коммит
911d479aa2
|
@ -1058,16 +1058,16 @@ void WebGLContext::CopyToSwapChain(WebGLFramebuffer* const srcFb,
|
|||
return;
|
||||
}
|
||||
|
||||
// ColorSpace will need to be part of SwapChainOptions for DTWebgl.
|
||||
const auto colorSpace = ToColorSpace2(mOptions);
|
||||
auto presenter = srcFb->mSwapChain.Acquire(size, colorSpace);
|
||||
if (!presenter) {
|
||||
GenerateWarning("Swap chain surface creation failed.");
|
||||
LoseContext();
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
// ColorSpace will need to be part of SwapChainOptions for DTWebgl.
|
||||
const auto colorSpace = ToColorSpace2(mOptions);
|
||||
auto presenter = srcFb->mSwapChain.Acquire(size, colorSpace);
|
||||
if (!presenter) {
|
||||
GenerateWarning("Swap chain surface creation failed.");
|
||||
LoseContext();
|
||||
return;
|
||||
}
|
||||
|
||||
const ScopedFBRebinder saveFB(this);
|
||||
|
||||
const auto destFb = presenter->Fb();
|
||||
|
|
Загрузка…
Ссылка в новой задаче