summaryrefslogtreecommitdiffstats
path: root/core/jni/android_view_ThreadedRenderer.cpp
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-05-15 18:31:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-15 18:31:54 +0000
commit2cc4a4755fcd41900e042c75cc47879d46acecda (patch)
treeff3306dc025499eb1b1011ce273fae3035168630 /core/jni/android_view_ThreadedRenderer.cpp
parent6a5f85080e1a3656fc9a4a22c71cf7bc1f9239de (diff)
parent50210d912925aef14e4ce69be82e4949122a3cd9 (diff)
downloadframeworks_base-2cc4a4755fcd41900e042c75cc47879d46acecda.zip
frameworks_base-2cc4a4755fcd41900e042c75cc47879d46acecda.tar.gz
frameworks_base-2cc4a4755fcd41900e042c75cc47879d46acecda.tar.bz2
Merge "Adjust light source for window position" into mnc-dev
Diffstat (limited to 'core/jni/android_view_ThreadedRenderer.cpp')
-rw-r--r--core/jni/android_view_ThreadedRenderer.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 5d5465b..47132f4 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -290,12 +290,15 @@ static jboolean android_view_ThreadedRenderer_pauseSurface(JNIEnv* env, jobject
}
static void android_view_ThreadedRenderer_setup(JNIEnv* env, jobject clazz, jlong proxyPtr,
- jint width, jint height,
- jfloat lightX, jfloat lightY, jfloat lightZ, jfloat lightRadius,
- jint ambientShadowAlpha, jint spotShadowAlpha, jfloat density) {
+ jint width, jint height, jfloat lightRadius, jint ambientShadowAlpha, jint spotShadowAlpha) {
RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
- proxy->setup(width, height, (Vector3){lightX, lightY, lightZ}, lightRadius,
- ambientShadowAlpha, spotShadowAlpha);
+ proxy->setup(width, height, lightRadius, ambientShadowAlpha, spotShadowAlpha);
+}
+
+static void android_view_ThreadedRenderer_setLightCenter(JNIEnv* env, jobject clazz,
+ jlong proxyPtr, jfloat lightX, jfloat lightY, jfloat lightZ) {
+ RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
+ proxy->setLightCenter((Vector3){lightX, lightY, lightZ});
}
static void android_view_ThreadedRenderer_setOpaque(JNIEnv* env, jobject clazz,
@@ -461,7 +464,8 @@ static JNINativeMethod gMethods[] = {
{ "nInitialize", "(JLandroid/view/Surface;)Z", (void*) android_view_ThreadedRenderer_initialize },
{ "nUpdateSurface", "(JLandroid/view/Surface;)V", (void*) android_view_ThreadedRenderer_updateSurface },
{ "nPauseSurface", "(JLandroid/view/Surface;)Z", (void*) android_view_ThreadedRenderer_pauseSurface },
- { "nSetup", "(JIIFFFFII)V", (void*) android_view_ThreadedRenderer_setup },
+ { "nSetup", "(JIIFII)V", (void*) android_view_ThreadedRenderer_setup },
+ { "nSetLightCenter", "(JFFF)V", (void*) android_view_ThreadedRenderer_setLightCenter },
{ "nSetOpaque", "(JZ)V", (void*) android_view_ThreadedRenderer_setOpaque },
{ "nSyncAndDrawFrame", "(J[JI)I", (void*) android_view_ThreadedRenderer_syncAndDrawFrame },
{ "nDestroy", "(J)V", (void*) android_view_ThreadedRenderer_destroy },