From 7b5201e92d46cc710ead66c1f899f0f4ab65295a Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 16 Oct 2012 15:40:43 -0700 Subject: Save memory PhotoTable creates layers when they are not needed. Since the images are pretty big this generates large allocations that don't help improve performance. Change-Id: I95f28c27c8facc1fd4562cb7ba1f3c83fd80d9fc --- src/com/android/dreams/phototable/PhotoTable.java | 2 -- src/com/android/dreams/phototable/PhotoTouchListener.java | 1 - 2 files changed, 3 deletions(-) (limited to 'src') diff --git a/src/com/android/dreams/phototable/PhotoTable.java b/src/com/android/dreams/phototable/PhotoTable.java index 89a669e..49941cd 100644 --- a/src/com/android/dreams/phototable/PhotoTable.java +++ b/src/com/android/dreams/phototable/PhotoTable.java @@ -388,7 +388,6 @@ public class PhotoTable extends FrameLayout { log("animate it"); // toss onto table photo.animate() - .withLayer() .scaleX(mTableRatio / mImageRatio) .scaleY(mTableRatio / mImageRatio) .rotation(angle) @@ -442,7 +441,6 @@ public class PhotoTable extends FrameLayout { log("animate it"); // toss onto table photo.animate() - .withLayer() .rotation(0f) .scaleX(scale) .scaleY(scale) diff --git a/src/com/android/dreams/phototable/PhotoTouchListener.java b/src/com/android/dreams/phototable/PhotoTouchListener.java index 2cfcbd4..8076e72 100644 --- a/src/com/android/dreams/phototable/PhotoTouchListener.java +++ b/src/com/android/dreams/phototable/PhotoTouchListener.java @@ -128,7 +128,6 @@ public class PhotoTouchListener implements View.OnTouchListener { Math.min(photoWidth * mTableRatio, photoHeight * mTableRatio) / 2f; final View photo = target; ViewPropertyAnimator animator = photo.animate() - .withLayer() .xBy(x1 - x0) .yBy(y1 - y0) .setDuration((int) (1000f * n / 60f)) -- cgit v1.2.3