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

Commit 21802dac authored by Steven Thomas's avatar Steven Thomas Committed by android-build-merger
Browse files

Merge "Fix vr flinger post thread to resume correctly" into oc-dr1-dev

am: 4bfb7550

Change-Id: I2957b1b32bf8378f4b965d1f60dcafd4c48f938e
parents d4f8de92 4bfb7550
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -210,9 +210,6 @@ void HardwareComposer::UpdatePostThreadState(PostThreadStateType state,
}

void HardwareComposer::OnPostThreadResumed() {
  if (request_display_callback_)
    request_display_callback_(true);

  hwc2_hidl_->resetCommands();

  // HIDL HWC seems to have an internal race condition. If we submit a frame too
@@ -249,9 +246,6 @@ void HardwareComposer::OnPostThreadPaused() {

  // Trigger target-specific performance mode change.
  property_set(kDvrPerformanceProperty, "idle");

  if (request_display_callback_)
    request_display_callback_(false);
}

HWC::Error HardwareComposer::Validate(hwc2_display_t display) {
@@ -479,6 +473,9 @@ void HardwareComposer::SetDisplaySurfaces(
    pending_surfaces_ = std::move(surfaces);
  }

  if (request_display_callback_)
    request_display_callback_(!display_idle);

  // Set idle state based on whether there are any surfaces to handle.
  UpdatePostThreadState(PostThreadState::Idle, display_idle);
}