// Path: dali/src/main/java/at/favre/lib/dali/blur/algorithms/RenderScriptGaussianBlur.java
// public class RenderScriptGaussianBlur implements IBlur {
//     private RenderScript rs;
// 
//     public RenderScriptGaussianBlur(RenderScript rs) {
//         this.rs = rs;
//     }
// 
//     @Override
//     public Bitmap blur(int radius, Bitmap bitmapOriginal) {
//         final Allocation input = Allocation.createFromBitmap(rs, bitmapOriginal);
//         final Allocation output = Allocation.createTyped(rs, input.getType());
//         final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
//         script.setRadius(radius);
//         script.setInput(input);
//         script.forEach(output);
//         output.copyTo(bitmapOriginal);
//         return bitmapOriginal;
//     }
// }


import androidx.renderscript.RenderScript;
import java.util.ArrayList;
import java.util.List;
import at.favre.lib.dali.blur.algorithms.RenderScriptGaussianBlur;
package at.favre.lib.dali.blur;




/**
 * Enum of all supported algorithms
 *
 * @author pfavre
 */
public enum EBlurAlgorithm {
    RS_GAUSS_FAST, RS_BOX_5x5,
    RS_GAUSS_5x5, RS_STACKBLUR, STACKBLUR,
    GAUSS_FAST, BOX_BLUR, NONE;

    public static List<EBlurAlgorithm> getAllAlgorithms() {
        List<EBlurAlgorithm> algorithms = new ArrayList<EBlurAlgorithm>();
        for (EBlurAlgorithm algorithm : values()) {
            if (!algorithm.equals(NONE)) {
                algorithms.add(algorithm);
            }
        }
        return algorithms;
    }

    public static IBlur createDefaultBlur(RenderScript rs) {
// Path: dali/src/main/java/at/favre/lib/dali/blur/algorithms/RenderScriptGaussianBlur.java
// public class RenderScriptGaussianBlur implements IBlur {
//     private RenderScript rs;
// 
//     public RenderScriptGaussianBlur(RenderScript rs) {
//         this.rs = rs;
//     }
// 
//     @Override
//     public Bitmap blur(int radius, Bitmap bitmapOriginal) {
//         final Allocation input = Allocation.createFromBitmap(rs, bitmapOriginal);
//         final Allocation output = Allocation.createTyped(rs, input.getType());
//         final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
//         script.setRadius(radius);
//         script.setInput(input);
//         script.forEach(output);
//         output.copyTo(bitmapOriginal);
//         return bitmapOriginal;
//     }
// }


// Path: dali/src/main/java/at/favre/lib/dali/blur/EBlurAlgorithm.java
import androidx.renderscript.RenderScript;
import java.util.ArrayList;
import java.util.List;
import at.favre.lib.dali.blur.algorithms.RenderScriptGaussianBlur;

package at.favre.lib.dali.blur;




/**
 * Enum of all supported algorithms
 *
 * @author pfavre
 */
public enum EBlurAlgorithm {
    RS_GAUSS_FAST, RS_BOX_5x5,
    RS_GAUSS_5x5, RS_STACKBLUR, STACKBLUR,
    GAUSS_FAST, BOX_BLUR, NONE;

    public static List<EBlurAlgorithm> getAllAlgorithms() {
        List<EBlurAlgorithm> algorithms = new ArrayList<EBlurAlgorithm>();
        for (EBlurAlgorithm algorithm : values()) {
            if (!algorithm.equals(NONE)) {
                algorithms.add(algorithm);
            }
        }
        return algorithms;
    }

    public static IBlur createDefaultBlur(RenderScript rs) {
        return new RenderScriptGaussianBlur(rs);