summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2009-08-21 16:29:42 -0700
committerRomain Guy <romainguy@android.com>2009-08-21 16:29:42 -0700
commit1965610f3b8047a9d8c8a3c37007914d9054fe9c (patch)
treeda4e2a64b9229ea66a3321d9913b129beb94a236 /libs
parent475ead0c5107b620d487c1ed4298a3f6671fc2b2 (diff)
downloadframeworks_base-1965610f3b8047a9d8c8a3c37007914d9054fe9c.zip
frameworks_base-1965610f3b8047a9d8c8a3c37007914d9054fe9c.tar.gz
frameworks_base-1965610f3b8047a9d8c8a3c37007914d9054fe9c.tar.bz2
Fix FallRS by keeping a reference to the mesh.
Diffstat (limited to 'libs')
-rw-r--r--libs/rs/java/Fall/src/com/android/fall/rs/FallRS.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/rs/java/Fall/src/com/android/fall/rs/FallRS.java b/libs/rs/java/Fall/src/com/android/fall/rs/FallRS.java
index 3b13bed..8a33d66 100644
--- a/libs/rs/java/Fall/src/com/android/fall/rs/FallRS.java
+++ b/libs/rs/java/Fall/src/com/android/fall/rs/FallRS.java
@@ -103,6 +103,9 @@ class FallRS {
private int mMeshWidth;
private int mMeshHeight;
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private RenderScript.TriangleMesh mMesh;
+
private Allocation mRippleMap;
private Allocation mRefractionMap;
@@ -211,8 +214,8 @@ class FallRS {
}
}
- RenderScript.TriangleMesh mesh = rs.triangleMeshCreate();
- mesh.setName("WaterMesh");
+ mMesh = rs.triangleMeshCreate();
+ mMesh.setName("WaterMesh");
mMeshWidth = wResolution + 1;
mMeshHeight = hResolution + 1;