Use IVrComposerClient interface to expose the VR HWC client
Since the VR HWC implements the IVrComposerClient make sure the
implementation inherits from the correct interface.
Bug: 36564122
Test: Ran on device
Change-Id: I5481ab5505f824034944b4df34fb51ee1b86082b
diff --git a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp
index 439adc4..ae628e1 100644
--- a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp
@@ -181,6 +181,13 @@
if (mClient == nullptr) {
LOG_ALWAYS_FATAL("failed to create composer client");
}
+
+ if (mIsUsingVrComposer) {
+ sp<IVrComposerClient> vrClient = IVrComposerClient::castFrom(mClient);
+ if (vrClient == nullptr) {
+ LOG_ALWAYS_FATAL("failed to create vr composer client");
+ }
+ }
}
std::vector<IComposer::Capability> Composer::getCapabilities()