summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/AbstractGalleryActivity.java
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2013-02-19 15:49:14 -0800
committerBobby Georgescu <georgescu@google.com>2013-02-22 12:56:23 -0800
commit11cfeeddedd61d3c4aa40945fef0bc2d87c7559d (patch)
treeab09906b8fe29d40768210bbeb5fc16be4a87625 /src/com/android/gallery3d/app/AbstractGalleryActivity.java
parent0718d480a144ba0a44c07c48f90e85cf4ec669c6 (diff)
downloadandroid_packages_apps_Snap-11cfeeddedd61d3c4aa40945fef0bc2d87c7559d.tar.gz
android_packages_apps_Snap-11cfeeddedd61d3c4aa40945fef0bc2d87c7559d.tar.bz2
android_packages_apps_Snap-11cfeeddedd61d3c4aa40945fef0bc2d87c7559d.zip
Replace various BitmapPools with a smarter unified pool
Make all of gallery use a single shared pool, and pave the way for making the pool more adaptive based on the current workload. Change-Id: Ia32561ad50b1b9716ebe2fd32a7bf02737685dac
Diffstat (limited to 'src/com/android/gallery3d/app/AbstractGalleryActivity.java')
-rw-r--r--src/com/android/gallery3d/app/AbstractGalleryActivity.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
index c9cce811a..d96094245 100644
--- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java
+++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
@@ -38,9 +38,9 @@ import android.view.WindowManager;
import com.android.gallery3d.R;
import com.android.gallery3d.common.ApiHelper;
-import com.android.gallery3d.data.BitmapPool;
import com.android.gallery3d.data.DataManager;
import com.android.gallery3d.data.MediaItem;
+import com.android.photos.data.GalleryBitmapPool;
import com.android.gallery3d.ui.GLRoot;
import com.android.gallery3d.ui.GLRootView;
import com.android.gallery3d.util.LightCycleHelper.PanoramaViewHelper;
@@ -222,16 +222,10 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext
} finally {
mGLRootView.unlockRenderThread();
}
- clearBitmapPool(MediaItem.getMicroThumbPool());
- clearBitmapPool(MediaItem.getThumbPool());
-
+ GalleryBitmapPool.getInstance().clear();
MediaItem.getBytesBufferPool().clear();
}
- private static void clearBitmapPool(BitmapPool pool) {
- if (pool != null) pool.clear();
- }
-
@Override
protected void onDestroy() {
super.onDestroy();