summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-05-10 17:44:23 -0700
committerztenghui <ztenghui@google.com>2013-05-13 10:57:29 -0700
commitf4862f0a3df697db6000972dbfd5387727506072 (patch)
treed71bc3964e0809402d29cefb7e101312b4bb502f /src
parentcaa77af0d12fa40418a342385bc47b8db6267e6c (diff)
downloadandroid_packages_apps_Snap-f4862f0a3df697db6000972dbfd5387727506072.tar.gz
android_packages_apps_Snap-f4862f0a3df697db6000972dbfd5387727506072.tar.bz2
android_packages_apps_Snap-f4862f0a3df697db6000972dbfd5387727506072.zip
Fix another annoying warning log spam
bug:8771541 When we set up the icon rendering, we need to set the geometry, too. Change-Id: I331bdb752c5183d5e2611d8387505055c4219b92
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/ui/FilterIconButton.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java b/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java
index a15060b59..c3c87694a 100644
--- a/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java
+++ b/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
+import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
@@ -30,6 +31,7 @@ import com.android.gallery3d.filtershow.cache.RenderingRequestCaller;
import com.android.gallery3d.filtershow.category.Action;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.imageshow.GeometryListener;
+import com.android.gallery3d.filtershow.imageshow.GeometryMetadata;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
import com.android.gallery3d.filtershow.presets.ImagePreset;
import com.android.gallery3d.filtershow.tools.IconFactory;
@@ -148,6 +150,12 @@ public class FilterIconButton extends IconButton implements View.OnClickListener
if (dst != null && mAction != null) {
ImagePreset mPreset = new ImagePreset();
mPreset.addFilter(mFilterRepresentation);
+
+ GeometryMetadata geometry = mPreset.mGeoData;
+ RectF bound = new RectF(0, 0, dst.getWidth(), dst.getHeight());
+ geometry.setCropBounds(bound);
+ geometry.setPhotoBounds(bound);
+
RenderingRequest.post(dst.copy(Bitmap.Config.ARGB_8888, true),
mPreset, RenderingRequest.ICON_RENDERING, this);
}