Ignore callbacks from the non-active hardware composer
Ignore callbacks from the non-active hardware composer so we don't get
e.g. duplicate vsync callbacks, one from each composer.
Bug: None
Test: Manually confirmed with logs we're now ignoring callbacks on the
non-active composer.
Change-Id: I8b475d6283d86c64ff96b41e78528bce8c6ff1d3
diff --git a/libs/vr/libvrflinger/vr_flinger.cpp b/libs/vr/libvrflinger/vr_flinger.cpp
index 82ce067..9163e71 100644
--- a/libs/vr/libvrflinger/vr_flinger.cpp
+++ b/libs/vr/libvrflinger/vr_flinger.cpp
@@ -106,5 +106,13 @@
}
}
+void VrFlinger::OnHardwareComposerRefresh() {
+ if (display_service_) {
+ display_service_->OnHardwareComposerRefresh();
+ } else {
+ ALOGE("OnHardwareComposerRefresh failed : Display service is not started.");
+ }
+}
+
} // namespace dvr
} // namespace android