Support applications changing the surface attached to the RS.
This commit is contained in:
@@ -64,6 +64,7 @@ public class RenderScript {
|
||||
native void nDeviceSetConfig(int dev, int param, int value);
|
||||
native int nContextCreate(int dev, Surface sur, int ver, boolean useDepth);
|
||||
native void nContextDestroy(int con);
|
||||
native void nContextSetSurface(Surface sur);
|
||||
|
||||
native void nContextBindRootScript(int script);
|
||||
native void nContextBindSampler(int sampler, int slot);
|
||||
@@ -276,6 +277,11 @@ public class RenderScript {
|
||||
mMessageThread.start();
|
||||
}
|
||||
|
||||
public void contextSetSurface(Surface sur) {
|
||||
mSurface = sur;
|
||||
nContextSetSurface(mSurface);
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
nContextDeinitToClient();
|
||||
mMessageThread.mRun = false;
|
||||
|
||||
Reference in New Issue
Block a user