[fuchsia] Migrate to new zx::vmar::map method
This new method receives its arguments in the same order as the underlying C system call. This CL should not change behavior. Change-Id: I6fd1e497b19d38d1133b1b8187146b98131093a8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328624 Commit-Queue: Adam Barth <abarth@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Adam Barth <abarth@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
c49da0b519
commit
130eef1c24
@ -46,7 +46,7 @@ sk_sp<SkData> MakeSkDataFromBuffer(const fuchsia::mem::Buffer& data,
|
||||
std::function<void()> release_proc) {
|
||||
uint64_t size = data.size;
|
||||
uintptr_t buffer = 0;
|
||||
zx_status_t status = zx::vmar::root_self()->map(0, data.vmo, 0, size, ZX_VM_PERM_READ, &buffer);
|
||||
zx_status_t status = zx::vmar::root_self()->map(ZX_VM_PERM_READ, 0, data.vmo, 0, size, &buffer);
|
||||
if (status != ZX_OK) return nullptr;
|
||||
auto context = new ReleaseSkDataContext(size, release_proc);
|
||||
return SkData::MakeWithProc(reinterpret_cast<void*>(buffer), size, ReleaseSkData, context);
|
||||
|
Loading…
Reference in New Issue
Block a user