From 530b22ab4e9076926e13502b443e3ce3879b45ae Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Tue, 23 Aug 2011 14:36:55 -0700 Subject: [PATCH] Fix invalidation roundoff error with old animations We need to add .5 to the width/height of invalidation areas to avoid truncation errors. Change-Id: Iaa2407a91a6a7f6d729af21d45e77e436197df11 --- core/java/android/view/ViewGroup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 8fa1922bee8f6..7c826ca952337 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -2628,7 +2628,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager final int left = cl + (int) region.left; final int top = ct + (int) region.top; - invalidate(left, top, left + (int) region.width(), top + (int) region.height()); + invalidate(left, top, left + (int) (region.width() + .5f), + top + (int) (region.height() + .5f)); } } } else if ((flags & FLAG_SUPPORT_STATIC_TRANSFORMATIONS) ==