From 1f2c35311b1d994c04ead7b2c58822b57abb3ed9 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Wed, 16 Nov 2016 15:59:24 -0500 Subject: [PATCH] Bug 1315854 - Account for rounding error when checking if certain transforms are the identity in AsyncCompositionManager::AlignFixedAndStickyLayers(). r=mstange MozReview-Commit-ID: 4xxuqWHedeS --HG-- extra : rebase_source : ee81a68b7e084896333cb0a9ac97a83e3c0f0388 --- gfx/layers/composite/AsyncCompositionManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index 948ee4874cd7..69eafcecae70 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -478,6 +478,7 @@ AsyncCompositionManager::AlignFixedAndStickyLayers(Layer* aTransformedSubtreeRoo AccumulateLayerTransforms(layer->GetParent(), aTransformedSubtreeRoot, ancestorTransform); } + ancestorTransform.NudgeToIntegersFixedEpsilon(); MOZ_ASSERT(ancestorTransform.IsIdentity()); #endif @@ -488,6 +489,7 @@ AsyncCompositionManager::AlignFixedAndStickyLayers(Layer* aTransformedSubtreeRoo #ifdef DEBUG Matrix4x4 localTransform; GetBaseTransform(layer, &localTransform); + localTransform.NudgeToIntegersFixedEpsilon(); MOZ_ASSERT(localTransform.IsIdentity()); #endif