diff options
| author | 2018-04-03 10:45:55 -0700 | |
|---|---|---|
| committer | 2018-04-03 15:43:31 -0700 | |
| commit | a9dcf11831380f2b9f310ceb9a72f2bf953d25e1 (patch) | |
| tree | d0c7368b0b19077e6bb6ff655db6ba340fee9560 | |
| parent | 36d8ba87141022784b4f1dede894bfd039d14f8e (diff) | |
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
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f180a3b285..90743f2e10 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -4458,6 +4458,11 @@ status_t SurfaceFlinger::onTransact( 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(); } |