Bug 1526489 - Remove boolean return value of {Apply,Unapply}AsyncTestAttributes. r=kats
authorBotond Ballo <botond@mozilla.com>
Mon, 25 Mar 2019 21:05:42 +0000
changeset 525223 cc4ed5c152c0db45084cdf0c692bb2398c9145bd
parent 525222 c3931d5145ef8da1ba8d8bf4e27d3912994bb1b6
child 525224 d3071cbcf6780ea9c57fb767cdb43a5b4b00f8b6
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1526489
milestone68.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 1526489 - Remove boolean return value of {Apply,Unapply}AsyncTestAttributes. r=kats No one was using them. Differential Revision: https://phabricator.services.mozilla.com/D24610
gfx/layers/apz/src/AsyncPanZoomController.cpp
gfx/layers/apz/src/AsyncPanZoomController.h
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -4126,38 +4126,36 @@ bool AsyncPanZoomController::SampleCompo
     mCompositedLayoutViewport = Metrics().GetLayoutViewport();
     mCompositedScrollOffset = Metrics().GetScrollOffset();
     mCompositedZoom = Metrics().GetZoom();
     return true;
   }
   return false;
 }
 
-bool AsyncPanZoomController::ApplyAsyncTestAttributes() {
+void AsyncPanZoomController::ApplyAsyncTestAttributes() {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   if (mTestAsyncScrollOffset == CSSPoint() &&
       mTestAsyncZoom == LayerToParentLayerScale()) {
-    return false;
+    return;
   }
   Metrics().ZoomBy(mTestAsyncZoom.scale);
   ScrollBy(mTestAsyncScrollOffset);
   SampleCompositedAsyncTransform();
-  return true;
 }
 
-bool AsyncPanZoomController::UnapplyAsyncTestAttributes(
+void AsyncPanZoomController::UnapplyAsyncTestAttributes(
     const FrameMetrics& aPrevFrameMetrics) {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
   if (mTestAsyncScrollOffset == CSSPoint() &&
       mTestAsyncZoom == LayerToParentLayerScale()) {
-    return false;
+    return;
   }
   Metrics() = aPrevFrameMetrics;
   SampleCompositedAsyncTransform();
-  return true;
 }
 
 Matrix4x4 AsyncPanZoomController::GetTransformToLastDispatchedPaint() const {
   RecursiveMutexAutoLock lock(mRecursiveMutex);
 
   LayerPoint scrollChange = (mLastContentPaintMetrics.GetScrollOffset() -
                              mExpectedGeckoMetrics.GetScrollOffset()) *
                             mLastContentPaintMetrics.GetDevPixelsPerCSSPixel() *
--- a/gfx/layers/apz/src/AsyncPanZoomController.h
+++ b/gfx/layers/apz/src/AsyncPanZoomController.h
@@ -1176,29 +1176,25 @@ class AsyncPanZoomController {
  private:
   friend class AutoApplyAsyncTestAttributes;
 
   /**
    * Applies |mTestAsyncScrollOffset| and |mTestAsyncZoom| to this
    * AsyncPanZoomController. Calls |SampleCompositedAsyncTransform| to ensure
    * that the GetCurrentAsync* functions consider the test offset and zoom in
    * their computations.
-   *
-   * Returns false if neither test value is set, and true otherwise.
    */
-  bool ApplyAsyncTestAttributes();
+  void ApplyAsyncTestAttributes();
 
   /**
    * Sets this AsyncPanZoomController's FrameMetrics to |aPrevFrameMetrics| and
    * calls |SampleCompositedAsyncTransform| to unapply any test values applied
    * by |ApplyAsyncTestAttributes|.
-   *
-   * Returns false if neither test value is set, and true otherwise.
    */
-  bool UnapplyAsyncTestAttributes(const FrameMetrics& aPrevFrameMetrics);
+  void UnapplyAsyncTestAttributes(const FrameMetrics& aPrevFrameMetrics);
 
   /* ===================================================================
    * The functions and members in this section are used to manage
    * the state that tracks what this APZC is doing with the input events.
    */
  protected:
   enum PanZoomState {
     NOTHING,  /* no touch-start events received */