summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2014-06-26 16:03:25 -0700
committerMichael Wright <michaelwr@google.com>2014-08-05 21:10:03 +0000
commit01e840ff9441e005153d799e71d65b38bcb21902 (patch)
treeec8d5bcc6184e8cc9a120e0f81eb8bbb6438b64b /core/jni
parente877138d44e312477f64a99615c58cef4fcc72a3 (diff)
downloadframeworks_base-01e840ff9441e005153d799e71d65b38bcb21902.zip
frameworks_base-01e840ff9441e005153d799e71d65b38bcb21902.tar.gz
frameworks_base-01e840ff9441e005153d799e71d65b38bcb21902.tar.bz2
Add resize method for virtual displays
Change-Id: I2632fc56c2d2cba356379e42f5c1a3e283b11d1e
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_view_SurfaceControl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 9783e91..3fb084a 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -369,6 +369,13 @@ static void nativeSetDisplayProjection(JNIEnv* env, jclass clazz,
SurfaceComposerClient::setDisplayProjection(token, orientation, layerStackRect, displayRect);
}
+static void nativeSetDisplaySize(JNIEnv* env, jclass clazz,
+ jobject tokenObj, jint width, jint height) {
+ sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
+ if (token == NULL) return;
+ SurfaceComposerClient::setDisplaySize(token, width, height);
+}
+
static jobjectArray nativeGetDisplayConfigs(JNIEnv* env, jclass clazz,
jobject tokenObj) {
sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
@@ -620,6 +627,8 @@ static JNINativeMethod sSurfaceControlMethods[] = {
(void*)nativeSetDisplayLayerStack },
{"nativeSetDisplayProjection", "(Landroid/os/IBinder;IIIIIIIII)V",
(void*)nativeSetDisplayProjection },
+ {"nativeSetDisplaySize", "(Landroid/os/IBinder;II)V",
+ (void*)nativeSetDisplaySize },
{"nativeGetDisplayConfigs", "(Landroid/os/IBinder;)[Landroid/view/SurfaceControl$PhysicalDisplayInfo;",
(void*)nativeGetDisplayConfigs },
{"nativeGetActiveConfig", "(Landroid/os/IBinder;)I",