Bug 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange
authorBotond Ballo <botond@mozilla.com>
Wed, 16 Nov 2016 15:59:24 -0500
changeset 367863 ef895cb3fb7d0b9c0d09e2fd773951e696d69d0f
parent 367862 1ef70e4bf1a748d3eccafb55e0f5b370a1d848bb
child 367864 d35e32293f2173bd6480d9d0a0788e29cd2cb198
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1315854
milestone53.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 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange MozReview-Commit-ID: 4xxuqWHedeS
gfx/layers/composite/AsyncCompositionManager.cpp
--- 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).