Back out c4bb900163fc (part 3 of bug 1009733) for breaking windows builds. r=backout on a CLOSED TREE

This commit is contained in:
Kartikaya Gupta 2014-07-16 08:57:06 -04:00
Родитель f1f7167b64
Коммит 00ac0a2945
2 изменённых файлов: 0 добавлений и 39 удалений

Просмотреть файл

@ -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<TouchBehaviorFlags>& 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 nsTArray<TouchBehaviorFlag
void
AsyncPanZoomController::ProcessPendingInputBlocks() {
AssertOnControllerThread();
while (true) {
TouchBlockState* curBlock = CurrentTouchBlock();
if (!curBlock->IsReadyForHandling()) {
@ -2624,8 +2590,6 @@ AsyncPanZoomController::StartNewTouchBlock(bool aCopyAllowedTouchBehaviorFromCur
TouchBlockState*
AsyncPanZoomController::CurrentTouchBlock()
{
AssertOnControllerThread();
MOZ_ASSERT(!mTouchBlockQueue.IsEmpty());
return mTouchBlockQueue[0].get();
}

Просмотреть файл

@ -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<UniquePtr<TouchBlockState>> 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;