Update dirty regions when requested to repaint everything

This is a merge from: ag/3827114

The issue was when an HWC implementation was requesting a composer
refresh, it wouldn't actually mark the areas as dirty so the
mustRecompose flag wasn't getting sent when a virtual display was doing
the redraw. That then prevented the changes from its output buffer from
propagating through to the consumer of that surface.

Bug: 77335744
Bug: 77546473
Test: Manually verified refreshes propagate through
Change-Id: Ia7a3dc15c96626a213c4459dac4f695d91540fb5
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index f180a3b..90743f2 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4458,6 +4458,11 @@
 
 void SurfaceFlinger::repaintEverythingLocked() {
     android_atomic_or(1, &mRepaintEverything);
+    for (size_t dpy = 0; dpy < mDisplays.size(); dpy++) {
+        const sp<DisplayDevice>& displayDevice(mDisplays[dpy]);
+        const Rect bounds(displayDevice->getBounds());
+        displayDevice->dirtyRegion.orSelf(Region(bounds));
+    }
     signalTransaction();
 }