Methods Summary |
---|
private void | ensureRenderScript()
if (mRS == null) {
RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig();
sc.setDepth(16, 24);
mRS = createRenderScriptGL(sc);
mRender = new RsRenderStatesRS();
mRender.init(mRS, getResources());
}
|
protected void | onAttachedToWindow()
super.onAttachedToWindow();
ensureRenderScript();
|
protected void | onDetachedFromWindow()
mRender = null;
if (mRS != null) {
mRS = null;
destroyRenderScriptGL();
}
|
public boolean | onTouchEvent(android.view.MotionEvent ev)
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
mRender.onActionDown((int)ev.getX(), (int)ev.getY());
return true;
}
return false;
|
public void | surfaceChanged(android.view.SurfaceHolder holder, int format, int w, int h)
super.surfaceChanged(holder, format, w, h);
mRender.surfaceChanged();
|