diff options
| author | Robert Carr <racarr@google.com> | 2017-03-03 10:48:11 -0800 |
|---|---|---|
| committer | Robert Carr <racarr@google.com> | 2017-03-03 13:06:59 -0800 |
| commit | cd4aeef88052571365d4e193a2c41e2e6d145491 (patch) | |
| tree | 5c4a115dafe671bcd3b200013c73328243488a92 /core/java/android/view/SurfaceSession.java | |
| parent | 1ec752f2dac36b2bf32a9d3fdf5f1f022a09228c (diff) | |
Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.
For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.
The error causing revert was a deferTransactionUntil(-1)...-1
cast to uint, defer transaction until MAX_UINT.
Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ib37236950a1dd3c4f9f4b58fd41ef9003c0557ef
Diffstat (limited to 'core/java/android/view/SurfaceSession.java')
| -rw-r--r-- | core/java/android/view/SurfaceSession.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceSession.java b/core/java/android/view/SurfaceSession.java index 3cf5af484625..b5912bc1e1c8 100644 --- a/core/java/android/view/SurfaceSession.java +++ b/core/java/android/view/SurfaceSession.java @@ -27,6 +27,7 @@ public final class SurfaceSession { private long mNativeClient; // SurfaceComposerClient* private static native long nativeCreate(); + private static native long nativeCreateScoped(long surfacePtr); private static native void nativeDestroy(long ptr); private static native void nativeKill(long ptr); @@ -35,6 +36,10 @@ public final class SurfaceSession { mNativeClient = nativeCreate(); } + public SurfaceSession(Surface root) { + mNativeClient = nativeCreateScoped(root.mNativeObject); + } + /* no user serviceable parts here ... */ @Override protected void finalize() throws Throwable { |
