Loading services/vr/vr_window_manager/surface_flinger_view.cpp +17 −4 Original line number Diff line number Diff line Loading @@ -14,16 +14,29 @@ SurfaceFlingerView::SurfaceFlingerView() {} SurfaceFlingerView::~SurfaceFlingerView() {} bool SurfaceFlingerView::Initialize(HwcCallback::Client *client) { sp<IComposer> vr_hwcomposer = IComposer::getService("vr_hwcomposer"); if (!vr_hwcomposer.get()) { ALOGE("vr_hwcomposer not registered as service"); const char vr_hwcomposer_name[] = "vr_hwcomposer"; vr_hwcomposer_ = HIDL_FETCH_IComposer(vr_hwcomposer_name); if (!vr_hwcomposer_.get()) { ALOGE("Failed to get vr_hwcomposer"); return false; } if (vr_hwcomposer_->isRemote()) { ALOGE("vr_hwcomposer service is remote"); return false; } const android::status_t vr_hwcomposer_status = vr_hwcomposer_->registerAsService(vr_hwcomposer_name); if (vr_hwcomposer_status != OK) { ALOGE("Failed to register vr_hwcomposer service"); return false; } vr_composer_view_ = std::make_unique<VrComposerView>(std::make_unique<HwcCallback>(client)); vr_composer_view_->Initialize(GetComposerViewFromIComposer( vr_hwcomposer.get())); vr_hwcomposer_.get())); // TODO(dnicoara): Query this from the composer service. width_ = 1920; Loading services/vr/vr_window_manager/surface_flinger_view.h +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ class SurfaceFlingerView { void ReleaseFrame(); private: sp<IComposer> vr_hwcomposer_; std::unique_ptr<VrComposerView> vr_composer_view_; int width_ = 0; int height_ = 0; Loading services/vr/vr_window_manager/vr_window_manager.cpp +0 −12 Original line number Diff line number Diff line Loading @@ -14,18 +14,6 @@ using namespace android::dvr; int main(int /* argc */, char** /* argv */) { android::ProcessState::self()->startThreadPool(); // Create vr_hwcomposer. const char vr_hwcomposer_name[] = "vr_hwcomposer"; sp<IComposer> vr_hwcomposer = HIDL_FETCH_IComposer(vr_hwcomposer_name); LOG_ALWAYS_FATAL_IF(!vr_hwcomposer.get(), "Failed to get vr_hwcomposer"); LOG_ALWAYS_FATAL_IF(vr_hwcomposer->isRemote(), "vr_hwcomposer service is remote"); const android::status_t vr_hwcomposer_status = vr_hwcomposer->registerAsService(vr_hwcomposer_name); LOG_ALWAYS_FATAL_IF(vr_hwcomposer_status != ::android::OK, "Failed to register vr_hwcomposer service"); // ShellView needs to be created after vr_hwcomposer. android::dvr::ShellView app; const int app_status = app.Initialize(); Loading Loading
services/vr/vr_window_manager/surface_flinger_view.cpp +17 −4 Original line number Diff line number Diff line Loading @@ -14,16 +14,29 @@ SurfaceFlingerView::SurfaceFlingerView() {} SurfaceFlingerView::~SurfaceFlingerView() {} bool SurfaceFlingerView::Initialize(HwcCallback::Client *client) { sp<IComposer> vr_hwcomposer = IComposer::getService("vr_hwcomposer"); if (!vr_hwcomposer.get()) { ALOGE("vr_hwcomposer not registered as service"); const char vr_hwcomposer_name[] = "vr_hwcomposer"; vr_hwcomposer_ = HIDL_FETCH_IComposer(vr_hwcomposer_name); if (!vr_hwcomposer_.get()) { ALOGE("Failed to get vr_hwcomposer"); return false; } if (vr_hwcomposer_->isRemote()) { ALOGE("vr_hwcomposer service is remote"); return false; } const android::status_t vr_hwcomposer_status = vr_hwcomposer_->registerAsService(vr_hwcomposer_name); if (vr_hwcomposer_status != OK) { ALOGE("Failed to register vr_hwcomposer service"); return false; } vr_composer_view_ = std::make_unique<VrComposerView>(std::make_unique<HwcCallback>(client)); vr_composer_view_->Initialize(GetComposerViewFromIComposer( vr_hwcomposer.get())); vr_hwcomposer_.get())); // TODO(dnicoara): Query this from the composer service. width_ = 1920; Loading
services/vr/vr_window_manager/surface_flinger_view.h +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ class SurfaceFlingerView { void ReleaseFrame(); private: sp<IComposer> vr_hwcomposer_; std::unique_ptr<VrComposerView> vr_composer_view_; int width_ = 0; int height_ = 0; Loading
services/vr/vr_window_manager/vr_window_manager.cpp +0 −12 Original line number Diff line number Diff line Loading @@ -14,18 +14,6 @@ using namespace android::dvr; int main(int /* argc */, char** /* argv */) { android::ProcessState::self()->startThreadPool(); // Create vr_hwcomposer. const char vr_hwcomposer_name[] = "vr_hwcomposer"; sp<IComposer> vr_hwcomposer = HIDL_FETCH_IComposer(vr_hwcomposer_name); LOG_ALWAYS_FATAL_IF(!vr_hwcomposer.get(), "Failed to get vr_hwcomposer"); LOG_ALWAYS_FATAL_IF(vr_hwcomposer->isRemote(), "vr_hwcomposer service is remote"); const android::status_t vr_hwcomposer_status = vr_hwcomposer->registerAsService(vr_hwcomposer_name); LOG_ALWAYS_FATAL_IF(vr_hwcomposer_status != ::android::OK, "Failed to register vr_hwcomposer service"); // ShellView needs to be created after vr_hwcomposer. android::dvr::ShellView app; const int app_status = app.Initialize(); Loading