summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-03-07 23:16:59 (GMT)
committernicolasroard <nicolasroard@google.com>2013-03-09 01:18:32 (GMT)
commit8f87def525800a584ea38bff209ceb1e80e95078 (patch)
tree70e7aaa69512560a1d938467daf5a18f74b5f2d4 /src_pd
parentb04ff63a0c3b6dab780ead467586d3a52363a6d2 (diff)
downloadandroid_packages_apps_Snap-8f87def525800a584ea38bff209ceb1e80e95078.zip
android_packages_apps_Snap-8f87def525800a584ea38bff209ceb1e80e95078.tar.gz
android_packages_apps_Snap-8f87def525800a584ea38bff209ceb1e80e95078.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() {