Bug 1586555 - Disable double buffering with D3D compositor when Glass is used r=bas

Differential Revision: https://phabricator.services.mozilla.com/D48469

--HG--
extra : moz-landing-system : lando
This commit is contained in:
sotaro 2019-10-10 23:17:01 +00:00
Родитель 409851d51d
Коммит e8b225b85f
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -132,6 +132,7 @@
#include "mozilla/dom/MouseEventBinding.h"
#include "mozilla/dom/Touch.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "nsIAppStartup.h"
#include "mozilla/WindowsVersion.h"
#include "mozilla/TextEvents.h" // For WidgetKeyboardEvent
@ -7470,6 +7471,14 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode) {
reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)));
ReleaseDC(mWnd, hdc);
}
// Disable double buffering with D3D compositor for disabling compositor
// window usage.
if (HasGlass() && !gfxVars::UseWebRender() &&
gfxVars::UseDoubleBufferingWithCompositor()) {
gfxVars::SetUseDoubleBufferingWithCompositor(false);
GPUProcessManager::Get()->ResetCompositors();
}
}
#endif // MOZ_XUL