OSDN Git Service

Change element type to A_8 to support sampling.
authorTim Murray <timmurray@google.com>
Thu, 14 Mar 2013 20:56:39 +0000 (13:56 -0700)
committerTim Murray <timmurray@google.com>
Thu, 14 Mar 2013 20:56:39 +0000 (13:56 -0700)
Change-Id: Ib91c924c9c2966bf431e24519af8ade7e360cf88

src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java

index 595aa9b..3d35562 100644 (file)
@@ -144,12 +144,12 @@ public abstract class ImageFilterRS extends ImageFilter {
     }
 
     private static synchronized Allocation convertRGBAtoA(Bitmap bitmap) {
-        Type.Builder tb_a8 = new Type.Builder(sRS, Element.U8(sRS));
+        Type.Builder tb_a8 = new Type.Builder(sRS, Element.A_8(sRS));
         ScriptC_grey greyConvert = new ScriptC_grey(sRS,
                 sRS.getApplicationContext().getResources(), R.raw.grey);
 
         Allocation bitmapTemp = convertBitmap(bitmap);
-        if (bitmapTemp.getType().getElement().isCompatible(Element.U8(sRS))) {
+        if (bitmapTemp.getType().getElement().isCompatible(Element.A_8(sRS))) {
             return bitmapTemp;
         }