OSDN Git Service

Fix RenderScriptGL setSurfaceTexture problem
authorXiaofei Wan <xiaofei.wan@intel.com>
Mon, 31 Mar 2014 06:26:20 +0000 (14:26 +0800)
committerXiaofei Wan <xiaofei.wan@intel.com>
Mon, 31 Mar 2014 06:40:08 +0000 (14:40 +0800)
rsnContextSetSurfaceTexture() has no implementation in rs-jni, use nContextSetSurface() in setSurfaceTexture().

Change-Id: I066432575c9e74f21ea3a3776628b572b6e31377
Signed-off-by: Xiaofei Wan <xiaofei.wan@intel.com>
rs/java/android/renderscript/RenderScriptGL.java

index c9cbe3e..d6841c8 100644 (file)
@@ -232,9 +232,13 @@ public class RenderScriptGL extends RenderScript {
         validate();
         //android.util.Log.v("rs", "set surface " + sur + " w=" + w + ", h=" + h);
 
+        Surface s = null;
+        if (sur != null) {
+            s = new Surface(sur);
+        }
         mWidth = w;
         mHeight = h;
-        nContextSetSurfaceTexture(w, h, sur);
+        nContextSetSurface(w, h, s);
     }
 
     /**