diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /gfx/webrender_bindings/RenderCompositorANGLE.cpp | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | gfx/webrender_bindings/RenderCompositorANGLE.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gfx/webrender_bindings/RenderCompositorANGLE.cpp b/gfx/webrender_bindings/RenderCompositorANGLE.cpp index e01ac6a187..ec102074cb 100644 --- a/gfx/webrender_bindings/RenderCompositorANGLE.cpp +++ b/gfx/webrender_bindings/RenderCompositorANGLE.cpp @@ -36,8 +36,7 @@ #undef PW_RENDERFULLCONTENT #define PW_RENDERFULLCONTENT 0x00000002 -namespace mozilla { -namespace wr { +namespace mozilla::wr { extern LazyLogModule gRenderThreadLog; #define LOG(...) MOZ_LOG(gRenderThreadLog, LogLevel::Debug, (__VA_ARGS__)) @@ -440,11 +439,9 @@ RenderedFrameId RenderCompositorANGLE::EndFrame( if (!UseCompositor()) { auto start = TimeStamp::Now(); - if (mWidget->AsWindows()->HasFxrOutputHandler()) { + if (auto* fxrHandler = mWidget->AsWindows()->GetFxrOutputHandler()) { // There is a Firefox Reality handler for this swapchain. Update this // window's contents to the VR window. - FxROutputHandler* fxrHandler = - mWidget->AsWindows()->GetFxrOutputHandler(); if (fxrHandler->TryInitialize(mSwapChain, mDevice)) { fxrHandler->UpdateOutput(mCtx); } @@ -926,12 +923,9 @@ void RenderCompositorANGLE::InitializeUsePartialPresent() { // Even when mSwapChain1 is null, we could enable WR partial present, since // when mSwapChain1 is null, SwapChain is blit model swap chain with one // buffer. - if (UseCompositor() || mWidget->AsWindows()->HasFxrOutputHandler() || - gfx::gfxVars::WebRenderMaxPartialPresentRects() <= 0) { - mUsePartialPresent = false; - } else { - mUsePartialPresent = true; - } + mUsePartialPresent = !UseCompositor() && + !mWidget->AsWindows()->HasFxrOutputHandler() && + gfx::gfxVars::WebRenderMaxPartialPresentRects() > 0; } bool RenderCompositorANGLE::UsePartialPresent() { return mUsePartialPresent; } @@ -1021,5 +1015,4 @@ bool RenderCompositorANGLE::MaybeReadback( return true; } -} // namespace wr -} // namespace mozilla +} // namespace mozilla::wr |