summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-02-21 15:52:49 -0800
committernicolasroard <nicolasroard@google.com>2013-02-21 17:43:58 -0800
commita5fadcfd9faca04fed5c41669fe3895d1ac9c283 (patch)
tree591523332cdd4c67911f63c195def8ac0d7083ae /src/com/android/gallery3d/filtershow/filters
parentc619b9510f048f5aab7ae3b2a1482e695dc6cfd7 (diff)
downloadandroid_packages_apps_Snap-a5fadcfd9faca04fed5c41669fe3895d1ac9c283.tar.gz
android_packages_apps_Snap-a5fadcfd9faca04fed5c41669fe3895d1ac9c283.tar.bz2
android_packages_apps_Snap-a5fadcfd9faca04fed5c41669fe3895d1ac9c283.zip
Pinch to zoom refine
Change-Id: I538defa55a4ed898dd7c936ec813f052ac1b9e0a
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterCurvesRepresentation.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java11
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterBwFilter.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterEdge.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterHighlights.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterKMeans.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java3
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java1
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java1
16 files changed, 27 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterCurvesRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterCurvesRepresentation.java
index 6c831708e..3511c67af 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterCurvesRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterCurvesRepresentation.java
@@ -19,6 +19,7 @@ public class FilterCurvesRepresentation extends FilterRepresentation {
setShowEditingControls(false);
setShowParameterValue(false);
setShowUtilityPanel(true);
+ setSupportsPartialRendering(true);
for (int i = 0; i < mSplines.length; i++) {
mSplines[i] = new Spline();
mSplines[i].reset();
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java
index 859bf327c..d4128dc79 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterFxRepresentation.java
@@ -37,6 +37,7 @@ public class FilterFxRepresentation extends FilterRepresentation {
setShowEditingControls(false);
setShowParameterValue(false);
setShowUtilityPanel(false);
+ setSupportsPartialRendering(true);
}
public String toString() {
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
index 513cdcdef..83f2a1b87 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
@@ -25,6 +25,7 @@ public class FilterRepresentation implements Cloneable {
private String mName;
private int mPriority = TYPE_NORMAL;
private Class mFilterClass;
+ private boolean mSupportsPartialRendering = false;
private int mTextId = 0;
private int mEditorId = BasicEditor.ID;
private int mButtonId = 0;
@@ -52,6 +53,7 @@ public class FilterRepresentation implements Cloneable {
representation.setName(getName());
representation.setPriority(getPriority());
representation.setFilterClass(getFilterClass());
+ representation.setSupportsPartialRendering(supportsPartialRendering());
representation.setTextId(getTextId());
representation.setEditorId(getEditorId());
representation.setButtonId(getButtonId());
@@ -70,6 +72,7 @@ public class FilterRepresentation implements Cloneable {
if (representation.mFilterClass == representation.mFilterClass
&& representation.mName.equalsIgnoreCase(mName)
&& representation.mPriority == mPriority
+ && representation.mSupportsPartialRendering == mSupportsPartialRendering
&& representation.mTextId == mTextId
&& representation.mEditorId == mEditorId
&& representation.mButtonId == mButtonId
@@ -106,6 +109,14 @@ public class FilterRepresentation implements Cloneable {
return false;
}
+ public boolean supportsPartialRendering() {
+ return mSupportsPartialRendering;
+ }
+
+ public void setSupportsPartialRendering(boolean value) {
+ mSupportsPartialRendering = value;
+ }
+
public void useParametersFrom(FilterRepresentation a) {
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterBwFilter.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterBwFilter.java
index c92ac012d..a4626cdb2 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterBwFilter.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterBwFilter.java
@@ -36,6 +36,7 @@ public class ImageFilterBwFilter extends SimpleImageFilter {
representation.setMinimum(-180);
representation.setTextId(R.string.bwfilter);
representation.setButtonId(R.id.bwfilterButton);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java
index 2f94e3d17..2097f0d6e 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterContrast.java
@@ -37,6 +37,7 @@ public class ImageFilterContrast extends SimpleImageFilter {
representation.setMinimum(-100);
representation.setMaximum(100);
representation.setDefaultValue(0);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterEdge.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterEdge.java
index 55c709573..46a9a294c 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterEdge.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterEdge.java
@@ -32,6 +32,7 @@ public class ImageFilterEdge extends SimpleImageFilter {
representation.setFilterClass(ImageFilterEdge.class);
representation.setTextId(R.string.edge);
representation.setButtonId(R.id.edgeButton);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java
index 7a8df71af..b0b0b2dd8 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterExposure.java
@@ -36,6 +36,7 @@ public class ImageFilterExposure extends SimpleImageFilter {
representation.setMinimum(-100);
representation.setMaximum(100);
representation.setDefaultValue(0);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterHighlights.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterHighlights.java
index b9a14652a..12f032dcd 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterHighlights.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterHighlights.java
@@ -41,6 +41,7 @@ public class ImageFilterHighlights extends SimpleImageFilter {
representation.setMinimum(-100);
representation.setMaximum(100);
representation.setDefaultValue(0);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java
index 8c484c72e..b1f9f7365 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterHue.java
@@ -39,6 +39,7 @@ public class ImageFilterHue extends SimpleImageFilter {
representation.setTextId(R.string.hue);
representation.setButtonId(R.id.hueButton);
representation.setEditorId(BasicEditor.ID);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterKMeans.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterKMeans.java
index f48bd047a..6f785ef54 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterKMeans.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterKMeans.java
@@ -45,6 +45,7 @@ public class ImageFilterKMeans extends SimpleImageFilter {
representation.setPreviewValue(4);
representation.setTextId(R.string.kmeans);
representation.setButtonId(R.id.kmeansButton);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
index 841c5c913..c256686fb 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
@@ -19,6 +19,7 @@ public class ImageFilterNegative extends ImageFilter {
representation.setShowEditingControls(false);
representation.setShowParameterValue(false);
representation.setEditorId(ImageOnlyEditor.ID);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java
index 6cd833206..0febe4957 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterSaturated.java
@@ -37,6 +37,7 @@ public class ImageFilterSaturated extends SimpleImageFilter {
representation.setMinimum(-100);
representation.setMaximum(100);
representation.setDefaultValue(0);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java
index e17823955..fd67ee8fc 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterShadows.java
@@ -37,6 +37,7 @@ public class ImageFilterShadows extends SimpleImageFilter {
representation.setMinimum(-100);
representation.setMaximum(100);
representation.setDefaultValue(0);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
index 9c99d57d0..8afa47451 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
@@ -37,7 +37,8 @@ public class ImageFilterSharpen extends ImageFilterRS {
representation.setTextId(R.string.sharpness);
representation.setButtonId(R.id.sharpenButton);
representation.setOverlayId(R.drawable.filtershow_button_colors_sharpen);
- representation.setEditorId(R.id.imageZoom);
+ representation.setEditorId(R.id.imageShow);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java
index a57af71df..ea315d326 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterVibrance.java
@@ -36,6 +36,7 @@ public class ImageFilterVibrance extends SimpleImageFilter {
representation.setMinimum(-100);
representation.setMaximum(100);
representation.setDefaultValue(0);
+ representation.setSupportsPartialRendering(true);
return representation;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java
index 2f4852306..c4c293a4b 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterWBalance.java
@@ -37,6 +37,7 @@ public class ImageFilterWBalance extends ImageFilter {
representation.setShowEditingControls(false);
representation.setShowParameterValue(false);
representation.setEditorId(ImageOnlyEditor.ID);
+ representation.setSupportsPartialRendering(true);
return representation;
}