Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f21652c

Browse files
committed
[fuchsia][sysmem2] move to sysmem2 protocols
1 parent 02f4e59 commit f21652c

File tree

12 files changed

+107
-98
lines changed

12 files changed

+107
-98
lines changed

build/config/fuchsia/gn_configs.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare_args() {
2525
# value to specify the API level the packages produced from this repository
2626
# should be targeting, e.g. in their top-level //.gn file. A value of -1
2727
# means that no API level will be passed to the tools that consumes it.
28-
fuchsia_target_api_level = 18
28+
fuchsia_target_api_level = 20
2929

3030
# The SDK manifest file. This is useful to include as a dependency
3131
# for some targets in order to cause a rebuild when the version of the

shell/platform/fuchsia/flutter/software_surface.cc

Lines changed: 70 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ namespace {
2828

2929
constexpr SkColorType kSkiaColorType = kRGBA_8888_SkColorType;
3030

31-
uint32_t BytesPerRow(const fuchsia::sysmem::SingleBufferSettings& settings,
31+
uint32_t BytesPerRow(const fuchsia::sysmem2::SingleBufferSettings& settings,
3232
uint32_t bytes_per_pixel,
3333
uint32_t image_width) {
3434
const uint32_t bytes_per_row_divisor =
35-
settings.image_format_constraints.bytes_per_row_divisor;
35+
settings.image_format_constraints().bytes_per_row_divisor();
3636
const uint32_t min_bytes_per_row =
37-
settings.image_format_constraints.min_bytes_per_row;
37+
settings.image_format_constraints().min_bytes_per_row();
3838
const uint32_t unrounded_bytes_per_row =
3939
std::max(image_width * bytes_per_pixel, min_bytes_per_row);
4040
const uint32_t roundup_bytes =
@@ -46,7 +46,7 @@ uint32_t BytesPerRow(const fuchsia::sysmem::SingleBufferSettings& settings,
4646
} // namespace
4747

4848
SoftwareSurface::SoftwareSurface(
49-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
49+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
5050
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
5151
const SkISize& size)
5252
: wait_for_surface_read_finished_(this) {
@@ -102,7 +102,7 @@ bool SoftwareSurface::CreateFences() {
102102
}
103103

104104
bool SoftwareSurface::SetupSkiaSurface(
105-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
105+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
106106
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
107107
const SkISize& size) {
108108
if (size.isEmpty()) {
@@ -112,9 +112,10 @@ bool SoftwareSurface::SetupSkiaSurface(
112112

113113
// Allocate a "local" sysmem token to represent flutter's handle to the
114114
// sysmem buffer.
115-
fuchsia::sysmem::BufferCollectionTokenSyncPtr local_token;
116-
zx_status_t allocate_status =
117-
sysmem_allocator->AllocateSharedCollection(local_token.NewRequest());
115+
fuchsia::sysmem2::BufferCollectionTokenSyncPtr local_token;
116+
zx_status_t allocate_status = sysmem_allocator->AllocateSharedCollection(
117+
std::move(fuchsia::sysmem2::AllocatorAllocateSharedCollectionRequest{}
118+
.set_token_request(local_token.NewRequest())));
118119
if (allocate_status != ZX_OK) {
119120
FML_LOG(ERROR) << "Failed to allocate collection: "
120121
<< zx_status_get_string(allocate_status);
@@ -123,14 +124,19 @@ bool SoftwareSurface::SetupSkiaSurface(
123124

124125
// Create a single Duplicate of the token and Sync it; the single duplicate
125126
// token represents scenic's handle to the sysmem buffer.
126-
std::vector<fuchsia::sysmem::BufferCollectionTokenHandle> duplicate_tokens;
127+
fuchsia::sysmem2::BufferCollectionToken_DuplicateSync_Result duplicate_result;
127128
zx_status_t duplicate_status = local_token->DuplicateSync(
128-
std::vector<zx_rights_t>{ZX_RIGHT_SAME_RIGHTS}, &duplicate_tokens);
129+
std::move(fuchsia::sysmem2::BufferCollectionTokenDuplicateSyncRequest{}
130+
.set_rights_attenuation_masks(
131+
std::vector<zx_rights_t>{ZX_RIGHT_SAME_RIGHTS})),
132+
&duplicate_result);
129133
if (duplicate_status != ZX_OK) {
130134
FML_LOG(ERROR) << "Failed to duplicate collection token: "
131135
<< zx_status_get_string(duplicate_status);
132136
return false;
133137
}
138+
auto duplicate_tokens =
139+
std::move(*duplicate_result.response().mutable_tokens());
134140
if (duplicate_tokens.size() != 1u) {
135141
FML_LOG(ERROR) << "Failed to duplicate collection token: Incorrect number "
136142
"of tokens returned.";
@@ -153,7 +159,8 @@ bool SoftwareSurface::SetupSkiaSurface(
153159

154160
fuchsia::ui::composition::RegisterBufferCollectionArgs args;
155161
args.set_export_token(std::move(export_token));
156-
args.set_buffer_collection_token(std::move(scenic_token));
162+
args.set_buffer_collection_token(
163+
fuchsia::sysmem::BufferCollectionTokenHandle(scenic_token.TakeChannel()));
157164
args.set_usage(
158165
fuchsia::ui::composition::RegisterBufferCollectionUsage::DEFAULT);
159166
flatland_allocator->RegisterBufferCollection(
@@ -167,9 +174,11 @@ bool SoftwareSurface::SetupSkiaSurface(
167174
});
168175

169176
// Acquire flutter's local handle to the sysmem buffer.
170-
fuchsia::sysmem::BufferCollectionSyncPtr buffer_collection;
171-
zx_status_t bind_status = sysmem_allocator->BindSharedCollection(
172-
std::move(local_token), buffer_collection.NewRequest());
177+
fuchsia::sysmem2::BufferCollectionSyncPtr buffer_collection;
178+
zx_status_t bind_status = sysmem_allocator->BindSharedCollection(std::move(
179+
fuchsia::sysmem2::AllocatorBindSharedCollectionRequest{}
180+
.set_token(std::move(local_token))
181+
.set_buffer_collection_request(buffer_collection.NewRequest())));
173182
if (bind_status != ZX_OK) {
174183
FML_LOG(ERROR) << "Failed to bind collection token: "
175184
<< zx_status_get_string(bind_status);
@@ -178,63 +187,66 @@ bool SoftwareSurface::SetupSkiaSurface(
178187

179188
// Set flutter's constraints on the sysmem buffer. Software rendering only
180189
// requires CPU access to the surface and a basic R8G8B8A8 pixel format.
181-
fuchsia::sysmem::BufferCollectionConstraints constraints;
182-
constraints.min_buffer_count = 1;
183-
constraints.usage.cpu =
184-
fuchsia::sysmem::cpuUsageWrite | fuchsia::sysmem::cpuUsageWriteOften;
185-
constraints.has_buffer_memory_constraints = true;
186-
constraints.buffer_memory_constraints.physically_contiguous_required = false;
187-
constraints.buffer_memory_constraints.secure_required = false;
188-
constraints.buffer_memory_constraints.ram_domain_supported = true;
189-
constraints.buffer_memory_constraints.cpu_domain_supported = true;
190-
constraints.buffer_memory_constraints.inaccessible_domain_supported = false;
191-
constraints.image_format_constraints_count = 1;
192-
fuchsia::sysmem::ImageFormatConstraints& image_constraints =
193-
constraints.image_format_constraints[0];
194-
image_constraints = fuchsia::sysmem::ImageFormatConstraints();
195-
image_constraints.min_coded_width = static_cast<uint32_t>(size.fWidth);
196-
image_constraints.min_coded_height = static_cast<uint32_t>(size.fHeight);
197-
image_constraints.min_bytes_per_row = static_cast<uint32_t>(size.fWidth) * 4;
198-
image_constraints.pixel_format.type =
199-
fuchsia::sysmem::PixelFormatType::R8G8B8A8;
200-
image_constraints.color_spaces_count = 1;
201-
image_constraints.color_space[0].type = fuchsia::sysmem::ColorSpaceType::SRGB;
202-
image_constraints.pixel_format.has_format_modifier = true;
203-
image_constraints.pixel_format.format_modifier.value =
204-
fuchsia::sysmem::FORMAT_MODIFIER_LINEAR;
205-
zx_status_t set_constraints_status =
206-
buffer_collection->SetConstraints(true, constraints);
190+
fuchsia::sysmem2::BufferCollectionConstraints constraints;
191+
constraints.set_min_buffer_count(1);
192+
constraints.mutable_usage()->set_cpu(fuchsia::sysmem2::CPU_USAGE_WRITE |
193+
fuchsia::sysmem2::CPU_USAGE_WRITE_OFTEN);
194+
auto& bmc = *constraints.mutable_buffer_memory_constraints();
195+
bmc.set_physically_contiguous_required(false);
196+
bmc.set_secure_required(false);
197+
bmc.set_ram_domain_supported(true);
198+
bmc.set_cpu_domain_supported(true);
199+
bmc.set_inaccessible_domain_supported(false);
200+
auto& ifc = constraints.mutable_image_format_constraints()->emplace_back();
201+
ifc.set_min_size(fuchsia::math::SizeU{static_cast<uint32_t>(size.fWidth),
202+
static_cast<uint32_t>(size.fHeight)});
203+
ifc.set_min_bytes_per_row(static_cast<uint32_t>(size.fWidth) * 4);
204+
ifc.set_pixel_format(fuchsia::images2::PixelFormat::R8G8B8A8);
205+
ifc.mutable_color_spaces()->emplace_back(fuchsia::images2::ColorSpace::SRGB);
206+
ifc.set_pixel_format_modifier(fuchsia::images2::PixelFormatModifier::LINEAR);
207+
zx_status_t set_constraints_status = buffer_collection->SetConstraints(
208+
std::move(fuchsia::sysmem2::BufferCollectionSetConstraintsRequest{}
209+
.set_constraints(std::move(constraints))));
207210
if (set_constraints_status != ZX_OK) {
208211
FML_LOG(ERROR) << "Failed to set constraints: "
209212
<< zx_status_get_string(set_constraints_status);
210213
return false;
211214
}
212215

213216
// Wait for sysmem to allocate, now that constraints are set.
214-
fuchsia::sysmem::BufferCollectionInfo_2 buffer_collection_info;
215-
zx_status_t allocation_status = ZX_OK;
217+
fuchsia::sysmem2::BufferCollection_WaitForAllBuffersAllocated_Result
218+
wait_result;
216219
zx_status_t wait_for_allocated_status =
217-
buffer_collection->WaitForBuffersAllocated(&allocation_status,
218-
&buffer_collection_info);
219-
if (allocation_status != ZX_OK) {
220-
FML_LOG(ERROR) << "Failed to allocate: "
221-
<< zx_status_get_string(allocation_status);
222-
return false;
223-
}
220+
buffer_collection->WaitForAllBuffersAllocated(&wait_result);
224221
if (wait_for_allocated_status != ZX_OK) {
225222
FML_LOG(ERROR) << "Failed to wait for allocate: "
226223
<< zx_status_get_string(wait_for_allocated_status);
227224
return false;
228225
}
226+
if (!wait_result.is_response()) {
227+
if (wait_result.is_framework_err()) {
228+
FML_LOG(ERROR) << "Failed to allocate (framework_err): "
229+
<< fidl::ToUnderlying(wait_result.framework_err());
230+
} else {
231+
FML_DCHECK(wait_result.is_err());
232+
FML_LOG(ERROR) << "Failed to allocate (err): "
233+
<< static_cast<uint32_t>(wait_result.err());
234+
}
235+
return false;
236+
}
237+
auto buffer_collection_info =
238+
std::move(*wait_result.response().mutable_buffer_collection_info());
229239

230240
// Cache the allocated surface VMO and metadata.
231-
FML_CHECK(buffer_collection_info.settings.buffer_settings.size_bytes != 0);
232-
FML_CHECK(buffer_collection_info.buffers[0].vmo != ZX_HANDLE_INVALID);
233-
surface_vmo_ = std::move(buffer_collection_info.buffers[0].vmo);
241+
FML_CHECK(buffer_collection_info.settings().buffer_settings().size_bytes() !=
242+
0);
243+
FML_CHECK(buffer_collection_info.buffers()[0].vmo().is_valid());
244+
surface_vmo_ =
245+
std::move(*buffer_collection_info.mutable_buffers()->at(0).mutable_vmo());
234246
surface_size_bytes_ =
235-
buffer_collection_info.settings.buffer_settings.size_bytes;
236-
if (buffer_collection_info.settings.buffer_settings.coherency_domain ==
237-
fuchsia::sysmem::CoherencyDomain::RAM) {
247+
buffer_collection_info.settings().buffer_settings().size_bytes();
248+
if (buffer_collection_info.settings().buffer_settings().coherency_domain() ==
249+
fuchsia::sysmem2::CoherencyDomain::RAM) {
238250
// RAM coherency domain requires a cache clean when writes are finished.
239251
needs_cache_clean_ = true;
240252
}
@@ -252,7 +264,7 @@ bool SoftwareSurface::SetupSkiaSurface(
252264

253265
// Now that the buffer is CPU-readable, it's safe to discard flutter's
254266
// connection to sysmem.
255-
zx_status_t close_status = buffer_collection->Close();
267+
zx_status_t close_status = buffer_collection->Release();
256268
if (close_status != ZX_OK) {
257269
FML_LOG(ERROR) << "Failed to close buffer: "
258270
<< zx_status_get_string(close_status);
@@ -261,9 +273,9 @@ bool SoftwareSurface::SetupSkiaSurface(
261273

262274
// Wrap the buffer in a software-rendered Skia surface.
263275
const uint64_t vmo_offset =
264-
buffer_collection_info.buffers[0].vmo_usable_start;
276+
buffer_collection_info.buffers()[0].vmo_usable_start();
265277
const size_t vmo_stride =
266-
BytesPerRow(buffer_collection_info.settings, 4u, size.width());
278+
BytesPerRow(buffer_collection_info.settings(), 4u, size.width());
267279
SkSurfaceProps sk_surface_props(0, kUnknown_SkPixelGeometry);
268280
sk_surface_ = SkSurfaces::WrapPixels(
269281
SkImageInfo::Make(size, kSkiaColorType, kPremul_SkAlphaType,

shell/platform/fuchsia/flutter/software_surface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace flutter_runner {
2525

2626
class SoftwareSurface final : public SurfaceProducerSurface {
2727
public:
28-
SoftwareSurface(fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
28+
SoftwareSurface(fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
2929
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
3030
const SkISize& size);
3131

@@ -79,7 +79,7 @@ class SoftwareSurface final : public SurfaceProducerSurface {
7979
const zx_packet_signal_t* signal);
8080

8181
bool SetupSkiaSurface(
82-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
82+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
8383
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
8484
const SkISize& size);
8585

shell/platform/fuchsia/flutter/software_surface_producer.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ zx_koid_t GetCurrentProcessId() {
4949

5050
SoftwareSurfaceProducer::SoftwareSurfaceProducer() {
5151
zx_status_t status = fdio_service_connect(
52-
"/svc/fuchsia.sysmem.Allocator",
52+
"/svc/fuchsia.sysmem2.Allocator",
5353
sysmem_allocator_.NewRequest().TakeChannel().release());
54-
sysmem_allocator_->SetDebugClientInfo(GetCurrentProcessName(),
55-
GetCurrentProcessId());
54+
sysmem_allocator_->SetDebugClientInfo(
55+
std::move(fuchsia::sysmem2::AllocatorSetDebugClientInfoRequest{}
56+
.set_name(GetCurrentProcessName())
57+
.set_id(GetCurrentProcessId())));
5658
FML_DCHECK(status == ZX_OK);
5759

5860
status = fdio_service_connect(

shell/platform/fuchsia/flutter/software_surface_producer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class SoftwareSurfaceProducer final : public SurfaceProducer {
5454

5555
void TraceStats();
5656

57-
fuchsia::sysmem::AllocatorSyncPtr sysmem_allocator_;
57+
fuchsia::sysmem2::AllocatorSyncPtr sysmem_allocator_;
5858
fuchsia::ui::composition::AllocatorPtr flatland_allocator_;
5959

6060
// These surfaces are available for re-use.

shell/platform/fuchsia/flutter/tests/integration/embedder/flutter-embedder-test.cc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,7 @@ void FlutterEmbedderTest::SetUpRealmBase() {
237237
Protocol{fuchsia::logger::LogSink::Name_},
238238
Protocol{fuchsia::inspect::InspectSink::Name_},
239239
Protocol{fuchsia::sysmem::Allocator::Name_},
240-
241-
// Replace "fuchsia.sysmem2.Allocator" with
242-
// fuchsia::sysmem2::Allocator::Name_
243-
// when available (fuchsia SDK >= 19).
244-
Protocol{"fuchsia.sysmem2.Allocator"},
240+
Protocol{fuchsia::sysmem2::Allocator::Name_},
245241
Protocol{fuchsia::tracing::provider::Registry::Name_},
246242
Protocol{kVulkanLoaderServiceName},
247243
},
@@ -254,11 +250,7 @@ void FlutterEmbedderTest::SetUpRealmBase() {
254250
.capabilities = {Protocol{fuchsia::logger::LogSink::Name_},
255251
Protocol{fuchsia::inspect::InspectSink::Name_},
256252
Protocol{fuchsia::sysmem::Allocator::Name_},
257-
258-
// Replace "fuchsia.sysmem2.Allocator" with
259-
// fuchsia::sysmem2::Allocator::Name_
260-
// when available (fuchsia SDK >= 19).
261-
Protocol{"fuchsia.sysmem2.Allocator"},
253+
Protocol{fuchsia::sysmem2::Allocator::Name_},
262254
Protocol{fuchsia::tracing::provider::Registry::Name_},
263255
Protocol{kVulkanLoaderServiceName}},
264256
.source = ParentRef{},

shell/platform/fuchsia/flutter/tests/integration/utils/portable_ui_test.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ void PortableUITest::SetUpRealmBase() {
8282
.capabilities = {Protocol{fuchsia::logger::LogSink::Name_},
8383
Protocol{fuchsia::inspect::InspectSink::Name_},
8484
Protocol{fuchsia::sysmem::Allocator::Name_},
85-
86-
// Replace string with
87-
// fuchsia::sysmem2::Allocator::Name_
88-
// when available (fuchsia SDK >= 19).
89-
Protocol{"fuchsia.sysmem2.Allocator"},
85+
Protocol{fuchsia::sysmem2::Allocator::Name_},
9086
Protocol{fuchsia::tracing::provider::Registry::Name_},
9187
Protocol{fuchsia::ui::input::ImeService::Name_},
9288
Protocol{kPosixSocketProviderName},

shell/platform/fuchsia/flutter/vulkan_surface.cc

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ constexpr VkImageUsageFlags kVkImageUsage =
4343
const VkSysmemColorSpaceFUCHSIA kSrgbColorSpace = {
4444
.sType = VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA,
4545
.pNext = nullptr,
46-
.colorSpace = static_cast<uint32_t>(fuchsia::sysmem::ColorSpaceType::SRGB),
46+
.colorSpace = static_cast<uint32_t>(fuchsia::images2::ColorSpace::SRGB),
4747
};
4848

4949
} // namespace
@@ -146,7 +146,7 @@ bool VulkanSurface::CreateVulkanImage(vulkan::VulkanProvider& vulkan_provider,
146146

147147
VulkanSurface::VulkanSurface(
148148
vulkan::VulkanProvider& vulkan_provider,
149-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
149+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
150150
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
151151
sk_sp<GrDirectContext> context,
152152
const SkISize& size)
@@ -262,7 +262,7 @@ bool VulkanSurface::CreateFences() {
262262
}
263263

264264
bool VulkanSurface::AllocateDeviceMemory(
265-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
265+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
266266
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
267267
sk_sp<GrDirectContext> context,
268268
const SkISize& size) {
@@ -272,17 +272,21 @@ bool VulkanSurface::AllocateDeviceMemory(
272272
return false;
273273
}
274274

275-
fuchsia::sysmem::BufferCollectionTokenSyncPtr vulkan_token;
276-
zx_status_t status =
277-
sysmem_allocator->AllocateSharedCollection(vulkan_token.NewRequest());
275+
fuchsia::sysmem2::BufferCollectionTokenSyncPtr vulkan_token;
276+
zx_status_t status = sysmem_allocator->AllocateSharedCollection(
277+
std::move(fuchsia::sysmem2::AllocatorAllocateSharedCollectionRequest{}
278+
.set_token_request(vulkan_token.NewRequest())));
278279
LOG_AND_RETURN(status != ZX_OK,
279280
"VulkanSurface: Failed to allocate collection");
280-
fuchsia::sysmem::BufferCollectionTokenSyncPtr scenic_token;
281-
status = vulkan_token->Duplicate(std::numeric_limits<uint32_t>::max(),
282-
scenic_token.NewRequest());
281+
fuchsia::sysmem2::BufferCollectionTokenSyncPtr scenic_token;
282+
status = vulkan_token->Duplicate(
283+
std::move(fuchsia::sysmem2::BufferCollectionTokenDuplicateRequest{}
284+
.set_rights_attenuation_mask(ZX_RIGHT_SAME_RIGHTS)
285+
.set_token_request(scenic_token.NewRequest())));
283286
LOG_AND_RETURN(status != ZX_OK,
284287
"VulkanSurface: Failed to duplicate collection token");
285-
status = vulkan_token->Sync();
288+
fuchsia::sysmem2::Node_Sync_Result sync_result;
289+
status = vulkan_token->Sync(&sync_result);
286290
LOG_AND_RETURN(status != ZX_OK,
287291
"VulkanSurface: Failed to sync collection token");
288292

@@ -291,7 +295,8 @@ bool VulkanSurface::AllocateDeviceMemory(
291295

292296
fuchsia::ui::composition::RegisterBufferCollectionArgs args;
293297
args.set_export_token(std::move(export_token));
294-
args.set_buffer_collection_token(std::move(scenic_token));
298+
args.set_buffer_collection_token(fuchsia::sysmem::BufferCollectionTokenHandle(
299+
scenic_token.Unbind().TakeChannel()));
295300
args.set_usage(
296301
fuchsia::ui::composition::RegisterBufferCollectionUsage::DEFAULT);
297302
flatland_allocator->RegisterBufferCollection(

shell/platform/fuchsia/flutter/vulkan_surface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct VulkanImage {
4444
class VulkanSurface final : public SurfaceProducerSurface {
4545
public:
4646
VulkanSurface(vulkan::VulkanProvider& vulkan_provider,
47-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
47+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
4848
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
4949
sk_sp<GrDirectContext> context,
5050
const SkISize& size);
@@ -135,7 +135,7 @@ class VulkanSurface final : public SurfaceProducerSurface {
135135
const zx_packet_signal_t* signal);
136136

137137
bool AllocateDeviceMemory(
138-
fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
138+
fuchsia::sysmem2::AllocatorSyncPtr& sysmem_allocator,
139139
fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
140140
sk_sp<GrDirectContext> context,
141141
const SkISize& size);

0 commit comments

Comments
 (0)