diff --git a/content_handler/fuchsia_font_manager.cc b/content_handler/fuchsia_font_manager.cc index b68eb610edb24..4e409cae94f6a 100644 --- a/content_handler/fuchsia_font_manager.cc +++ b/content_handler/fuchsia_font_manager.cc @@ -32,14 +32,14 @@ void UnmapMemory(const void* buffer, void* context) { zx::vmar::root_self().unmap(reinterpret_cast(buffer), size); } -sk_sp MakeSkDataFromVMO(fsl::SizedVmoTransport vmo) { - if (!fsl::SizedVmo::IsSizeValid(vmo.vmo, vmo.size) || - vmo.size > std::numeric_limits::max()) { +sk_sp MakeSkDataFromBuffer(mem::Buffer data) { + if (!fsl::SizedVmo::IsSizeValid(data.vmo, data.size) || + data.size > std::numeric_limits::max()) { return nullptr; } - uint64_t size = vmo.size; + uint64_t size = data.size; uintptr_t buffer = 0; - zx_status_t status = zx::vmar::root_self().map(0, vmo.vmo, 0, size, + zx_status_t status = zx::vmar::root_self().map(0, data.vmo, 0, size, ZX_VM_FLAG_PERM_READ, &buffer); if (status != ZX_OK) return nullptr; @@ -107,7 +107,7 @@ SkTypeface* FuchsiaFontManager::onMatchFamilyStyle( if (!response) return nullptr; - sk_sp data = MakeSkDataFromVMO(std::move(response->data.vmo)); + sk_sp data = MakeSkDataFromBuffer(std::move(response->data.buffer)); if (!data) return nullptr; diff --git a/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp b/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp index 446a2939dc64b..78ac2b4d33243 100644 --- a/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp +++ b/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.cpp @@ -65,14 +65,14 @@ void UnmapMemory(const void* buffer, void* context) { zx::vmar::root_self().unmap(reinterpret_cast(buffer), size); } -sk_sp MakeSkDataFromVMO(const fsl::SizedVmoTransport& vmo) { - if (!fsl::SizedVmo::IsSizeValid(vmo.vmo, vmo.size) || - vmo.size > std::numeric_limits::max()) { +sk_sp MakeSkDataFromBuffer(const mem::Buffer& data) { + if (!fsl::SizedVmo::IsSizeValid(data.vmo, data.size) || + data.size > std::numeric_limits::max()) { return nullptr; } - uint64_t size = vmo.size; + uint64_t size = data.size; uintptr_t buffer = 0; - zx_status_t status = zx::vmar::root_self().map(0, vmo.vmo, 0, size, + zx_status_t status = zx::vmar::root_self().map(0, data.vmo, 0, size, ZX_VM_FLAG_PERM_READ, &buffer); if (status != ZX_OK) return nullptr; @@ -132,7 +132,7 @@ sk_sp FontCache::createTypeface( if (!response) return nullptr; - sk_sp data = MakeSkDataFromVMO(response->data.vmo); + sk_sp data = MakeSkDataFromBuffer(response->data.buffer); if (!data) return nullptr;