Bug 1442627 - Reduce exposure of the APZCTreeManager. r=botond
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 06 Mar 2018 10:25:38 -0500
changeset 461764 af1eee8c58f7b7a263560f020edef499ca14a09b
parent 461763 54e61d972192277357cec0ee2ccd064f03ada8ea
child 461765 306f68c9845e8579c8175a82a91bc00ff8ec039d
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1442627
milestone60.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 1442627 - Reduce exposure of the APZCTreeManager. r=botond Callers should be using one of the more specific subinterfaces like IAPZCTreeManager (for controller-API methods) or APZSampler (for sampler-API methods). There's also a bunch of android-specific dynamic toolbar code that uses this function - I don't want to deal with that right now, so instead of removing it entirely we can just make it Android-only. MozReview-Commit-ID: I8DYWLYoFgP
gfx/layers/ipc/CompositorBridgeParent.cpp
gfx/layers/ipc/CompositorBridgeParent.h
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1180,21 +1180,23 @@ CompositorBridgeParent::AllocPAPZParent(
 bool
 CompositorBridgeParent::DeallocPAPZParent(PAPZParent* aActor)
 {
   RemoteContentController* controller = static_cast<RemoteContentController*>(aActor);
   controller->Release();
   return true;
 }
 
+#if defined(MOZ_WIDGET_ANDROID)
 RefPtr<APZCTreeManager>
 CompositorBridgeParent::GetAPZCTreeManager()
 {
   return mApzcTreeManager;
 }
+#endif
 
 RefPtr<APZSampler>
 CompositorBridgeParent::GetAPZSampler()
 {
   return mApzSampler;
 }
 
 CompositorBridgeParent*
--- a/gfx/layers/ipc/CompositorBridgeParent.h
+++ b/gfx/layers/ipc/CompositorBridgeParent.h
@@ -459,17 +459,19 @@ public:
   // CrossProcessCompositorBridgeParent.
   void AllocateAPZCTreeManagerParent(const MonitorAutoLock& aProofOfLayerTreeStateLock,
                                      const uint64_t& aLayersId,
                                      LayerTreeState& aLayerTreeStateToUpdate);
 
   PAPZParent* AllocPAPZParent(const uint64_t& aLayersId) override;
   bool DeallocPAPZParent(PAPZParent* aActor) override;
 
+#if defined(MOZ_WIDGET_ANDROID)
   RefPtr<APZCTreeManager> GetAPZCTreeManager();
+#endif
   RefPtr<APZSampler> GetAPZSampler();
 
   CompositorOptions GetOptions() const {
     return mOptions;
   }
 
   TimeDuration GetVsyncInterval() const {
     // the variable is called "rate" but really it's an interval