summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2022-09-15 17:02:20 -0700
committer Siarhei Vishniakou <svv@google.com> 2022-09-27 11:58:46 -0700
commit096257cc2054ac53864908ede08bdd06879d8370 (patch)
tree84be78d9b2f1eaeaaeb4b199fd5248ee1fc3d8a4 /services/surfaceflinger/RegionSamplingThread.cpp
parent007713dd5cd5f005f3e332053431366f8fea9caa (diff)
Use std::variant for NotifyArgs
Previously, NotifyArgs was a base class and we relied on inheritance in order to refer to these args in a generic manner. Unfortunately, this prevents us from being able to cast into a descendant. If you got NotifyArgs, there was no way to figure out its type. In this CL, we switch to std::variant. Doing this allows us to remove the inheritance, and several other functions. The classes are now mostly about data. This allows us to receive a generic NotifyArgs object and cast it into NotifyMotionArgs (for example). This also allows us to separate NotifyArgs from the InputListener interface (not done in this CL). Furthermore, we don't need to store the args as unique_ptr anymore. Bug: 211379801 Test: m checkinput Change-Id: I5b10d485a9eb27b4ffb6a3a6e21227f52ac3dede
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
0 files changed, 0 insertions, 0 deletions