diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-02-12 15:34:41 -0800 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2015-02-24 23:18:25 +0000 |
commit | 65b929d6f21683198caf28e266fd2cf52c843764 (patch) | |
tree | 17a5b6443943f2d5aa04016c575f7fb09ffb6caa /WallpaperPicker/src/com/android/gallery3d/glrenderer | |
parent | 31178b8237ccb6af666df60ef60c116c8afdf316 (diff) | |
download | android_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/gallery3d/glrenderer')
-rw-r--r-- | WallpaperPicker/src/com/android/gallery3d/glrenderer/GLES20Canvas.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLES20Canvas.java b/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLES20Canvas.java index 8af1f5932..933260b48 100644 --- a/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLES20Canvas.java +++ b/WallpaperPicker/src/com/android/gallery3d/glrenderer/GLES20Canvas.java @@ -696,6 +696,7 @@ public class GLES20Canvas implements GLCanvas { } private void prepareTexture(BasicTexture texture, int program, ShaderParameter[] params) { + deleteRecycledResources(); GLES20.glUseProgram(program); checkError(); enableBlending(!texture.isOpaque() || getAlpha() < OPAQUE_ALPHA); |