From 00ac0a2945f4d1a3b091990e99c46db5548d7e62 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 16 Jul 2014 08:57:06 -0400 Subject: [PATCH] Back out c4bb900163fc (part 3 of bug 1009733) for breaking windows builds. r=backout on a CLOSED TREE --- gfx/layers/apz/src/AsyncPanZoomController.cpp | 36 ------------------- gfx/layers/apz/src/AsyncPanZoomController.h | 3 -- 2 files changed, 39 deletions(-) diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index fb59acfeefa9..4e7e459682ea 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -405,26 +405,6 @@ GetFrameTime() { return sFrameTime; } -static pthread_t sControllerThread; - -static void -AssertOnControllerThread() { - if (!AsyncPanZoomController::GetThreadAssertionsEnabled()) { - return; - } - - static bool sControllerThreadDetermined = false; - if (!sControllerThreadDetermined) { - // Technically this may not actually pick up the correct controller thread, - // if the first call to this method happens from a non-controller thread. - // If the assertion below fires, it is possible that it is because - // sControllerThread is not actually the controller thread. - sControllerThread = pthread_self(); - sControllerThreadDetermined = true; - } - MOZ_ASSERT(pthread_equal(sControllerThread, pthread_self()) != 0); -} - class FlingAnimation: public AsyncPanZoomAnimation { public: FlingAnimation(AsyncPanZoomController& aApzc, @@ -816,8 +796,6 @@ AsyncPanZoomController::GetTouchStartTolerance() } nsEventStatus AsyncPanZoomController::ReceiveInputEvent(const InputData& aEvent) { - AssertOnControllerThread(); - if (aEvent.mInputType != MULTITOUCH_INPUT) { return HandleInputEvent(aEvent); } @@ -865,8 +843,6 @@ nsEventStatus AsyncPanZoomController::ReceiveInputEvent(const InputData& aEvent) } nsEventStatus AsyncPanZoomController::HandleInputEvent(const InputData& aEvent) { - AssertOnControllerThread(); - nsEventStatus rv = nsEventStatus_eIgnore; switch (aEvent.mInputType) { @@ -913,8 +889,6 @@ nsEventStatus AsyncPanZoomController::HandleInputEvent(const InputData& aEvent) nsEventStatus AsyncPanZoomController::HandleGestureEvent(const InputData& aEvent) { - AssertOnControllerThread(); - nsEventStatus rv = nsEventStatus_eIgnore; switch (aEvent.mInputType) { @@ -2496,8 +2470,6 @@ AsyncPanZoomController::ScheduleContentResponseTimeout() { void AsyncPanZoomController::ContentResponseTimeout() { - AssertOnControllerThread(); - mTouchBlockBalance++; APZC_LOG("%p got a content response timeout; balance %d\n", this, mTouchBlockBalance); if (mTouchBlockBalance > 0) { @@ -2520,8 +2492,6 @@ AsyncPanZoomController::ContentResponseTimeout() { void AsyncPanZoomController::ContentReceivedTouch(bool aPreventDefault) { - AssertOnControllerThread(); - mTouchBlockBalance--; APZC_LOG("%p got a content response; balance %d\n", this, mTouchBlockBalance); if (mTouchBlockBalance < 0) { @@ -2544,8 +2514,6 @@ AsyncPanZoomController::ContentReceivedTouch(bool aPreventDefault) { void AsyncPanZoomController::SetAllowedTouchBehavior(const nsTArray& aBehaviors) { - AssertOnControllerThread(); - bool found = false; for (size_t i = 0; i < mTouchBlockQueue.Length(); i++) { if (mTouchBlockQueue[i]->SetAllowedTouchBehaviors(aBehaviors)) { @@ -2562,8 +2530,6 @@ AsyncPanZoomController::SetAllowedTouchBehavior(const nsTArrayIsReadyForHandling()) { @@ -2624,8 +2590,6 @@ AsyncPanZoomController::StartNewTouchBlock(bool aCopyAllowedTouchBehaviorFromCur TouchBlockState* AsyncPanZoomController::CurrentTouchBlock() { - AssertOnControllerThread(); - MOZ_ASSERT(!mTouchBlockQueue.IsEmpty()); return mTouchBlockQueue[0].get(); } diff --git a/gfx/layers/apz/src/AsyncPanZoomController.h b/gfx/layers/apz/src/AsyncPanZoomController.h index 864f56a36339..2e3486bcef6e 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.h +++ b/gfx/layers/apz/src/AsyncPanZoomController.h @@ -719,7 +719,6 @@ private: private: // The queue of touch blocks that have not yet been processed by this APZC. - // This member must only be accessed on the controller/UI thread. nsTArray> mTouchBlockQueue; // This variable requires some explanation. Strap yourself in. @@ -768,8 +767,6 @@ private: // Therefore the information in that block is lost. An alternative approach would // be to keep around those blocks until they have received both the content response // and timeout expiration, but that involves a higher level of memory usage. - // - // This member must only be accessed on the controller/UI thread. int32_t mTouchBlockBalance;