Fix Fuchsia build. (#6383)

This commit is contained in:
Ryan Macnak 2018-09-28 14:28:14 -07:00 committed by GitHub
parent 560eba1a32
commit 39dee5b610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -217,7 +217,6 @@ void SceneBuilder::addChildScene(double dx,
if (!current_layer_) {
return;
}
SkRect sceneRect = SkRect::MakeXYWH(dx, dy, width, height);
auto layer = std::make_unique<flow::ChildSceneLayer>();
layer->set_offset(SkPoint::Make(dx, dy));
layer->set_size(SkSize::Make(width, height));

View File

@ -143,7 +143,9 @@ Dart_Handle GetVMServiceAssetsArchiveCallback() {
(FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE)
return nullptr;
#elif OS_FUCHSIA
fml::FileMapping mapping("pkg/data/observatory.tar", false /* executable */);
fml::UniqueFD fd = fml::OpenFile("pkg/data/observatory.tar", false,
fml::FilePermission::kRead);
fml::FileMapping mapping(fd, {fml::FileMapping::Protection::kRead});
if (mapping.GetSize() == 0 || mapping.GetMapping() == nullptr) {
FML_LOG(ERROR) << "Fail to load Observatory archive";
return nullptr;