1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-10-04 09:53:21 +08:00

Deprecated RSBlur (#124)

This commit is contained in:
Daichi Furiya
2018-04-10 03:05:28 +09:00
committed by GitHub
parent 0361d97018
commit 81e72fc553
7 changed files with 19 additions and 16 deletions

View File

@@ -70,15 +70,7 @@ public class BlurTransformation extends BitmapTransformation {
paint.setFlags(Paint.FILTER_BITMAP_FLAG);
canvas.drawBitmap(toTransform, 0, 0, paint);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
try {
bitmap = RSBlur.blur(context, bitmap, radius);
} catch (RSRuntimeException e) {
bitmap = FastBlur.blur(bitmap, radius, true);
}
} else {
bitmap = FastBlur.blur(bitmap, radius, true);
}
bitmap = FastBlur.blur(bitmap, radius, true);
return bitmap;
}

View File

@@ -26,6 +26,7 @@ import android.renderscript.ScriptIntrinsicBlur;
* limitations under the License.
*/
@Deprecated
public class RSBlur {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)