Bug 1350638 - Remove sync GetCompositorOptions call added in the last patch. r=dvander
authorKartikaya Gupta <kgupta@mozilla.com>
Sun, 09 Apr 2017 17:31:06 -0400
changeset 352069 dbfa42b56f1b7a94c9f0c0cdb3b249fcfb9fbe6c
parent 352068 e3ddc4081b947910affb3c7fb6207e0adfe6a251
child 352070 4b455ab566a205ad6f37eadd1f3400ac01203ec1
push id31629
push usercbook@mozilla.com
push dateMon, 10 Apr 2017 08:32:22 +0000
treeherdermozilla-central@50cb1ce431d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1350638
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1350638 - Remove sync GetCompositorOptions call added in the last patch. r=dvander This call should be a no-op in the real world, and should be safe to remove. The patch also adds an assert to ensure that the call is effectively a no-op. MozReview-Commit-ID: BXdcnHULWW2
gfx/ipc/CompositorOptions.h
gfx/layers/ipc/CompositorBridgeParent.cpp
layout/ipc/RenderFrameParent.cpp
--- a/gfx/ipc/CompositorOptions.h
+++ b/gfx/ipc/CompositorOptions.h
@@ -40,16 +40,21 @@ public:
     : mUseAPZ(aUseAPZ)
     , mUseWebRender(aUseWebRender)
   {
   }
 
   bool UseAPZ() const { return mUseAPZ; }
   bool UseWebRender() const { return mUseWebRender; }
 
+  bool operator==(const CompositorOptions& aOther) {
+    return mUseAPZ == aOther.mUseAPZ &&
+           mUseWebRender == aOther.mUseWebRender;
+  }
+
   friend struct IPC::ParamTraits<CompositorOptions>;
 
 private:
   bool mUseAPZ;
   bool mUseWebRender;
 
   // Make sure to add new fields to the ParamTraits implementation
 };
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1586,16 +1586,19 @@ CompositorBridgeParent::RecvMapAndNotify
 }
 
 mozilla::ipc::IPCResult
 CompositorBridgeParent::RecvAdoptChild(const uint64_t& child)
 {
   APZCTreeManagerParent* parent;
   {
     MonitorAutoLock lock(*sIndirectLayerTreesLock);
+    // We currently don't support adopting children from one compositor to
+    // another if the two compositors don't have the same options.
+    MOZ_ASSERT(sIndirectLayerTrees[child].mParent->mOptions == mOptions);
     NotifyChildCreated(child);
     if (sIndirectLayerTrees[child].mLayerTree) {
       sIndirectLayerTrees[child].mLayerTree->SetLayerManager(mLayerManager);
     }
     parent = sIndirectLayerTrees[child].mApzcTreeManagerParent;
   }
 
   if (mApzcTreeManager && parent) {
--- a/layout/ipc/RenderFrameParent.cpp
+++ b/layout/ipc/RenderFrameParent.cpp
@@ -211,17 +211,16 @@ RenderFrameParent::OwnerContentChanged(n
 {
   MOZ_ASSERT(!mFrameLoader || mFrameLoader->GetOwnerContent() == aContent,
              "Don't build new map if owner is same!");
 
   RefPtr<LayerManager> lm = mFrameLoader ? GetFrom(mFrameLoader) : nullptr;
   // Perhaps the document containing this frame currently has no presentation?
   if (lm && lm->GetCompositorBridgeChild()) {
     mLayersConnected = lm->GetCompositorBridgeChild()->SendAdoptChild(mLayersId);
-    lm->GetCompositorBridgeChild()->SendGetCompositorOptions(mLayersId, &mCompositorOptions);
     FrameLayerBuilder::InvalidateAllLayers(lm);
   }
 }
 
 void
 RenderFrameParent::ActorDestroy(ActorDestroyReason why)
 {
   if (mLayersId != 0) {