First pass at implementing the Grass live wallpaper in RenderScript.

This change also adds second(), minute() and hour() to the RS library.
This commit is contained in:
Romain Guy
2009-07-30 18:45:01 -07:00
parent 1a20bae18c
commit 584a375df6
16 changed files with 464 additions and 1 deletions

View File

@@ -139,6 +139,7 @@ public class RenderScript {
native private void nScriptCSetClearColor(float r, float g, float b, float a);
native private void nScriptCSetClearDepth(float depth);
native private void nScriptCSetClearStencil(int stencil);
native private void nScriptCSetTimeZone(byte[] timeZone);
native private void nScriptCAddType(int type);
native private void nScriptCSetRoot(boolean isRoot);
native private void nScriptCSetScript(byte[] script, int offset, int length);
@@ -670,6 +671,15 @@ public class RenderScript {
nScriptCBegin();
}
public void scriptCSetTimeZone(String timeZone) {
try {
byte[] bytes = timeZone.getBytes("UTF-8");
nScriptCSetTimeZone(bytes);
} catch (java.io.UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
public void scriptCSetClearColor(float r, float g, float b, float a) {
nScriptCSetClearColor(r, g, b, a);
}