summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker/src/com/android/photos/views
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-02-12 15:34:41 -0800
committerAdam Cohen <adamcohen@google.com>2015-02-24 23:18:25 +0000
commit65b929d6f21683198caf28e266fd2cf52c843764 (patch)
tree17a5b6443943f2d5aa04016c575f7fb09ffb6caa /WallpaperPicker/src/com/android/photos/views
parent31178b8237ccb6af666df60ef60c116c8afdf316 (diff)
downloadandroid_packages_apps_Trebuchet-65b929d6f21683198caf28e266fd2cf52c843764.tar.gz
android_packages_apps_Trebuchet-65b929d6f21683198caf28e266fd2cf52c843764.tar.bz2
android_packages_apps_Trebuchet-65b929d6f21683198caf28e266fd2cf52c843764.zip
Reducing memory usage of wallpaper picker
> Loading preview bitmap only once, instead of loading it twice at BitmapRegionTileSource and BitmapSource > Maintaing a weak-set of reusable bitmaps and reusing them for decoding bitmaps > Loading images on a HandlerThread (instead of AsyncTask) and removing any non-started task before submitting a new task > Loading inbuild images (from resources) on HandlerThread instead of UIThread > Freeing up unbound GL textures before binding a new texture. Bug: 18382606 Change-Id: Ic4ca630dd113ded65d2853eb0d291c9e5823637e (cherry picked from commit 283c2261bd4440f4108a564cea0f5fc499781213)
Diffstat (limited to 'WallpaperPicker/src/com/android/photos/views')
-rw-r--r--WallpaperPicker/src/com/android/photos/views/TiledImageView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/WallpaperPicker/src/com/android/photos/views/TiledImageView.java b/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
index 524fa2e47..56ee7a658 100644
--- a/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
+++ b/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
@@ -125,6 +125,10 @@ public class TiledImageView extends FrameLayout {
invalidate();
}
+ public TileSource getTileSource() {
+ return mRenderer.source;
+ }
+
@Override
protected void onLayout(boolean changed, int left, int top, int right,
int bottom) {