summaryrefslogtreecommitdiffstats
path: root/graphics/jni
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-02-23 17:44:28 -0800
committerJason Sams <rjsams@android.com>2010-02-23 17:44:28 -0800
commitc2908e60c9b021fb4bb69acff8d49981dd4dade8 (patch)
tree7b719d7ca8dc804e2906df1d38022ea4f9c22c50 /graphics/jni
parent7eecbf2085bcfe475daf68090a1a4f47fbb6ec72 (diff)
downloadframeworks_base-c2908e60c9b021fb4bb69acff8d49981dd4dade8.zip
frameworks_base-c2908e60c9b021fb4bb69acff8d49981dd4dade8.tar.gz
frameworks_base-c2908e60c9b021fb4bb69acff8d49981dd4dade8.tar.bz2
Support defered generation of mipmaps. With this change we support mipmap generation when the texture is uploaded to GL without requiring RS to retain the full chain.
Diffstat (limited to 'graphics/jni')
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 0ffdf71..cb5a00e 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -444,11 +444,11 @@ nAllocationCreateTyped(JNIEnv *_env, jobject _this, jint e)
}
static void
-nAllocationUploadToTexture(JNIEnv *_env, jobject _this, jint a, jint mip)
+nAllocationUploadToTexture(JNIEnv *_env, jobject _this, jint a, jboolean genMip, jint mip)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nAllocationUploadToTexture, con(%p), a(%p), mip(%i)", con, (RsAllocation)a, mip);
- rsAllocationUploadToTexture(con, (RsAllocation)a, mip);
+ LOG_API("nAllocationUploadToTexture, con(%p), a(%p), genMip(%i), mip(%i)", con, (RsAllocation)a, genMip, mip);
+ rsAllocationUploadToTexture(con, (RsAllocation)a, genMip, mip);
}
static void
@@ -1369,7 +1369,7 @@ static JNINativeMethod methods[] = {
{"nAllocationCreateFromBitmap", "(IZLandroid/graphics/Bitmap;)I", (void*)nAllocationCreateFromBitmap },
{"nAllocationCreateFromBitmapBoxed","(IZLandroid/graphics/Bitmap;)I", (void*)nAllocationCreateFromBitmapBoxed },
{"nAllocationCreateFromAssetStream","(IZI)I", (void*)nAllocationCreateFromAssetStream },
-{"nAllocationUploadToTexture", "(II)V", (void*)nAllocationUploadToTexture },
+{"nAllocationUploadToTexture", "(IZI)V", (void*)nAllocationUploadToTexture },
{"nAllocationUploadToBufferObject","(I)V", (void*)nAllocationUploadToBufferObject },
{"nAllocationSubData1D", "(III[II)V", (void*)nAllocationSubData1D_i },
{"nAllocationSubData1D", "(III[SI)V", (void*)nAllocationSubData1D_s },