diff options
author | Tim Murray <timmurray@google.com> | 2013-04-08 14:33:51 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2013-04-08 14:52:01 -0700 |
commit | 39766b49b97ebbd5b4100075ce8bd6b23dbc473a (patch) | |
tree | 8e191d09b9b436b0e8244295f758ac74eea67404 /src/com/android/gallery3d | |
parent | 1a28e2e4dab537a4efd7f11cdc2f038a9e37ea0a (diff) | |
download | android_packages_apps_Snap-39766b49b97ebbd5b4100075ce8bd6b23dbc473a.tar.gz android_packages_apps_Snap-39766b49b97ebbd5b4100075ce8bd6b23dbc473a.tar.bz2 android_packages_apps_Snap-39766b49b97ebbd5b4100075ce8bd6b23dbc473a.zip |
Allow use of texture.
Change-Id: Ibc75616484d2833d9212c7c68027f83ad40b16cf
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java index 014a11f9e..013776878 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java @@ -104,7 +104,8 @@ public abstract class ImageFilterRS extends ImageFilter { private static Allocation convertBitmap(Bitmap bitmap) { return Allocation.createFromBitmap(CachingPipeline.getRenderScriptContext(), bitmap, - Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); + Allocation.MipmapControl.MIPMAP_NONE, + Allocation.USAGE_SCRIPT | Allocation.USAGE_GRAPHICS_TEXTURE); } private static Allocation convertRGBAtoA(Bitmap bitmap) { @@ -124,7 +125,9 @@ public abstract class ImageFilterRS extends ImageFilter { tb_a8.setX(bitmapTemp.getType().getX()); tb_a8.setY(bitmapTemp.getType().getY()); - Allocation bitmapAlloc = Allocation.createTyped(RS, tb_a8.create()); + Allocation bitmapAlloc = Allocation.createTyped(RS, tb_a8.create(), + Allocation.MipmapControl.MIPMAP_NONE, + Allocation.USAGE_SCRIPT | Allocation.USAGE_GRAPHICS_TEXTURE); mGreyConvert.forEach_RGBAtoA(bitmapTemp, bitmapAlloc); bitmapTemp.destroy(); return bitmapAlloc; |