[sf] Update touchable region crop correctly
We need an extra pass to crop touchable region since we may need
to crop the region with bounds of another layer. So track snapshots
requiring a touchable region crop and updated them after the
all the snapshots have been updated.
Also make the snapshot ids unique for non clone layers for input.
Before this change the ids could change if the snapshot went
offscreen.
Test: presubmit
Test: atest com.android.launcher3.jank.BinderTests
Bug: 238781169
Change-Id: I323168bd4546813acbe7fa841b26cd390b83b951
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshot.h b/services/surfaceflinger/FrontEnd/LayerSnapshot.h
index 5491d9a..b167d3e 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshot.h
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshot.h
@@ -94,6 +94,7 @@
int32_t frameRateSelectionPriority;
LayerHierarchy::TraversalPath mirrorRootPath;
bool unreachable = true;
+ uint32_t touchCropId;
uid_t uid;
pid_t pid;
ChildState childState;