Android Open Source - LiveBlurListView Script Intrinsic Blur Render






From Project

Back to project page LiveBlurListView.

License

The source code is released under:

Apache License

If you think the Android project LiveBlurListView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.koalcat.view;
/*from   w  ww .  j a  v a  2  s. c o  m*/
import android.annotation.SuppressLint;
import android.content.Context;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.ScriptIntrinsicBlur;

public class ScriptIntrinsicBlurRender extends RSRender {

  private ScriptIntrinsicBlur theIntrinsic;
  
  @SuppressLint("NewApi")
  public ScriptIntrinsicBlurRender(Context context) {
    super(context);
    // TODO Auto-generated constructor stub
    theIntrinsic = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
  }

  @SuppressLint("NewApi")
  @Override
  public void blur(float radius, Allocation tmpIn, Allocation tmpOut) {
    // TODO Auto-generated method stub
    theIntrinsic.setRadius(radius);
    theIntrinsic.setInput(tmpIn);
    theIntrinsic.forEach(tmpOut);
  }

  @Override
  public void destroy() {
    // TODO Auto-generated method stub
    super.destroy();
    theIntrinsic.destroy();
  }
}




Java Source Code List

com.koalcat.blurdemo.AppInfo.java
com.koalcat.blurdemo.ApplicationsAdapter.java
com.koalcat.blurdemo.BlurActivity.java
com.koalcat.blurdemo.FastBitmapDrawable.java
com.koalcat.blurdemo.HanziToPinyin.java
com.koalcat.blurdemo.IndexCursor.java
com.koalcat.blurdemo.Utilities.java
com.koalcat.view.BaseRender.java
com.koalcat.view.BlurRSRender.java
com.koalcat.view.Blur.java
com.koalcat.view.GLRender.java
com.koalcat.view.JNIRender.java
com.koalcat.view.LiveBlurListView.java
com.koalcat.view.LiveBlurViewGroup.java
com.koalcat.view.RSRender.java
com.koalcat.view.ScriptIntrinsicBlurRender.java