From de4ce29c532ffb71b1d0b4b252e0fd9ca68e8d45 Mon Sep 17 00:00:00 2001 From: Gil Dekel Date: Mon, 3 Mar 2025 17:08:43 -0500 Subject: SF: Remove *DisplayId::tryCast usage from ScreenCaptureOutput Work towards DisplayId opaqueness by eliminating call-sites to APIs that parse the display ID values directly. One such site is ScreenCaptureOutput. Replace all calls to *DisplayId::tryCast with local calls to cached display variant. Flag: com.android.graphics.surfaceflinger.flags.stable_edid_ids Bug: 390690584 Test: libcompositionengine_test && libsurfaceflinger_unittest Change-Id: Ic83a2b2bfa6fc98b1d0fccc60f450d1587c2cc34 --- services/surfaceflinger/RegionSamplingThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/surfaceflinger/RegionSamplingThread.cpp') diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp index 514adac20c..615492a872 100644 --- a/services/surfaceflinger/RegionSamplingThread.cpp +++ b/services/surfaceflinger/RegionSamplingThread.cpp @@ -348,7 +348,7 @@ void RegionSamplingThread::captureSample() { SurfaceFlinger::ScreenshotArgs screenshotArgs; screenshotArgs.captureTypeVariant = displayWeak; - screenshotArgs.displayId = std::nullopt; + screenshotArgs.displayIdVariant = std::nullopt; screenshotArgs.sourceCrop = sampledBounds.isEmpty() ? layerStackSpaceRect : sampledBounds; screenshotArgs.reqSize = sampledBounds.getSize(); screenshotArgs.dataspace = ui::Dataspace::V0_SRGB; -- cgit v1.2.3-59-g8ed1b