Reparent DisplayContent layers to SurfaceControl for ActivityView
With the current implementation, when an ActivityView is created, it creates a new Display in both DisplayManager and SurfaceFlinger. Then it attaches the SurfaceView's surface to the Display so the content generated for the second display renders into the SurfaceView. However, this is inefficient since it requires the rendered content to get copied over. With this change, the ActivityView creates a VirtualDisplay but also creates a new SurfaceControl. It then notifies WindowManager so WM can instead reparent the windows that represent the new VirtualDispay to be a child of the SurfaceControl passed in. The SurfaceControl passed in is a child of the SurfaceView's SC so the content in the new VirtualDisplay will just automatically render onto the main display without having to copy. The SF hierarchy will have the VirtualDisplay's surfaces as children of the SurfaceView, but the WM will still represent the VirtualDisplay as a second display. Test: Run app with ActivityView and launch Activity in AV Change-Id: I21c9bb189b6c12b0d98c67c8e68f53c621a4a802 Fixes: 111440225
Loading
Please register or sign in to comment