diff options
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index ad10832b8966..d3c801f2f730 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 The Android Open Source Project + * Copyright (C) 2008-2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -231,10 +231,10 @@ public class RenderScript { rsnTypeGetNativeData(mContext, id, typeData); } - native int rsnAllocationCreateTyped(int con, int type, int mip, int usage); - synchronized int nAllocationCreateTyped(int type, int mip, int usage) { + native int rsnAllocationCreateTyped(int con, int type, int mip, int usage, int pointer); + synchronized int nAllocationCreateTyped(int type, int mip, int usage, int pointer) { validate(); - return rsnAllocationCreateTyped(mContext, type, mip, usage); + return rsnAllocationCreateTyped(mContext, type, mip, usage, pointer); } native int rsnAllocationCreateFromBitmap(int con, int type, int mip, Bitmap bmp, int usage); synchronized int nAllocationCreateFromBitmap(int type, int mip, Bitmap bmp, int usage) { @@ -269,6 +269,12 @@ public class RenderScript { validate(); rsnAllocationSyncAll(mContext, alloc, src); } + native int rsnAllocationGetSurfaceTextureID(int con, int alloc); + synchronized int nAllocationGetSurfaceTextureID(int alloc) { + validate(); + return rsnAllocationGetSurfaceTextureID(mContext, alloc); + } + native void rsnAllocationGenerateMipmaps(int con, int alloc); synchronized void nAllocationGenerateMipmaps(int alloc) { validate(); @@ -584,6 +590,11 @@ public class RenderScript { rsnMeshGetIndices(mContext, id, idxIds, primitives, vtxIdCount); } + native int rsnPathCreate(int con, int prim, boolean isStatic, int vtx, int loop, float q); + synchronized int nPathCreate(int prim, boolean isStatic, int vtx, int loop, float q) { + validate(); + return rsnPathCreate(mContext, prim, isStatic, vtx, loop, q); + } int mDev; int mContext; @@ -837,7 +848,8 @@ public class RenderScript { mRS.mErrorCallback.mErrorNum = subID; mRS.mErrorCallback.run(); } else { - //throw new RSRuntimeException("Received error num " + subID + ", details: " + e); + // Do not throw here. In these cases, we do not have + // a fatal error. } continue; } |