mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1687889 - Add more error handling of FLIP_SEQUENTIAL r=nical
When CompositorHwnd does not exist, FLIP_SEQUENTIAL could not be used, since it could cause a problem like Bug 1435995. For example, CompositorHwnd creation could be failed on Win7. Differential Revision: https://phabricator.services.mozilla.com/D102531
This commit is contained in:
parent
c9f0d77260
commit
726fe3fae9
@ -276,7 +276,13 @@ bool RenderCompositorANGLE::CreateSwapChain(nsACString& aError) {
|
||||
desc.SampleDesc.Quality = 0;
|
||||
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
|
||||
if (gfx::gfxVars::UseWebRenderFlipSequentialWin()) {
|
||||
bool useFlipSequential = gfx::gfxVars::UseWebRenderFlipSequentialWin();
|
||||
if (useFlipSequential && !mWidget->AsWindows()->GetCompositorHwnd()) {
|
||||
useFlipSequential = false;
|
||||
gfxCriticalNoteOnce << "FLIP_SEQUENTIAL needs CompositorHwnd. Fallback";
|
||||
}
|
||||
|
||||
if (useFlipSequential) {
|
||||
useTripleBuffering = gfx::gfxVars::UseWebRenderTripleBufferingWin();
|
||||
if (useTripleBuffering) {
|
||||
desc.BufferCount = 3;
|
||||
@ -299,7 +305,7 @@ bool RenderCompositorANGLE::CreateSwapChain(nsACString& aError) {
|
||||
mSwapChain = swapChain1;
|
||||
mSwapChain1 = swapChain1;
|
||||
mUseTripleBuffering = useTripleBuffering;
|
||||
} else if (gfx::gfxVars::UseWebRenderFlipSequentialWin()) {
|
||||
} else if (useFlipSequential) {
|
||||
gfxCriticalNoteOnce << "FLIP_SEQUENTIAL is not supported. Fallback";
|
||||
|
||||
if (mWidget->AsWindows()->GetCompositorHwnd()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user