From d474911010e321e3157e3a0e6123deb7cef77f14 Mon Sep 17 00:00:00 2001 From: wasabeef Date: Tue, 20 Jan 2015 23:36:25 +0900 Subject: [PATCH] Refactor: Comments --- README.md | 2 +- .../jp/wasabeef/glide/transformations/BlurTransformation.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index a4d6da8..ae33c6b 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Glide.with(this).load(R.drawable.demo).bitmapTransform( ## Step 4 -If you are using BlurTransformation. +If you are using `BlurTransformation`. ```groovy android { diff --git a/transformations/src/main/java/jp/wasabeef/glide/transformations/BlurTransformation.java b/transformations/src/main/java/jp/wasabeef/glide/transformations/BlurTransformation.java index 42710a9..0948493 100644 --- a/transformations/src/main/java/jp/wasabeef/glide/transformations/BlurTransformation.java +++ b/transformations/src/main/java/jp/wasabeef/glide/transformations/BlurTransformation.java @@ -53,14 +53,11 @@ public class BlurTransformation implements Transformation { Bitmap source = resource.get(); if (Build.VERSION.SDK_INT > 16) { - - //recreate new bitmap based on source bitmap Bitmap outBitmap = Bitmap.createBitmap(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(outBitmap); canvas.drawBitmap(source, 0, 0, null); - //apply blur effect on image RenderScript rs = RenderScript.create(mContext); Allocation overlayAlloc = Allocation.createFromBitmap(rs, outBitmap); ScriptIntrinsicBlur blur = ScriptIntrinsicBlur.create(rs, overlayAlloc.getElement());