summaryrefslogtreecommitdiffstats
path: root/tests/RenderScriptTests/FountainFbo
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-05-06 18:18:57 -0700
committerStephen Hines <srhines@google.com>2013-05-06 18:18:57 -0700
commit0e1207e03dcdf3d19b5560ddca5defa4ee87801b (patch)
tree7abc069a1aa0754f302a98af5c6644124b8621d3 /tests/RenderScriptTests/FountainFbo
parent9cbe2ae3aeb9a73c866bfd96b34f2d8ce895ab6b (diff)
downloadframeworks_base-0e1207e03dcdf3d19b5560ddca5defa4ee87801b.zip
frameworks_base-0e1207e03dcdf3d19b5560ddca5defa4ee87801b.tar.gz
frameworks_base-0e1207e03dcdf3d19b5560ddca5defa4ee87801b.tar.bz2
Switch Fountain(Fbo) to use RSSurfaceView instead of RSTextureView.
Change-Id: Ifb036e83d76270075de1e7de3b67bb00c645bff2
Diffstat (limited to 'tests/RenderScriptTests/FountainFbo')
-rw-r--r--tests/RenderScriptTests/FountainFbo/src/com/example/android/rs/fountainfbo/FountainFboView.java12
1 files changed, 6 insertions, 6 deletions
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());
}