Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c4aea36 authored by Corey Tabaka's avatar Corey Tabaka
Browse files

Clean up handling of VR surface updates.

- Fix bug where adding a new hardware layer causes existing single-
  buffered surface layers to unlatch their buffer.
- Rename variables holding Composer pointers from hidl to composer
  to improve readability.
- Remove the arbitrary hardware layer limit, moving responsibility
  for efficient use of hardware layers to the VR display manager.

Bug: 64987282
Bug: 64756801
Test: Build system for multiple devices and manually test operation.
Change-Id: I8f05ca83830f62e15b18cd52df3014432c887681
parent 1e35190f
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -351,17 +351,9 @@ DisplayService::GetVisibleDisplaySurfaces() const {

void DisplayService::UpdateActiveDisplaySurfaces() {
  auto visible_surfaces = GetVisibleDisplaySurfaces();

  std::sort(visible_surfaces.begin(), visible_surfaces.end(),
            [](const std::shared_ptr<DisplaySurface>& a,
               const std::shared_ptr<DisplaySurface>& b) {
              return a->z_order() < b->z_order();
            });

  ALOGD_IF(TRACE,
           "DisplayService::UpdateActiveDisplaySurfaces: %zd visible surfaces",
           visible_surfaces.size());

  hardware_composer_.SetDisplaySurfaces(std::move(visible_surfaces));
}

+205 −149

File changed.

Preview size limit exceeded, changes collapsed.

+62 −38

File changed.

Preview size limit exceeded, changes collapsed.