From db66e627ad8904491e384c64f82fc77a939b9705 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Mon, 10 Apr 2017 16:55:57 -0700 Subject: SurfaceFlinger: Add parent-less relative layering. This is a temporary functionality for the intermediate state where not all child-surface like things in WM land are ported to use Child Surfaces. In particular, we have ported SurfaceView to use child surfaces and relative Z ordering. However the TV frameworks provide a View framework component which overlays views over the SurfaceView but below the main application window. Since we have not ported View framework surfaces to use child layers, there is nothing the WM or View Framework can do about this situation. Luckily the WM API's to have requested this are @hide but we have the one media framework component using it. In order to solve this issue we provide a method to set Z ordering relative to another window without inheriting its coordinate space as a child window would. This way the WM can recognize these TYPE_APPLICATION_MEDIA_OVERLAY windows and Z-order them at -1 with respect to the parents (and the SurfaceView can be at -2). Test: Included in transaction tests. Also manual test of bug repro steps with accomp frameworks/base CL Bug: 36693738 Change-Id: I921852d3d34f67f79ec745b9703f9e679867e7a1 --- libs/gui/LayerState.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 2461cba152..9b06e63610 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -44,6 +44,7 @@ status_t layer_state_t::write(Parcel& output) const output.writeUint64(frameNumber); output.writeInt32(overrideScalingMode); output.writeStrongBinder(IInterface::asBinder(barrierGbp)); + output.writeStrongBinder(relativeLayerHandle); output.write(transparentRegion); return NO_ERROR; } @@ -75,6 +76,7 @@ status_t layer_state_t::read(const Parcel& input) overrideScalingMode = input.readInt32(); barrierGbp = interface_cast(input.readStrongBinder()); + relativeLayerHandle = input.readStrongBinder(); input.read(transparentRegion); return NO_ERROR; } -- cgit v1.2.3-59-g8ed1b