summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-02-01 16:22:50 -0800
committerJohn Hoford <hoford@google.com>2013-02-01 16:22:50 -0800
commit88e34ef6e25ec2ee63b0400accb9f500bf88dc96 (patch)
tree0140ab9475b82ee539751f5cc1c84b995e89e693 /src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java
parentefc561262664cbb9aaf2c4e39a74597329ae77de (diff)
downloadandroid_packages_apps_Snap-88e34ef6e25ec2ee63b0400accb9f500bf88dc96.tar.gz
android_packages_apps_Snap-88e34ef6e25ec2ee63b0400accb9f500bf88dc96.tar.bz2
android_packages_apps_Snap-88e34ef6e25ec2ee63b0400accb9f500bf88dc96.zip
fix performance problem with large images in draw
Change-Id: I9fa5a90e58273c6dd6e80d7d0bf07c3371a6f10e
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java
index fac9e99a9..3177d2473 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDraw.java
@@ -24,7 +24,6 @@ import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.graphics.PathMeasure;
-import android.util.Log;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.editors.EditorDraw;
@@ -280,14 +279,13 @@ public class ImageFilterDraw extends ImageFilter {
return;
}
Paint paint = new Paint();
-
- canvas.save();
- canvas.concat(toScrMatrix);
paint.setStyle(Style.STROKE);
float scale = toScrMatrix.mapRadius(1);
- draw(canvas, paint, mCurrentColor, mCurrentRadius, path);
- canvas.restore();
+ Path mCacheTransPath = new Path();
+ mCacheTransPath.addPath(path, toScrMatrix);
+ draw(canvas, paint, mCurrentColor, toScrMatrix.mapRadius(mCurrentRadius),
+ mCacheTransPath);
}
@Override