Merge "Input: Move input transactions from critical path"

This commit is contained in:
TreeHugger Robot
2018-12-20 22:19:55 +00:00
committed by Android (Google) Code Review

View File

@@ -49,7 +49,6 @@ import android.view.SurfaceControl;
import com.android.server.policy.WindowManagerPolicy;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Set;
import java.util.function.Consumer;
@@ -70,9 +69,9 @@ final class InputMonitor {
private final UpdateInputForAllWindowsConsumer mUpdateInputForAllWindowsConsumer =
new UpdateInputForAllWindowsConsumer();
private int mDisplayId;
private final int mDisplayId;
SurfaceControl.Transaction mInputTransaction = new SurfaceControl.Transaction();
private final SurfaceControl.Transaction mInputTransaction;
/**
* The set of input consumer added to the window manager by name, which consumes input events
@@ -109,6 +108,7 @@ final class InputMonitor {
public InputMonitor(WindowManagerService service, int displayId) {
mService = service;
mDisplayId = displayId;
mInputTransaction = mService.mRoot.getDisplayContent(mDisplayId).getPendingTransaction();
}
private void addInputConsumer(String name, InputConsumerImpl consumer) {
@@ -397,7 +397,7 @@ final class InputMonitor {
wallpaperInputConsumer.show(mInputTransaction, 0);
}
mInputTransaction.apply();
dc.scheduleAnimation();
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}