[sf] Fix layer ids for background color layers
Fixes a regression caused by Ie0f93ca956e6d043c9d95d00bc205d242e47c4cc
which created duplicate layer ids.
Also deflakes corner radius tests by tracking eCornerRadiusChanged state
changes correctly.
Test: presubmit w/new fe
Bug: 238781169
Change-Id: I2d5321b5ba77e1074ef039bcd90c78e82c1a0049
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index c88bff5..e803baa 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2307,7 +2307,7 @@
sp<Layer> bgColorLayer = getFactory().createEffectLayer(
LayerCreationArgs(this, nullptr, layer->name,
ISurfaceComposerClient::eFXSurfaceEffect, LayerMetadata(),
- std::make_optional(layer->parentId), true));
+ std::make_optional(layer->id), true));
mLegacyLayers[bgColorLayer->sequence] = bgColorLayer;
}
const bool willReleaseBufferOnLatch = layer->willReleaseBufferOnLatch();