diff options
author | Romain Guy <romainguy@android.com> | 2009-08-31 14:06:43 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-08-31 14:06:43 -0700 |
commit | 650a3eb7d621dc8e81573142a4498bbd07bcde27 (patch) | |
tree | cd6622f813c00317a8d382ecaf031b90924d1170 /graphics/java/android/renderscript/RenderScript.java | |
parent | de5cd3d8646f312987062f46616466ae191aa984 (diff) | |
download | frameworks_base-650a3eb7d621dc8e81573142a4498bbd07bcde27.zip frameworks_base-650a3eb7d621dc8e81573142a4498bbd07bcde27.tar.gz frameworks_base-650a3eb7d621dc8e81573142a4498bbd07bcde27.tar.bz2 |
Load bitmap resources entirely from native code.
Change-Id: I6660baec241794c40611bce79b7f9ce9479e52ba
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index ee7b702..0f188f6 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -16,13 +16,10 @@ package android.renderscript; -import java.io.IOException; -import java.io.InputStream; import java.lang.reflect.Field; -import android.content.res.Resources; import android.graphics.Bitmap; -import android.renderscript.Type; +import android.graphics.BitmapFactory; import android.util.Config; import android.util.Log; import android.view.Surface; @@ -35,6 +32,7 @@ import android.view.Surface; public class RenderScript { static final String LOG_TAG = "libRS_jni"; private static final boolean DEBUG = false; + @SuppressWarnings({"UnusedDeclaration", "deprecation"}) private static final boolean LOG_ENABLED = DEBUG ? Config.LOGD : Config.LOGV; @@ -43,6 +41,7 @@ public class RenderScript { * We use a class initializer to allow the native code to cache some * field offsets. */ + @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"}) private static boolean sInitialized; native private static void _nInit(); @@ -95,6 +94,7 @@ public class RenderScript { native int nAllocationCreateSized(int elem, int count); native int nAllocationCreateFromBitmap(int dstFmt, boolean genMips, Bitmap bmp); native int nAllocationCreateFromBitmapBoxed(int dstFmt, boolean genMips, Bitmap bmp); + native int nAllocationCreateFromAssetStream(int dstFmt, boolean genMips, int assetStream); native void nAllocationUploadToTexture(int alloc, int baseMioLevel); native void nAllocationUploadToBufferObject(int alloc); @@ -188,6 +188,7 @@ public class RenderScript { private int mDev; private int mContext; + @SuppressWarnings({"FieldCanBeLocal"}) private Surface mSurface; private static boolean mElementsInitialized = false; |