Skip to content

Commit 7ad40f6

Browse files
committed
Backed out changeset 121326268074 (bug 1737722) for causing build bustages on WRHitTester.cpp. CLOSED TREE
1 parent 24843e3 commit 7ad40f6

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

gfx/layers/apz/src/WRHitTester.cpp

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "mozilla/webrender/WebRenderAPI.h"
1313
#include "nsDebug.h" // for NS_ASSERTION
1414
#include "nsIXULRuntime.h" // for FissionAutostart
15-
#include "mozilla/gfx/Matrix.h"
1615

1716
#define APZCTM_LOG(...) \
1817
MOZ_LOG(APZCTreeManager::sLog, LogLevel::Debug, (__VA_ARGS__))
@@ -23,53 +22,6 @@ namespace layers {
2322
using mozilla::gfx::CompositorHitTestFlags;
2423
using mozilla::gfx::CompositorHitTestInvisibleToHit;
2524

26-
static bool CheckCloseToIdentity(const gfx::Matrix4x4& aMatrix) {
27-
// We allow a factor of 1/2048 in the multiply part of the matrix, so that if
28-
// we multiply by a point on a screen of size 2048 we would be off by at most
29-
// 1 pixel approximately.
30-
const float multiplyEps = 1 / 2048.f;
31-
// We allow 1 pixel in the translate part of the matrix.
32-
const float translateEps = 1.f;
33-
34-
if (!FuzzyEqualsAdditive(aMatrix._11, 1.f, multiplyEps) ||
35-
!FuzzyEqualsAdditive(aMatrix._12, 0.f, multiplyEps) ||
36-
!FuzzyEqualsAdditive(aMatrix._13, 0.f, multiplyEps) ||
37-
!FuzzyEqualsAdditive(aMatrix._14, 0.f, multiplyEps) ||
38-
!FuzzyEqualsAdditive(aMatrix._21, 0.f, multiplyEps) ||
39-
!FuzzyEqualsAdditive(aMatrix._22, 1.f, multiplyEps) ||
40-
!FuzzyEqualsAdditive(aMatrix._23, 0.f, multiplyEps) ||
41-
!FuzzyEqualsAdditive(aMatrix._24, 0.f, multiplyEps) ||
42-
!FuzzyEqualsAdditive(aMatrix._31, 0.f, multiplyEps) ||
43-
!FuzzyEqualsAdditive(aMatrix._32, 0.f, multiplyEps) ||
44-
!FuzzyEqualsAdditive(aMatrix._33, 1.f, multiplyEps) ||
45-
!FuzzyEqualsAdditive(aMatrix._34, 0.f, multiplyEps) ||
46-
!FuzzyEqualsAdditive(aMatrix._41, 0.f, translateEps) ||
47-
!FuzzyEqualsAdditive(aMatrix._42, 0.f, translateEps) ||
48-
!FuzzyEqualsAdditive(aMatrix._43, 0.f, translateEps) ||
49-
!FuzzyEqualsAdditive(aMatrix._44, 1.f, multiplyEps)) {
50-
return false;
51-
}
52-
return true;
53-
}
54-
55-
// Checks that within the constraints of floating point math we can invert it
56-
// reasonably enough that multiplying by the computed inverse is close to the
57-
// identity.
58-
static bool CheckInvertibleWithFinitePrecision(const gfx::Matrix4x4& aMatrix) {
59-
auto inverse = aMatrix.MaybeInverse();
60-
if (inverse.isNothing()) {
61-
// Should we return false?
62-
return true;
63-
}
64-
if (!CheckCloseToIdentity(aMatrix * *inverse)) {
65-
return false;
66-
}
67-
if (!CheckCloseToIdentity(*inverse * aMatrix)) {
68-
return false;
69-
}
70-
return true;
71-
}
72-
7325
IAPZHitTester::HitTestResult WRHitTester::GetAPZCAtPoint(
7426
const ScreenPoint& aHitTestPoint,
7527
const RecursiveMutexAutoLock& aProofOfTreeLock) {
@@ -144,19 +96,6 @@ IAPZHitTester::HitTestResult WRHitTester::GetAPZCAtPoint(
14496
continue;
14597
}
14698

147-
if (!CheckInvertibleWithFinitePrecision(
148-
mTreeManager->GetScreenToApzcTransform(node->GetApzc())
149-
.ToUnknownMatrix())) {
150-
APZCTM_LOG("skipping due to check inverse accuracy\n");
151-
continue;
152-
}
153-
if (!CheckInvertibleWithFinitePrecision(
154-
mTreeManager->GetApzcToGeckoTransform(node->GetApzc())
155-
.ToUnknownMatrix())) {
156-
APZCTM_LOG("skipping due to check inverse accuracy\n");
157-
continue;
158-
}
159-
16099
APZCTM_LOG("selecting as chosen result.\n");
161100
chosenResult = Some(result);
162101
hit.mTargetApzc = node->GetApzc();

0 commit comments

Comments
 (0)