diff options
author | chaviw <chaviw@google.com> | 2021-08-10 13:56:04 -0500 |
---|---|---|
committer | Chavi Weingarten <chaviw@google.com> | 2021-08-16 14:50:22 +0000 |
commit | 8ca2be726d07ad0810c29692158a0c9c57b563d4 (patch) | |
tree | 5c08a76959d5dc3f4215134e0228615f8872b252 /libs/hwui/apex/android_matrix.cpp | |
parent | 577a74da8d0afb7a869a07a2fb5996b13906237d (diff) |
Add transform matrix to InputWindowHandle.
Added the transform matrix from WindowInfo native to the Java side
InputWindowHandle. This is to allow clients that register a
WindowInfoListener to translate the window's screen coordinates to
window space.
Test: Transform is now sent to WindowInfoListener
Bug: 188792659
Change-Id: Ifba8488ff470d3c6c8066e23b871c3d541cff0a1
Diffstat (limited to 'libs/hwui/apex/android_matrix.cpp')
-rw-r--r-- | libs/hwui/apex/android_matrix.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/apex/android_matrix.cpp b/libs/hwui/apex/android_matrix.cpp index 693b22b62663..04ac3cf0ebc8 100644 --- a/libs/hwui/apex/android_matrix.cpp +++ b/libs/hwui/apex/android_matrix.cpp @@ -35,3 +35,10 @@ bool AMatrix_getContents(JNIEnv* env, jobject matrixObj, float values[9]) { } return false; } + +jobject AMatrix_newInstance(JNIEnv* env, float values[9]) { + jobject matrixObj = android::android_graphics_Matrix_newInstance(env); + SkMatrix* m = android::android_graphics_Matrix_getSkMatrix(env, matrixObj); + m->set9(values); + return matrixObj; +} |