어떻게 RenderScript 내장 함수를 올바르게 사용합니까?RenderScript 내장 함수 가우시안 블러
//Assuming my original Bitmap is "bm"
Bitmap outputBitmap = Bitmap.createBitmap(bm.getHeight(),
bm.getWidth(), Config.ARGB_8888);
RenderScript rs = RenderScript.create(getApplicationContext());
ScriptIntrinsicBlur theIntrinsic = ScriptIntrinsicBlur
.create(rs, Element.U8_4(rs));
Allocation tmpIn = Allocation.createFromBitmap(rs, bm);
Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
theIntrinsic.setRadius(25.f);
theIntrinsic.setInput(tmpIn);
theIntrinsic.forEach(tmpOut);
tmpOut.copyTo(outputBitmap);
bm.recycle();
rs.destroy
http://android-developers.blogspot.com/2013/08/renderscript-intrinsics.html 내가 초기 레이아웃에 outputBitmap의 일부 검은 영역을 얻을 표시하지만, 같은
는 드로어 블은 자신을 "새로 고침"하고, 사용자가 스크롤 HorizontalScrollView의 스크롤러 후 채워 얻는다.
(도움이된다면) 내가 너무이 오류를 얻을 : 도움이 될 RS의 적절한 사용에 관한
09-01 05:54:11.246: E/RenderScript(11423): rsAssert failed: !mElements.size(), in frameworks/rs/rsElement.cpp at 375
제안.