}
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
// 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) {
// Set idle state based on whether there are any surfaces to handle.
UpdatePostThreadState(PostThreadState::Idle, display_idle);
-
- // XXX: TEMPORARY
- // Request control of the display based on whether there are any surfaces to
- // handle. This callback sets the post thread active state once the transition
- // is complete in SurfaceFlinger.
- // TODO(eieio): Unify the control signal used to move SurfaceFlinger into VR
- // mode. Currently this is hooked up to persistent VR mode, but perhaps this
- // makes more sense to control it from VrCore, which could in turn base its
- // decision on persistent VR mode.
- if (request_display_callback_)
- request_display_callback_(!display_idle);
}
int HardwareComposer::OnNewGlobalBuffer(DvrGlobalBufferKey key,