summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-03-07 15:16:59 -0800
committernicolasroard <nicolasroard@google.com>2013-03-08 17:18:32 -0800
commit7706e506dc74fa634a69b9ce8c7e5e2c457f01fc (patch)
tree397a00637373d330e696ad6ab90de34ed1b0133a /src_pd
parent0f1d09c93b961369a0e6aef7b6ec708052099e21 (diff)
downloadandroid_packages_apps_Gallery2-7706e506dc74fa634a69b9ce8c7e5e2c457f01fc.zip
android_packages_apps_Gallery2-7706e506dc74fa634a69b9ce8c7e5e2c457f01fc.tar.gz
android_packages_apps_Gallery2-7706e506dc74fa634a69b9ce8c7e5e2c457f01fc.tar.bz2
Memory usage improvements, speed improvement
- free filters resources agressively - implements multiple rendering pipelines - some cleanup Change-Id: Ib9ed268b0b2662d0bf5c049adcf046b556954c37
Diffstat (limited to 'src_pd')
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
index d6b8718..246e3f5 100644
--- a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
+++ b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
@@ -21,10 +21,17 @@ import java.util.Vector;
public class FiltersManager extends BaseFiltersManager {
private static FiltersManager sInstance = null;
+ private static FiltersManager sPreviewInstance = null;
- protected FiltersManager() {
- mFilters = new HashMap<Class, ImageFilter>();
- addFilters(mFilters);
+ public FiltersManager() {
+ init();
+ }
+
+ public static FiltersManager getPreviewManager() {
+ if (sPreviewInstance == null) {
+ sPreviewInstance = new FiltersManager();
+ }
+ return sPreviewInstance;
}
public static FiltersManager getManager() {