diff options
| author | Jorim Jaggi <jjaggi@google.com> | 2020-06-19 00:49:51 +0200 |
|---|---|---|
| committer | Jorim Jaggi <jjaggi@google.com> | 2020-06-26 13:40:07 +0000 |
| commit | 543db32125c004dca7d406a3498db6f87da01641 (patch) | |
| tree | 24397d109f54d364ca499db21e2360779197a341 /core/java/android/view/SurfaceControlViewHost.java | |
| parent | 939ec99700d09341364593ad6d10213274036250 (diff) | |
Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.
Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
Diffstat (limited to 'core/java/android/view/SurfaceControlViewHost.java')
| -rw-r--r-- | core/java/android/view/SurfaceControlViewHost.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/view/SurfaceControlViewHost.java b/core/java/android/view/SurfaceControlViewHost.java index 86a4fe170387..66ab3a32edfa 100644 --- a/core/java/android/view/SurfaceControlViewHost.java +++ b/core/java/android/view/SurfaceControlViewHost.java @@ -167,9 +167,10 @@ public class SurfaceControlViewHost { public SurfaceControlViewHost(@NonNull Context context, @NonNull Display display, @Nullable IBinder hostToken) { mSurfaceControl = new SurfaceControl.Builder() - .setContainerLayer() - .setName("SurfaceControlViewHost") - .build(); + .setContainerLayer() + .setName("SurfaceControlViewHost") + .setCallsite("SurfaceControlViewHost") + .build(); mWm = new WindowlessWindowManager(context.getResources().getConfiguration(), mSurfaceControl, hostToken); mViewRoot = new ViewRootImpl(context, display, mWm); |
