SF: Remove unused SurfaceFlinger::getLayerSortedByZForHwcDisplay
There were no callers, and it relied on CompositionEngine state being
made internal to the new code.
Test: atest libsurfaceflinger_unittest libcompositionengine_test
Bug: 121291683
Change-Id: I896ccc65c13acf3d9ea87c65da388b06f35ac175
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 4a4db4c..36e6956 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4972,19 +4972,6 @@
result.append("\n");
}
-const Vector<sp<Layer>>& SurfaceFlinger::getLayerSortedByZForHwcDisplay(DisplayId displayId) {
- // Note: mStateLock is held here
- for (const auto& [token, display] : mDisplays) {
- if (display->getId() == displayId) {
- return getDisplayDeviceLocked(token)->getVisibleLayersSortedByZ();
- }
- }
-
- ALOGE("%s: Invalid display %s", __FUNCTION__, to_string(displayId).c_str());
- static const Vector<sp<Layer>> empty;
- return empty;
-}
-
void SurfaceFlinger::updateColorMatrixLocked() {
mat4 colorMatrix;
if (mGlobalSaturationFactor != 1.0f) {
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index f953234..f5ff01e 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -304,10 +304,6 @@
// TODO: this should be made accessible only to MessageQueue
void onMessageReceived(int32_t what);
- // for debugging only
- // TODO: this should be made accessible only to HWComposer
- const Vector<sp<Layer>>& getLayerSortedByZForHwcDisplay(DisplayId displayId);
-
renderengine::RenderEngine& getRenderEngine() const;
bool authenticateSurfaceTextureLocked(