SF: Avoid a few nullable sp<DisplayDevice> params
Bug: 255635821
Test: Build
Change-Id: I6c84b89d8b532eca581530931a8b876c37ca3189
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 4a27f3c..46a5f70 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -1008,13 +1008,11 @@
VirtualDisplayId acquireVirtualDisplay(ui::Size, ui::PixelFormat) REQUIRES(mStateLock);
void releaseVirtualDisplay(VirtualDisplayId);
- // TODO(b/255635821): Replace pointers with references. `inactiveDisplay` is only ever `nullptr`
- // in tests, and `activeDisplay` must not be `nullptr` as a precondition.
- void onActiveDisplayChangedLocked(const sp<DisplayDevice>& inactiveDisplay,
- const sp<DisplayDevice>& activeDisplay)
+ void onActiveDisplayChangedLocked(const DisplayDevice* inactiveDisplayPtr,
+ const DisplayDevice& activeDisplay)
REQUIRES(mStateLock, kMainThreadContext);
- void onActiveDisplaySizeChanged(const sp<const DisplayDevice>&);
+ void onActiveDisplaySizeChanged(const DisplayDevice&);
/*
* Debugging & dumpsys
@@ -1080,7 +1078,7 @@
std::chrono::nanoseconds presentLatency);
int getMaxAcquiredBufferCountForRefreshRate(Fps refreshRate) const;
- void updateInternalDisplayVsyncLocked(const sp<DisplayDevice>& activeDisplay)
+ void updateActiveDisplayVsyncLocked(const DisplayDevice& activeDisplay)
REQUIRES(mStateLock, kMainThreadContext);
bool isHdrLayer(const frontend::LayerSnapshot& snapshot) const;