Bug 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange
MozReview-Commit-ID: 4xxuqWHedeS
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -473,26 +473,28 @@ AsyncCompositionManager::AlignFixedAndSt
// so there shouldn't be a transform in between the fixed layer and
// the subtree root layer.
#ifdef DEBUG
Matrix4x4 ancestorTransform;
if (layer != aTransformedSubtreeRoot) {
AccumulateLayerTransforms(layer->GetParent(), aTransformedSubtreeRoot,
ancestorTransform);
}
+ ancestorTransform.NudgeToIntegersFixedEpsilon();
MOZ_ASSERT(ancestorTransform.IsIdentity());
#endif
// Since we create container layers for fixed layers, there shouldn't
// a local CSS or OMTA transform on the fixed layer, either (any local
// transform would go onto a descendant layer inside the container
// layer).
#ifdef DEBUG
Matrix4x4 localTransform;
GetBaseTransform(layer, &localTransform);
+ localTransform.NudgeToIntegersFixedEpsilon();
MOZ_ASSERT(localTransform.IsIdentity());
#endif
// Now work out the translation necessary to make sure the layer doesn't
// move given the new sub-tree root transform.
// Get the layer's fixed anchor point, in the layer's local coordinate space
// (before any transform is applied).