public static IBlur getIBlurAlgorithm ( EBlurAlgorithm algorithm , ContextWrapper contextWrapper ) { RenderScript rs = contextWrapper . getRenderScript ( ) ; Context ctx = contextWrapper . getContext ( ) ; switch ( algorithm ) { case RS_GAUSS_FAST : return new RenderScriptGaussianBlur ( rs ) ; case RS_BOX_5x5 : return new RenderScriptBox5x5Blur ( rs ) ; case RS_GAUSS_5x5 : return new RenderScriptGaussian5x5Blur ( rs ) ; case RS_STACKBLUR : return new RenderScriptStackBlur ( rs , ctx ) ; case STACKBLUR : return new StackBlur ( ) ; case GAUSS_FAST : return new GaussianFastBlur ( ) ; case BOX_BLUR : return new BoxBlur ( ) ; default : return new IgnoreBlur ( ) ; } }
Creates an IBlur instance for the given algorithm enum