Make sky_shell.mojo work on Android

There's no vsync service in MojoShell, so we shouldn't try to connect to it.
Feature request for MojoShell is in https://github.com/domokit/mojo/issues/535.
This commit is contained in:
Adam Barth 2015-11-16 15:27:28 -08:00
parent c075697fcf
commit 36b4f0669c

View File

@ -124,10 +124,12 @@ void Engine::SetServices(ServicesDataPtr services) {
services_ = services.Pass();
#if defined(OS_ANDROID) || defined(OS_IOS)
// TODO(abarth): Implement VSyncProvider on other platforms.
vsync::VSyncProviderPtr vsync_provider;
mojo::ConnectToService(services_->services_provided_by_embedder.get(), &vsync_provider);
animator_->set_vsync_provider(vsync_provider.Pass());
if (services_->services_provided_by_embedder) {
// TODO(abarth): Implement VSyncProvider on other platforms.
vsync::VSyncProviderPtr vsync_provider;
mojo::ConnectToService(services_->services_provided_by_embedder.get(), &vsync_provider);
animator_->set_vsync_provider(vsync_provider.Pass());
}
#endif
}