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

Commit 4bfb7550 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents de65cb8e 2ddf5670
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -210,9 +210,6 @@ void HardwareComposer::UpdatePostThreadState(PostThreadStateType state,
}
}


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

  hwc2_hidl_->resetCommands();
  hwc2_hidl_->resetCommands();


  // HIDL HWC seems to have an internal race condition. If we submit a frame too
  // 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.
  // Trigger target-specific performance mode change.
  property_set(kDvrPerformanceProperty, "idle");
  property_set(kDvrPerformanceProperty, "idle");

  if (request_display_callback_)
    request_display_callback_(false);
}
}


HWC::Error HardwareComposer::Validate(hwc2_display_t display) {
HWC::Error HardwareComposer::Validate(hwc2_display_t display) {
@@ -479,6 +473,9 @@ void HardwareComposer::SetDisplaySurfaces(
    pending_surfaces_ = std::move(surfaces);
    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.
  // Set idle state based on whether there are any surfaces to handle.
  UpdatePostThreadState(PostThreadState::Idle, display_idle);
  UpdatePostThreadState(PostThreadState::Idle, display_idle);
}
}