Bug 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange, a=jcristau
authorBotond Ballo <botond@mozilla.com>
Wed, 16 Nov 2016 15:59:24 -0500
changeset 352543 0057723898d4c2ab03bff9a991c5b8ddf5756064
parent 352542 a2b6e3fc03729758f7935bfbb08a77a7839492b6
child 352544 81e6bda81ba52616f021f53144ac7e7e654c7cc5
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, jcristau
bugs1315854
milestone52.0a2
Bug 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange, a=jcristau 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).