SF: Cleanup EventThread Part 2
De-refbase EventThread and a bunch of related classes. Convert from
usign StrongPointer to std::unique_ptr to hold owned references, or bare
pointers for unowned references.
I did not see any need for using std::shared_ptr, or anything else, as
SurfaceFlinger appeared to own all the objects, and they were created
once and not really destroyed afterwards.
Test: Things seem to still work on a Pixel XL
Bug: None
Change-Id: Ifff32118d31bc1bb51e38df695ebe5cf86d2bb6d
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 89f3930..19dd059 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -719,10 +719,12 @@
// constant members (no synchronization needed for access)
nsecs_t mBootTime;
bool mGpuToCpuSupported;
- sp<EventThread> mEventThread;
- sp<EventThread> mSFEventThread;
- sp<EventThread> mInjectorEventThread;
- sp<InjectVSyncSource> mVSyncInjector;
+ std::unique_ptr<EventThread> mEventThread;
+ std::unique_ptr<EventThread> mSFEventThread;
+ std::unique_ptr<EventThread> mInjectorEventThread;
+ std::unique_ptr<VSyncSource> mEventThreadSource;
+ std::unique_ptr<VSyncSource> mSfEventThreadSource;
+ std::unique_ptr<InjectVSyncSource> mVSyncInjector;
std::unique_ptr<EventControlThread> mEventControlThread;
sp<IBinder> mBuiltinDisplays[DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES];