summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-05-20 18:10:25 -0700
committerChris Craik <ccraik@google.com>2014-05-21 13:50:29 -0700
commit797b95b26bbb7557678af78b9a2a61830158920f (patch)
treeb2e895c064c511446b2709160c9d614819f871b2 /core/jni
parentd6a91b0bb64b17dcf4ae635f428dfd4ad310f73e (diff)
downloadframeworks_base-797b95b26bbb7557678af78b9a2a61830158920f.zip
frameworks_base-797b95b26bbb7557678af78b9a2a61830158920f.tar.gz
frameworks_base-797b95b26bbb7557678af78b9a2a61830158920f.tar.bz2
Define light position (using new lighting spec) in Java
Also updates the relative shadow strengths. Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_ThreadedRenderer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 2c10212..48fb729 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -34,6 +34,7 @@
#include <renderthread/RenderProxy.h>
#include <renderthread/RenderTask.h>
#include <renderthread/RenderThread.h>
+#include <Vector.h>
namespace android {
@@ -223,10 +224,11 @@ static void android_view_ThreadedRenderer_pauseSurface(JNIEnv* env, jobject claz
proxy->pauseSurface(window);
}
-static void android_view_ThreadedRenderer_setup(JNIEnv* env, jobject clazz,
- jlong proxyPtr, jint width, jint height) {
+static void android_view_ThreadedRenderer_setup(JNIEnv* env, jobject clazz, jlong proxyPtr,
+ jint width, jint height,
+ jfloat lightX, jfloat lightY, jfloat lightZ, jfloat lightRadius) {
RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
- proxy->setup(width, height);
+ proxy->setup(width, height, Vector3(lightX, lightY, lightZ), lightRadius);
}
static void android_view_ThreadedRenderer_setOpaque(JNIEnv* env, jobject clazz,
@@ -316,7 +318,7 @@ 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;)V", (void*) android_view_ThreadedRenderer_pauseSurface },
- { "nSetup", "(JII)V", (void*) android_view_ThreadedRenderer_setup },
+ { "nSetup", "(JIIFFFF)V", (void*) android_view_ThreadedRenderer_setup },
{ "nSetOpaque", "(JZ)V", (void*) android_view_ThreadedRenderer_setOpaque },
{ "nSyncAndDrawFrame", "(JJIIII)I", (void*) android_view_ThreadedRenderer_syncAndDrawFrame },
{ "nDestroyCanvasAndSurface", "(J)V", (void*) android_view_ThreadedRenderer_destroyCanvasAndSurface },