Gallery2: Update ddm lib to 2.5.0 and increase preview bitmap size

Update the DDM lib to latest version and increase the preview bitmap
size to support higher resolution previews.

Change-Id: I57147d4ef7f9ea54f4a40eb9da2127351c7b4b30
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java
index 6475250..690add0 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java
@@ -98,7 +98,8 @@
             filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(filteredW, filteredH, BitmapCache.FILTERS);
             filteredBitmap.setHasAlpha(true);
 
-            boolean result = DualCameraNativeEngine.getInstance().getForegroundImg(point.x, point.y, filteredBitmap);
+            boolean result = DualCameraNativeEngine.getInstance().getForegroundImg(point.x, point.y,
+                    quality != FilterEnvironment.QUALITY_FINAL, filteredBitmap);
 
             if(result == false) {
                 Log.e(TAG, "Imagelib API failed");
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java
index 3af19e7..25faefc 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java
@@ -92,7 +92,8 @@
 
             filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(filteredW, filteredH, BitmapCache.FILTERS);
 
-            result = DualCameraNativeEngine.getInstance().applySketch(point.x, point.y, filteredBitmap);
+            result = DualCameraNativeEngine.getInstance().applySketch(point.x, point.y,
+                    quality != FilterEnvironment.QUALITY_FINAL, filteredBitmap);
 
             if(result == false) {
                 Log.e(TAG, "Imagelib API failed");
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java
index 9874274..0082ec3 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java
@@ -99,11 +99,11 @@
             switch(mParameters.getTextId()) {
             case R.string.focus:
                 result = DualCameraNativeEngine.getInstance().applyFocus(point.x, point.y, intensity,
-                        filteredBitmap);
+                        quality != FilterEnvironment.QUALITY_FINAL, filteredBitmap);
                 break;
             case R.string.halo:
                 result = DualCameraNativeEngine.getInstance().applyHalo(point.x, point.y, intensity,
-                        filteredBitmap);
+                        quality != FilterEnvironment.QUALITY_FINAL, filteredBitmap);
                 break;
             }
 
diff --git a/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java b/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
index ae66214..9dc7d78 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
@@ -62,7 +62,7 @@
     private boolean DEBUG  = false;
     private static final boolean DISABLEZOOM = false;
     public static final int SMALL_BITMAP_DIM = 160;
-    public static final int MAX_BITMAP_DIM = 900;
+    public static final int MAX_BITMAP_DIM = 1280;
     private static MasterImage sMasterImage = null;
 
     private boolean mSupportsHighRes = false;
diff --git a/src/com/android/gallery3d/filtershow/tools/DualCameraNativeEngine.java b/src/com/android/gallery3d/filtershow/tools/DualCameraNativeEngine.java
index 8639d47..e5f13b4 100644
--- a/src/com/android/gallery3d/filtershow/tools/DualCameraNativeEngine.java
+++ b/src/com/android/gallery3d/filtershow/tools/DualCameraNativeEngine.java
@@ -86,11 +86,11 @@
 
     native public boolean getDepthMap(Bitmap dataBuffer);
 
-    native public boolean applyFocus(int focusPointX, int focusPointY, float intensity, Bitmap outBm);
+    native public boolean applyFocus(int focusPointX, int focusPointY, float intensity, boolean isPreview, Bitmap outBm);
 
-    native public boolean applyHalo(int focusPointX, int focusPointY, float intensity, Bitmap outBm);
+    native public boolean applyHalo(int focusPointX, int focusPointY, float intensity, boolean isPreview, Bitmap outBm);
 
-    native public boolean applySketch(int focusPointX, int focusPointY, Bitmap outBm);
+    native public boolean applySketch(int focusPointX, int focusPointY, boolean isPreview, Bitmap outBm);
 
-    native public boolean getForegroundImg(int focusPointX, int focusPointY, Bitmap outBm);
+    native public boolean getForegroundImg(int focusPointX, int focusPointY, boolean isPreview, Bitmap outBm);
 }