summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2014-12-05 18:44:11 -0800
committerSteve Kondik <steve@cyngn.com>2015-11-09 03:20:07 -0800
commit3ad7fc68ca4fe989ae6dd266320733501074b812 (patch)
tree35035383d6b8ed219942fa27bf8b1bd1d019b090 /core/jni
parent9fb080b2fa29ebf3b56e0c34cf9b78a167a11a84 (diff)
downloadframeworks_base-3ad7fc68ca4fe989ae6dd266320733501074b812.zip
frameworks_base-3ad7fc68ca4fe989ae6dd266320733501074b812.tar.gz
frameworks_base-3ad7fc68ca4fe989ae6dd266320733501074b812.tar.bz2
WindowManager: Upper level changes to expose blur effect
Upper level changes to expose blur-behind and blur-mask effect Change-Id: I6d37b43888c8c5e028974bd714596d8178cb5114 WindowManager: Adding template for BlurLayer file Cyanogen changes: * Use config.xml instead of settings * Don't break stuff if not supported in SF * Incremental fade for insecure lockscreen * Disabled extra effects for now Change-Id: Icefe452f7a015656661e8543849c9b88889dbb40 SystemUI: hide blur when showing keyguard media It's still showing up behind eating up cycles Change-Id: I8b1a0f2cfafcc1dcf2a9a472fc15b987e4a3992b Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_SurfaceControl.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 20352eb..7156c0f 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -316,6 +316,39 @@ static void nativeSetLayerStack(JNIEnv* env, jclass clazz, jlong nativeObject, j
}
}
+static void nativeSetBlur(JNIEnv* env, jclass clazz, jlong nativeObject, jfloat blur) {
+ SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
+ status_t err = ctrl->setBlur(blur);
+ if (err < 0 && err != NO_INIT) {
+ doThrowIAE(env);
+ }
+}
+
+static void nativeSetBlurMaskSurface(JNIEnv* env, jclass clazz, jlong nativeObject, jlong maskLayerNativeObject) {
+ SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
+ SurfaceControl* const maskLayer = reinterpret_cast<SurfaceControl *>(maskLayerNativeObject);
+ status_t err = ctrl->setBlurMaskSurface(maskLayer);
+ if (err < 0 && err != NO_INIT) {
+ doThrowIAE(env);
+ }
+}
+
+static void nativeSetBlurMaskSampling(JNIEnv* env, jclass clazz, jlong nativeObject, jint blurMaskSampling) {
+ SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
+ status_t err = ctrl->setBlurMaskSampling(blurMaskSampling);
+ if (err < 0 && err != NO_INIT) {
+ doThrowIAE(env);
+ }
+}
+
+static void nativeSetBlurMaskAlphaThreshold(JNIEnv* env, jclass clazz, jlong nativeObject, jfloat alpha) {
+ SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
+ status_t err = ctrl->setBlurMaskAlphaThreshold(alpha);
+ if (err < 0 && err != NO_INIT) {
+ doThrowIAE(env);
+ }
+}
+
static jobject nativeGetBuiltInDisplay(JNIEnv* env, jclass clazz, jint id) {
sp<IBinder> token(SurfaceComposerClient::getBuiltInDisplay(id));
return javaObjectForIBinder(env, token);
@@ -614,6 +647,14 @@ static JNINativeMethod sSurfaceControlMethods[] = {
(void*)nativeSetWindowCrop },
{"nativeSetLayerStack", "(JI)V",
(void*)nativeSetLayerStack },
+ {"nativeSetBlur", "(JF)V",
+ (void*)nativeSetBlur },
+ {"nativeSetBlurMaskSurface", "(JJ)V",
+ (void*)nativeSetBlurMaskSurface },
+ {"nativeSetBlurMaskSampling", "(JI)V",
+ (void*)nativeSetBlurMaskSampling },
+ {"nativeSetBlurMaskAlphaThreshold", "(JF)V",
+ (void*)nativeSetBlurMaskAlphaThreshold },
{"nativeGetBuiltInDisplay", "(I)Landroid/os/IBinder;",
(void*)nativeGetBuiltInDisplay },
{"nativeCreateDisplay", "(Ljava/lang/String;Z)Landroid/os/IBinder;",