Skip to content
Commit ae02ad50 authored by Winson Chung's avatar Winson Chung
Browse files

Add registry for tracking leaking surface controls

- When enabled, the registry will track active surface controls within
  the process. If the number of surfaces exceeds a specific threshold,
  info about the registered surfaces can be dumped to help narrow down
  where they were registered/leaked. This also facilitates adding
  tests of flows to ensure new surfaces are properly cleaned up.
- Only callers with the READ_FRAME_BUFFER permission can enable the
  registry
- Once the max threshold is crossed, information is dumped to logcat
  only once until the number of surfaces falls under the reset threshold
  to ensure we don't spam the logs

Bug: 266978825
Test: atest FrameworksCoreTests:android.view.SurfaceControlRegistryTests
Change-Id: Ife73357e7db4b45d474ef3933afd3e33b8681f85
parent 9d74abd8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment