[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] 04/179: Bug 1774815 - Make sure if layers connection is requested by parent r=jnicol, gfx-reviewers, bradwerth a=pascalc



This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch tor-browser-102.2.0esr-12.0-1
in repository tor-browser.

commit 3a2903680a76f8276c2a5624a7a66363ed9506b9
Author: sotaro <sotaro.ikeda.g@xxxxxxxxx>
AuthorDate: Sat Jun 18 15:00:41 2022 +0000

    Bug 1774815 - Make sure if layers connection is requested by parent r=jnicol,gfx-reviewers,bradwerth a=pascalc
    
    We want to skip InitRendering only when parent side does not requested to connect layers. Current implementation is not clear about meaning of "mLayersConnected == Some(false)". It has the following 2 meanings.
    [1] parent side does not request to connect layers.
    [2] parent side requested to connect layers, but the connect was failed.
    
    We need to distinguish between [1] and [2]. mLayersConnectRequested is added for it.
    
    Differential Revision: https://phabricator.services.mozilla.com/D149637
---
 dom/ipc/BrowserChild.cpp | 4 +++-
 dom/ipc/BrowserChild.h   | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/dom/ipc/BrowserChild.cpp b/dom/ipc/BrowserChild.cpp
index 686bb93ae5ad9..76655dc2ae204 100644
--- a/dom/ipc/BrowserChild.cpp
+++ b/dom/ipc/BrowserChild.cpp
@@ -1206,6 +1206,7 @@ mozilla::ipc::IPCResult BrowserChild::RecvInitRendering(
     const layers::LayersId& aLayersId,
     const CompositorOptions& aCompositorOptions, const bool& aLayersConnected) {
   mLayersConnected = Some(aLayersConnected);
+  mLayersConnectRequested = Some(aLayersConnected);
   InitRenderingState(aTextureFactoryIdentifier, aLayersId, aCompositorOptions);
   return IPC_OK();
 }
@@ -3141,7 +3142,8 @@ void BrowserChild::ReinitRendering() {
 
   // In some cases, like when we create a windowless browser,
   // RemoteLayerTreeOwner/BrowserChild is not connected to a compositor.
-  if (mLayersConnected.isNothing()) {
+  if (mLayersConnectRequested.isNothing() ||
+      mLayersConnectRequested == Some(false)) {
     return;
   }
 
diff --git a/dom/ipc/BrowserChild.h b/dom/ipc/BrowserChild.h
index a77eaead98196..55b8ecf1e7baf 100644
--- a/dom/ipc/BrowserChild.h
+++ b/dom/ipc/BrowserChild.h
@@ -801,6 +801,7 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
   layers::LayersId mLayersId;
   CSSRect mUnscaledOuterRect;
   Maybe<bool> mLayersConnected;
+  Maybe<bool> mLayersConnectRequested;
   EffectsInfo mEffectsInfo;
 
   RefPtr<VsyncMainChild> mVsyncChild;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits