From 0e1207e03dcdf3d19b5560ddca5defa4ee87801b Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 6 May 2013 18:18:57 -0700 Subject: Switch Fountain(Fbo) to use RSSurfaceView instead of RSTextureView. Change-Id: Ifb036e83d76270075de1e7de3b67bb00c645bff2 --- .../com/example/android/rs/fountainfbo/FountainFboView.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/RenderScriptTests/FountainFbo') diff --git a/tests/RenderScriptTests/FountainFbo/src/com/example/android/rs/fountainfbo/FountainFboView.java b/tests/RenderScriptTests/FountainFbo/src/com/example/android/rs/fountainfbo/FountainFboView.java index 6e40da3..8636717 100644 --- a/tests/RenderScriptTests/FountainFbo/src/com/example/android/rs/fountainfbo/FountainFboView.java +++ b/tests/RenderScriptTests/FountainFbo/src/com/example/android/rs/fountainfbo/FountainFboView.java @@ -17,12 +17,13 @@ package com.example.android.rs.fountainfbo; -import android.renderscript.RSTextureView; +import android.renderscript.RSSurfaceView; import android.renderscript.RenderScriptGL; import android.content.Context; +import android.view.SurfaceHolder; import android.view.MotionEvent; -public class FountainFboView extends RSTextureView { +public class FountainFboView extends RSSurfaceView { public FountainFboView(Context context) { super(context); @@ -31,13 +32,12 @@ public class FountainFboView extends RSTextureView { private RenderScriptGL mRS; private FountainFboRS mRender; - @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); - android.util.Log.e("rs", "onAttachedToWindow"); + public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { + super.surfaceChanged(holder, format, w, h); if (mRS == null) { RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig(); mRS = createRenderScriptGL(sc); + mRS.setSurface(holder, w, h); mRender = new FountainFboRS(); mRender.init(mRS, getResources()); } -- cgit v1.1