summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/AlbumLabelMaker.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-04-17 20:35:14 +0800
committerChih-Chung Chang <chihchung@google.com>2012-04-18 20:31:10 +0800
commit2eaa2112c460e931ad0261b408213d3d1217d96f (patch)
treee0b9a6e51284ec5e369a3d9926704b1c69190139 /src/com/android/gallery3d/ui/AlbumLabelMaker.java
parent146df37d6a6c7ca8686f5934b3d90b16c24a2583 (diff)
downloadandroid_packages_apps_Snap-2eaa2112c460e931ad0261b408213d3d1217d96f.tar.gz
android_packages_apps_Snap-2eaa2112c460e931ad0261b408213d3d1217d96f.tar.bz2
android_packages_apps_Snap-2eaa2112c460e931ad0261b408213d3d1217d96f.zip
Add thumb pool the cache Bitmap used for thumbnails.
Change-Id: Ib710f2a6fc1aa86fe4abdd18d1fa7ac71396a3b4
Diffstat (limited to 'src/com/android/gallery3d/ui/AlbumLabelMaker.java')
-rw-r--r--src/com/android/gallery3d/ui/AlbumLabelMaker.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/ui/AlbumLabelMaker.java b/src/com/android/gallery3d/ui/AlbumLabelMaker.java
index 43a9055a4..f837092b8 100644
--- a/src/com/android/gallery3d/ui/AlbumLabelMaker.java
+++ b/src/com/android/gallery3d/ui/AlbumLabelMaker.java
@@ -1,4 +1,18 @@
-// Copyright 2012 Google Inc. All Rights Reserved.
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.android.gallery3d.ui;
@@ -106,7 +120,7 @@ public class AlbumLabelMaker {
mLabelWidth = width;
int borders = 2 * BORDER_SIZE;
mBitmapPool = new BitmapPool(
- width + borders, mSpec.labelBackgroundHeight + borders);
+ width + borders, mSpec.labelBackgroundHeight + borders, 16);
}
public ThreadPool.Job<Bitmap> requestLabel(
@@ -192,7 +206,7 @@ public class AlbumLabelMaker {
}
}
- public void reycleLabel(Bitmap label) {
+ public void recycleLabel(Bitmap label) {
mBitmapPool.recycle(label);
}