Bug 1457586 - Initialize AsyncPanZoomController::mPlatformSpecificState before the axes. r=kats
authorBotond Ballo <botond@mozilla.com>
Fri, 05 Oct 2018 16:51:13 +0000
changeset 495572 2ab8498738f4f8f823ad979a6ac8579dfa64c4f0
parent 495571 5d40107ce896cd188a295e5f0a77d8095cc0c96b
child 495573 1507f6511c87bc7be36b864bde447d9da8bd4839
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1457586
milestone64.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 1457586 - Initialize AsyncPanZoomController::mPlatformSpecificState before the axes. r=kats This allows the Axis constructors to use the platform-specific state. MozReview-Commit-ID: KWtDX4XVpjF Depends on D7656 Differential Revision: https://phabricator.services.mozilla.com/D7657
gfx/layers/apz/src/AsyncPanZoomController.h
--- a/gfx/layers/apz/src/AsyncPanZoomController.h
+++ b/gfx/layers/apz/src/AsyncPanZoomController.h
@@ -941,16 +941,20 @@ private:
 
   // These variables cache the layout viewport, scroll offset, and zoom stored
   // in |Metrics()| the last time SampleCompositedAsyncTransform() was
   // called.
   CSSRect mCompositedLayoutViewport;
   CSSPoint mCompositedScrollOffset;
   CSSToParentLayerScale2D mCompositedZoom;
 
+  // Groups state variables that are specific to a platform.
+  // Initialized on first use.
+  UniquePtr<PlatformSpecificStateBase> mPlatformSpecificState;
+
   AxisX mX;
   AxisY mY;
 
   // This flag is set to true when we are in a axis-locked pan as a result of
   // the touch-action CSS property.
   bool mPanDirRestricted;
 
   // This flag is set to true when we are in a pinch-locked state. ie: user
@@ -972,20 +976,16 @@ private:
   // Stores the previous focus point if there is a pinch gesture happening. Used
   // to allow panning by moving multiple fingers (thus moving the focus point).
   ParentLayerPoint mLastZoomFocus;
 
   RefPtr<AsyncPanZoomAnimation> mAnimation;
 
   UniquePtr<OverscrollEffectBase> mOverscrollEffect;
 
-  // Groups state variables that are specific to a platform.
-  // Initialized on first use.
-  UniquePtr<PlatformSpecificStateBase> mPlatformSpecificState;
-
   friend class Axis;
 
 public:
   /**
    * Invoke |callable|, passing |mLastContentPaintMetrics| as argument,
    * while holding the APZC lock required to access |mLastContentPaintMetrics|.
    * This allows code outside of an AsyncPanZoomController method implementation
    * to access |mLastContentPaintMetrics| without having to make a copy of it.