summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-10-16 15:40:43 -0700
committerRomain Guy <romainguy@google.com>2012-10-16 15:40:43 -0700
commit7b5201e92d46cc710ead66c1f899f0f4ab65295a (patch)
tree224198999c0857950a45c4b729ff9daf93559bc6 /src
parente8f4d55d6895e1f2bc298ef8978e1aef43ff57c5 (diff)
downloadandroid_packages_screensavers_PhotoTable-7b5201e92d46cc710ead66c1f899f0f4ab65295a.tar.gz
android_packages_screensavers_PhotoTable-7b5201e92d46cc710ead66c1f899f0f4ab65295a.tar.bz2
android_packages_screensavers_PhotoTable-7b5201e92d46cc710ead66c1f899f0f4ab65295a.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dreams/phototable/PhotoTable.java2
-rw-r--r--src/com/android/dreams/phototable/PhotoTouchListener.java1
2 files changed, 0 insertions, 3 deletions
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))