summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-20 11:01:03 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-03-16 15:20:16 +0100
commit59fe5d9da81a8aa38c19ed336f9be53a7c4b0e9c (patch)
treea8585f2bae4068cb4b73b3dedd6d0257f0efca18
parent9650eff615a19f2cda06760b2e475b24e8faae2b (diff)
downloadqtwebengine-chromium-59fe5d9da81a8aa38c19ed336f9be53a7c4b0e9c.tar.gz
Stop using C++20 initialization
Named initialization is proposed for C++20 and we are supposed to be using only C++14. Change-Id: Iefd936eeadf5ba3ee53b446bbb4ab7c6891aadaa Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--chromium/base/win/windows_version.cc8
-rw-r--r--chromium/components/viz/service/display_embedder/gl_output_surface_offscreen.cc2
-rw-r--r--chromium/components/viz/service/display_embedder/skia_output_device.cc7
-rw-r--r--chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc5
-rw-r--r--chromium/content/browser/conversions/conversion_storage_sql.cc4
-rw-r--r--chromium/device/fido/aoa/android_accessory_discovery.cc10
-rw-r--r--chromium/gpu/command_buffer/service/external_vk_image_backing.cc18
-rw-r--r--chromium/gpu/command_buffer/service/raster_decoder.cc8
-rw-r--r--chromium/gpu/vulkan/vma_wrapper.cc28
-rw-r--r--chromium/gpu/vulkan/vulkan_command_buffer.cc12
-rw-r--r--chromium/gpu/vulkan/vulkan_fence_helper.cc6
-rw-r--r--chromium/gpu/vulkan/vulkan_image.cc83
-rw-r--r--chromium/gpu/vulkan/vulkan_image_win.cc9
-rw-r--r--chromium/gpu/vulkan/vulkan_swap_chain.cc47
-rw-r--r--chromium/gpu/vulkan/vulkan_util.cc16
-rw-r--r--chromium/gpu/vulkan/vulkan_util_win32.cc21
-rw-r--r--chromium/gpu/vulkan/win32/vulkan_surface_win32.cc14
-rw-r--r--chromium/media/gpu/windows/d3d11_vp9_accelerator.cc2
-rw-r--r--chromium/media/renderers/paint_canvas_video_renderer.cc4
-rw-r--r--chromium/services/network/quic_transport.cc4
-rw-r--r--chromium/services/network/trust_tokens/trust_token_key_commitment_controller.cc6
-rw-r--r--chromium/sql/database.cc2
-rw-r--r--chromium/sql/recovery.cc4
-rw-r--r--chromium/third_party/blink/common/privacy_budget/aggregating_sample_collector.cc2
-rw-r--r--chromium/third_party/blink/renderer/core/input/scroll_manager.cc11
-rw-r--r--chromium/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc18
-rw-r--r--chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc11
-rw-r--r--chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_spacing.h2
28 files changed, 184 insertions, 180 deletions
diff --git a/chromium/base/win/windows_version.cc b/chromium/base/win/windows_version.cc
index 64c8aa83526..e7d453be529 100644
--- a/chromium/base/win/windows_version.cc
+++ b/chromium/base/win/windows_version.cc
@@ -203,10 +203,10 @@ Version OSInfo::Kernel32Version() const {
OSInfo::VersionNumber OSInfo::Kernel32VersionNumber() const {
DCHECK(Kernel32BaseVersion().components().size() == 4);
static const VersionNumber version = {
- .major = Kernel32BaseVersion().components()[0],
- .minor = Kernel32BaseVersion().components()[1],
- .build = Kernel32BaseVersion().components()[2],
- .patch = Kernel32BaseVersion().components()[3]};
+ /*.major =*/ Kernel32BaseVersion().components()[0],
+ /*.minor =*/ Kernel32BaseVersion().components()[1],
+ /*.build =*/ Kernel32BaseVersion().components()[2],
+ /*.patch =*/ Kernel32BaseVersion().components()[3]};
return version;
}
diff --git a/chromium/components/viz/service/display_embedder/gl_output_surface_offscreen.cc b/chromium/components/viz/service/display_embedder/gl_output_surface_offscreen.cc
index 4ef7f4f17e7..6b3a25d981b 100644
--- a/chromium/components/viz/service/display_embedder/gl_output_surface_offscreen.cc
+++ b/chromium/components/viz/service/display_embedder/gl_output_surface_offscreen.cc
@@ -123,7 +123,7 @@ void GLOutputSurfaceOffscreen::OnSwapBuffersComplete(
// Swap timings are not available since for offscreen there is no Swap, just a
// SignalSyncToken. We use base::TimeTicks::Now() as an overestimate.
auto now = base::TimeTicks::Now();
- client()->DidReceiveSwapBuffersAck({.swap_start = now});
+ client()->DidReceiveSwapBuffersAck({now});
client()->DidReceivePresentationFeedback(gfx::PresentationFeedback(
now, base::TimeDelta::FromMilliseconds(16), /*flags=*/0));
diff --git a/chromium/components/viz/service/display_embedder/skia_output_device.cc b/chromium/components/viz/service/display_embedder/skia_output_device.cc
index 3ed0b7c5efa..c70e135c93a 100644
--- a/chromium/components/viz/service/display_embedder/skia_output_device.cc
+++ b/chromium/components/viz/service/display_embedder/skia_output_device.cc
@@ -246,10 +246,9 @@ GrSemaphoresSubmitted SkiaOutputDevice::Flush(
VulkanContextProvider* vulkan_context_provider,
std::vector<GrBackendSemaphore> end_semaphores,
base::OnceClosure on_finished) {
- GrFlushInfo flush_info = {
- .fNumSemaphores = end_semaphores.size(),
- .fSignalSemaphores = end_semaphores.data(),
- };
+ GrFlushInfo flush_info;
+ flush_info.fNumSemaphores = end_semaphores.size();
+ flush_info.fSignalSemaphores = end_semaphores.data();
gpu::AddVulkanCleanupTaskForSkiaFlush(vulkan_context_provider, &flush_info);
if (on_finished)
gpu::AddCleanupTaskForSkiaFlush(std::move(on_finished), &flush_info);
diff --git a/chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc b/chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
index c8046a401c1..be6beabfbd2 100644
--- a/chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
+++ b/chromium/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
@@ -654,9 +654,10 @@ void SkiaOutputSurfaceImplOnGpu::FinishPaintRenderPass(
destroy_after_swap_.emplace_back(std::move(ddl));
GrFlushInfo flush_info = {
- .fNumSemaphores = end_semaphores.size(),
- .fSignalSemaphores = end_semaphores.data(),
+ /*.fNumSemaphores =*/ end_semaphores.size(),
+ /*.fSignalSemaphores =*/ end_semaphores.data(),
};
+
gpu::AddVulkanCleanupTaskForSkiaFlush(vulkan_context_provider_,
&flush_info);
if (on_finished)
diff --git a/chromium/content/browser/conversions/conversion_storage_sql.cc b/chromium/content/browser/conversions/conversion_storage_sql.cc
index 9b18d833c32..e11bf420526 100644
--- a/chromium/content/browser/conversions/conversion_storage_sql.cc
+++ b/chromium/content/browser/conversions/conversion_storage_sql.cc
@@ -646,7 +646,9 @@ bool ConversionStorageSql::LazyInit(DbCreationPolicy creation_policy) {
}
db_ = std::make_unique<sql::Database>(sql::DatabaseOptions{
- .exclusive_locking = true, .page_size = 4096, .cache_size = 32});
+ /*.exclusive_locking =*/ true,
+ base::FeatureList::IsEnabled(sql::features::kEnableWALModeByDefault),
+ /*.page_size =*/ 4096, /*.cache_size =*/ 32});
db_->set_histogram_tag("Conversions");
// Supply this callback with a weak_ptr to avoid calling the error callback
diff --git a/chromium/device/fido/aoa/android_accessory_discovery.cc b/chromium/device/fido/aoa/android_accessory_discovery.cc
index 3ff3aa3b0f9..d566b501b0d 100644
--- a/chromium/device/fido/aoa/android_accessory_discovery.cc
+++ b/chromium/device/fido/aoa/android_accessory_discovery.cc
@@ -108,11 +108,11 @@ FindAccessoryInterface(const device::mojom::UsbDeviceInfoPtr& device_info) {
}
return AndroidAccessoryDiscovery::InterfaceInfo{
- .configuration = config->configuration_value,
- .interface = interface->interface_number,
- .in_endpoint = *in_endpoint_num,
- .out_endpoint = *out_endpoint_num,
- .guid = device_info->guid,
+ /* .configuration = */ config->configuration_value,
+ /* .interface = */ interface->interface_number,
+ /* .in_endpoint = */ *in_endpoint_num,
+ /* .out_endpoint = */ *out_endpoint_num,
+ /* .guid = */ device_info->guid,
};
}
}
diff --git a/chromium/gpu/command_buffer/service/external_vk_image_backing.cc b/chromium/gpu/command_buffer/service/external_vk_image_backing.cc
index 5497b542d6d..05db0f94061 100644
--- a/chromium/gpu/command_buffer/service/external_vk_image_backing.cc
+++ b/chromium/gpu/command_buffer/service/external_vk_image_backing.cc
@@ -472,8 +472,8 @@ bool ExternalVkImageBacking::BeginAccess(
GrBackendSemaphore backend_semaphore;
backend_semaphore.initVulkan(vk_semaphore);
GrFlushInfo flush_info = {
- .fNumSemaphores = 1,
- .fSignalSemaphores = &backend_semaphore,
+ /* .fNumSemaphores = */ 1,
+ /* .fSignalSemaphores = */ &backend_semaphore,
};
gpu::AddVulkanCleanupTaskForSkiaFlush(
context_state()->vk_context_provider(), &flush_info);
@@ -841,10 +841,12 @@ bool ExternalVkImageBacking::WritePixelsWithCallback(
DCHECK(stride == 0 || size().height() * stride <= data_size);
VkBufferCreateInfo buffer_create_info = {
- .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
- .size = data_size,
- .usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT,
- .sharingMode = VK_SHARING_MODE_EXCLUSIVE,
+ VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
+ nullptr,
+ 0,
+ data_size,
+ VK_BUFFER_USAGE_TRANSFER_SRC_BIT,
+ VK_SHARING_MODE_EXCLUSIVE,
};
VmaAllocator allocator =
@@ -974,8 +976,8 @@ bool ExternalVkImageBacking::WritePixelsWithData(
GrBackendSemaphore end_access_backend_semaphore;
end_access_backend_semaphore.initVulkan(vk_end_access_semaphore);
GrFlushInfo flush_info = {
- .fNumSemaphores = 1,
- .fSignalSemaphores = &end_access_backend_semaphore,
+ /* .fNumSemaphores = */ 1,
+ /* .fSignalSemaphores = */ &end_access_backend_semaphore,
};
gr_context->flush(flush_info);
diff --git a/chromium/gpu/command_buffer/service/raster_decoder.cc b/chromium/gpu/command_buffer/service/raster_decoder.cc
index 09522b82db6..b556b962fa5 100644
--- a/chromium/gpu/command_buffer/service/raster_decoder.cc
+++ b/chromium/gpu/command_buffer/service/raster_decoder.cc
@@ -649,8 +649,8 @@ class RasterDecoderImpl final : public RasterDecoder,
// false, so the begin_semaphores can be released, and end_semaphores can
// be signalled.
GrFlushInfo flush_info = {
- .fNumSemaphores = signal_semaphores.size(),
- .fSignalSemaphores = signal_semaphores.data(),
+ /* .fNumSemaphores = */ signal_semaphores.size(),
+ /* .fSignalSemaphores = */ signal_semaphores.data(),
};
gpu::AddVulkanCleanupTaskForSkiaFlush(
shared_context_state_->vk_context_provider(), &flush_info);
@@ -986,8 +986,8 @@ void RasterDecoderImpl::Destroy(bool have_context) {
// Make sure we flush any pending skia work on this context.
if (sk_surface_) {
GrFlushInfo flush_info = {
- .fNumSemaphores = end_semaphores_.size(),
- .fSignalSemaphores = end_semaphores_.data(),
+ end_semaphores_.size(),
+ end_semaphores_.data(),
};
AddVulkanCleanupTaskForSkiaFlush(
shared_context_state_->vk_context_provider(), &flush_info);
diff --git a/chromium/gpu/vulkan/vma_wrapper.cc b/chromium/gpu/vulkan/vma_wrapper.cc
index f30f3740224..1d52d2c2698 100644
--- a/chromium/gpu/vulkan/vma_wrapper.cc
+++ b/chromium/gpu/vulkan/vma_wrapper.cc
@@ -44,21 +44,20 @@ VkResult CreateAllocator(VkPhysicalDevice physical_device,
};
static_assert(kVulkanRequiredApiVersion >= VK_API_VERSION_1_1, "");
- VmaAllocatorCreateInfo allocator_info = {
- .flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT,
- .physicalDevice = physical_device,
- .device = device,
+ VmaAllocatorCreateInfo allocator_info;
+ allocator_info.flags = VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT;
+ allocator_info.physicalDevice = physical_device;
+ allocator_info.device = device;
// 4MB was picked for the size here by looking at memory usage of Android
// apps and runs of DM. It seems to be a good compromise of not wasting
// unused allocated space and not making too many small allocations. The
// AMD allocator will start making blocks at 1/8 the max size and builds
// up block size as needed before capping at the max set here.
- .preferredLargeHeapBlockSize = 4 * 1024 * 1024,
- .pHeapSizeLimit = heap_size_limit,
- .pVulkanFunctions = &functions,
- .instance = instance,
- .vulkanApiVersion = kVulkanRequiredApiVersion,
- };
+ allocator_info.preferredLargeHeapBlockSize = 4 * 1024 * 1024;
+ allocator_info.pHeapSizeLimit = heap_size_limit;
+ allocator_info.pVulkanFunctions = &functions;
+ allocator_info.instance = instance;
+ allocator_info.vulkanApiVersion = kVulkanRequiredApiVersion;
return vmaCreateAllocator(&allocator_info, pAllocator);
}
@@ -91,10 +90,9 @@ VkResult CreateBuffer(VmaAllocator allocator,
VkMemoryPropertyFlags preferred_flags,
VkBuffer* buffer,
VmaAllocation* allocation) {
- VmaAllocationCreateInfo allocation_create_info = {
- .requiredFlags = required_flags,
- .preferredFlags = preferred_flags,
- };
+ VmaAllocationCreateInfo allocation_create_info;
+ allocation_create_info.requiredFlags = required_flags;
+ allocation_create_info.preferredFlags = preferred_flags;
return vmaCreateBuffer(allocator, buffer_create_info, &allocation_create_info,
buffer, allocation, nullptr);
@@ -171,4 +169,4 @@ uint64_t GetTotalAllocatedMemory(VmaAllocator allocator) {
}
} // namespace vma
-} // namespace gpu \ No newline at end of file
+} // namespace gpu
diff --git a/chromium/gpu/vulkan/vulkan_command_buffer.cc b/chromium/gpu/vulkan/vulkan_command_buffer.cc
index 56b91da1beb..e3e07a3852f 100644
--- a/chromium/gpu/vulkan/vulkan_command_buffer.cc
+++ b/chromium/gpu/vulkan/vulkan_command_buffer.cc
@@ -107,12 +107,12 @@ bool VulkanCommandBuffer::Initialize() {
VkDevice device = device_queue_->GetVulkanDevice();
VkCommandBufferAllocateInfo command_buffer_info = {
- .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,
- .pNext = nullptr,
- .commandPool = command_pool_->handle(),
- .level = primary_ ? VK_COMMAND_BUFFER_LEVEL_PRIMARY
- : VK_COMMAND_BUFFER_LEVEL_SECONDARY,
- .commandBufferCount = 1,
+ VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO,
+ nullptr,
+ command_pool_->handle(),
+ primary_ ? VK_COMMAND_BUFFER_LEVEL_PRIMARY
+ : VK_COMMAND_BUFFER_LEVEL_SECONDARY,
+ 1,
};
DCHECK_EQ(static_cast<VkCommandBuffer>(VK_NULL_HANDLE), command_buffer_);
diff --git a/chromium/gpu/vulkan/vulkan_fence_helper.cc b/chromium/gpu/vulkan/vulkan_fence_helper.cc
index c8338a4afc2..f303b052a73 100644
--- a/chromium/gpu/vulkan/vulkan_fence_helper.cc
+++ b/chromium/gpu/vulkan/vulkan_fence_helper.cc
@@ -34,9 +34,9 @@ void VulkanFenceHelper::Destroy() {
// TODO(ericrk): Handle recycling fences.
VkResult VulkanFenceHelper::GetFence(VkFence* fence) {
VkFenceCreateInfo create_info{
- .sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
- .pNext = nullptr,
- .flags = 0,
+ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
+ nullptr,
+ 0,
};
return vkCreateFence(device_queue_->GetVulkanDevice(), &create_info,
nullptr /* pAllocator */, fence);
diff --git a/chromium/gpu/vulkan/vulkan_image.cc b/chromium/gpu/vulkan/vulkan_image.cc
index c0f4655cbad..bacc681e812 100644
--- a/chromium/gpu/vulkan/vulkan_image.cc
+++ b/chromium/gpu/vulkan/vulkan_image.cc
@@ -149,9 +149,10 @@ void VulkanImage::Destroy() {
base::ScopedFD VulkanImage::GetMemoryFd(
VkExternalMemoryHandleTypeFlagBits handle_type) {
VkMemoryGetFdInfoKHR get_fd_info = {
- .sType = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR,
- .memory = device_memory_,
- .handleType = handle_type,
+ VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR,
+ nullptr,
+ device_memory_,
+ handle_type,
};
@@ -188,21 +189,21 @@ bool VulkanImage::Initialize(VulkanDeviceQueue* device_queue,
image_tiling_ = image_tiling;
VkImageCreateInfo create_info = {
- .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
- .pNext = vk_image_create_info_next,
- .flags = flags_,
- .imageType = VK_IMAGE_TYPE_2D,
- .format = format_,
- .extent = {size.width(), size.height(), 1},
- .mipLevels = 1,
- .arrayLayers = 1,
- .samples = VK_SAMPLE_COUNT_1_BIT,
- .tiling = image_tiling_,
- .usage = usage,
- .sharingMode = VK_SHARING_MODE_EXCLUSIVE,
- .queueFamilyIndexCount = 0,
- .pQueueFamilyIndices = nullptr,
- .initialLayout = image_layout_,
+ VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
+ vk_image_create_info_next,
+ flags_,
+ VK_IMAGE_TYPE_2D,
+ format_,
+ {size.width(), size.height(), 1},
+ 1,
+ 1,
+ VK_SAMPLE_COUNT_1_BIT,
+ image_tiling_,
+ usage,
+ VK_SHARING_MODE_EXCLUSIVE,
+ 0,
+ nullptr,
+ image_layout_,
};
VkDevice vk_device = device_queue->GetVulkanDevice();
VkResult result =
@@ -229,9 +230,9 @@ bool VulkanImage::Initialize(VulkanDeviceQueue* device_queue,
// Some vulkan implementations require dedicated memory for sharing memory
// object between vulkan instances.
VkMemoryDedicatedAllocateInfoKHR dedicated_memory_info = {
- .sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR,
- .pNext = vk_memory_allocation_info_next,
- .image = image_,
+ VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR,
+ vk_memory_allocation_info_next,
+ image_,
};
auto index =
@@ -245,10 +246,10 @@ bool VulkanImage::Initialize(VulkanDeviceQueue* device_queue,
memory_type_index_ = index.value();
VkMemoryAllocateInfo memory_allocate_info = {
- .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
- .pNext = &dedicated_memory_info,
- .allocationSize = device_size_,
- .memoryTypeIndex = memory_type_index_,
+ VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+ &dedicated_memory_info,
+ device_size_,
+ memory_type_index_,
};
result = vkAllocateMemory(vk_device, &memory_allocate_info,
@@ -286,24 +287,26 @@ bool VulkanImage::InitializeWithExternalMemory(VulkanDeviceQueue* device_queue,
#endif
VkPhysicalDeviceImageFormatInfo2 format_info_2 = {
- .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
- .format = format,
- .type = VK_IMAGE_TYPE_2D,
- .tiling = image_tiling,
- .usage = usage,
- .flags = flags,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
+ nullptr,
+ format,
+ VK_IMAGE_TYPE_2D,
+ image_tiling,
+ usage,
+ flags,
};
VkPhysicalDeviceExternalImageFormatInfo external_info = {
- .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
- .handleType = kHandleType,
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO,
+ nullptr,
+ kHandleType,
};
format_info_2.pNext = &external_info;
VkImageFormatProperties2 image_format_properties_2 = {
- .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
+ VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2,
};
VkExternalImageFormatProperties external_image_format_properties = {
- .sType = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
+ VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES,
};
image_format_properties_2.pNext = &external_image_format_properties;
@@ -331,13 +334,15 @@ bool VulkanImage::InitializeWithExternalMemory(VulkanDeviceQueue* device_queue,
DCHECK(handle_types_ & kHandleType);
VkExternalMemoryImageCreateInfoKHR external_image_create_info = {
- .sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR,
- .handleTypes = handle_types_,
+ VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR,
+ nullptr,
+ handle_types_,
};
VkExportMemoryAllocateInfoKHR external_memory_allocate_info = {
- .sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR,
- .handleTypes = handle_types_,
+ VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR,
+ nullptr,
+ handle_types_,
};
return Initialize(device_queue, size, format, usage, flags, image_tiling,
diff --git a/chromium/gpu/vulkan/vulkan_image_win.cc b/chromium/gpu/vulkan/vulkan_image_win.cc
index 6501ceb1644..c49ffad9c1f 100644
--- a/chromium/gpu/vulkan/vulkan_image_win.cc
+++ b/chromium/gpu/vulkan/vulkan_image_win.cc
@@ -24,11 +24,10 @@ bool VulkanImage::InitializeFromGpuMemoryBufferHandle(
base::win::ScopedHandle VulkanImage::GetMemoryHandle(
VkExternalMemoryHandleTypeFlagBits handle_type) {
- VkMemoryGetWin32HandleInfoKHR get_handle_info = {
- .sType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR,
- .memory = device_memory_,
- .handleType = handle_type,
- };
+ VkMemoryGetWin32HandleInfoKHR get_handle_info;
+ get_handle_info.sType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR;
+ get_handle_info.memory = device_memory_;
+ get_handle_info.handleType = handle_type;
VkDevice device = device_queue_->GetVulkanDevice();
diff --git a/chromium/gpu/vulkan/vulkan_swap_chain.cc b/chromium/gpu/vulkan/vulkan_swap_chain.cc
index 1c5b93e07dc..6e32a770eac 100644
--- a/chromium/gpu/vulkan/vulkan_swap_chain.cc
+++ b/chromium/gpu/vulkan/vulkan_swap_chain.cc
@@ -363,31 +363,29 @@ bool VulkanSwapChain::PresentBuffer(const gfx::Rect& rect) {
DCHECK(current_image_data.present_semaphore != VK_NULL_HANDLE);
VkRectLayerKHR rect_layer = {
- .offset = {rect.x(), rect.y()},
- .extent = {rect.width(), rect.height()},
- .layer = 0,
+ /* .offset = */ {rect.x(), rect.y()},
+ /* .extent = */ {rect.width(), rect.height()},
+ /* .layer = */ 0,
};
VkPresentRegionKHR present_region = {
- .rectangleCount = 1,
- .pRectangles = &rect_layer,
+ /* .rectangleCount = */ 1,
+ /* .pRectangles = */ &rect_layer,
};
- VkPresentRegionsKHR present_regions = {
- .sType = VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR,
- .swapchainCount = 1,
- .pRegions = &present_region,
- };
+ VkPresentRegionsKHR present_regions;
+ present_regions.sType = VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR;
+ present_regions.swapchainCount = 1;
+ present_regions.pRegions = &present_region;
- VkPresentInfoKHR present_info = {
- .sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,
- .pNext = is_incremental_present_supported_ ? &present_regions : nullptr,
- .waitSemaphoreCount = 1,
- .pWaitSemaphores = &current_image_data.present_semaphore,
- .swapchainCount = 1,
- .pSwapchains = &swap_chain_,
- .pImageIndices = &acquired_image_.value(),
- };
+ VkPresentInfoKHR present_info;
+ present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
+ present_info.pNext = is_incremental_present_supported_ ? &present_regions : nullptr;
+ present_info.waitSemaphoreCount = 1;
+ present_info.pWaitSemaphores = &current_image_data.present_semaphore;
+ present_info.swapchainCount = 1;
+ present_info.pSwapchains = &swap_chain_;
+ present_info.pImageIndices = &acquired_image_.value();
VkQueue queue = device_queue_->GetVulkanQueue();
auto result = vkQueuePresentKHR(queue, &present_info);
@@ -446,12 +444,13 @@ bool VulkanSwapChain::AcquireNextImage() {
VkSemaphore acquire_semaphore = fence_and_semaphores.semaphores[0];
VkSemaphore present_semaphore = fence_and_semaphores.semaphores[1];
uint32_t next_image;
- auto result = ({
+ VkResult result;
+ {
base::ScopedBlockingCall scoped_blocking_call(
FROM_HERE, base::BlockingType::MAY_BLOCK);
- vkAcquireNextImageKHR(device, swap_chain_, kTimeout, acquire_semaphore,
- acquire_fence, &next_image);
- });
+ result = vkAcquireNextImageKHR(device, swap_chain_, kTimeout,
+ acquire_semaphore, acquire_fence, &next_image);
+ }
if (UNLIKELY(result == VK_TIMEOUT)) {
LOG(ERROR) << "vkAcquireNextImageKHR() hangs.";
@@ -524,7 +523,7 @@ VulkanSwapChain::GetOrCreateFenceAndSemaphores() {
if (UNLIKELY(fence_and_semaphores.fence == VK_NULL_HANDLE)) {
constexpr VkFenceCreateInfo fence_create_info = {
- .sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
+ /* .sType = */ VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
};
auto result =
vkCreateFence(device, &fence_create_info,
diff --git a/chromium/gpu/vulkan/vulkan_util.cc b/chromium/gpu/vulkan/vulkan_util.cc
index a063fd3596e..c3d3fdf2aaa 100644
--- a/chromium/gpu/vulkan/vulkan_util.cc
+++ b/chromium/gpu/vulkan/vulkan_util.cc
@@ -76,15 +76,13 @@ VkSemaphore CreateExternalVkSemaphore(
},
base::Time::Now()));
- VkExportSemaphoreCreateInfo export_info = {
- .sType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO,
- .handleTypes = handle_types,
- };
-
- VkSemaphoreCreateInfo sem_info = {
- .sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,
- .pNext = &export_info,
- };
+ VkExportSemaphoreCreateInfo export_info;
+ export_info.sType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO;
+ export_info.handleTypes = handle_types;
+
+ VkSemaphoreCreateInfo sem_info;
+ sem_info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
+ sem_info.pNext = &export_info;
VkSemaphore semaphore = VK_NULL_HANDLE;
VkResult result =
diff --git a/chromium/gpu/vulkan/vulkan_util_win32.cc b/chromium/gpu/vulkan/vulkan_util_win32.cc
index 7b4ad659c83..997009f646b 100644
--- a/chromium/gpu/vulkan/vulkan_util_win32.cc
+++ b/chromium/gpu/vulkan/vulkan_util_win32.cc
@@ -36,12 +36,12 @@ VkSemaphore ImportVkSemaphoreHandle(VkDevice vk_device,
return VK_NULL_HANDLE;
auto win32_handle = handle.TakeHandle();
- VkImportSemaphoreWin32HandleInfoKHR import = {
- .sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR,
- .semaphore = semaphore,
- .handleType = handle_type,
- .handle = win32_handle.Get(),
- };
+ VkImportSemaphoreWin32HandleInfoKHR import;
+ import.sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR;
+ import.semaphore = semaphore;
+ import.handleType = handle_type;
+ import.handle = win32_handle.Get();
+
result = vkImportSemaphoreWin32HandleKHR(vk_device, &import);
if (result != VK_SUCCESS) {
vkDestroySemaphore(vk_device, semaphore, nullptr);
@@ -67,11 +67,10 @@ SemaphoreHandle GetVkSemaphoreHandle(
},
base::Time::Now()));
- VkSemaphoreGetWin32HandleInfoKHR info = {
- .sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR,
- .semaphore = vk_semaphore,
- .handleType = handle_type,
- };
+ VkSemaphoreGetWin32HandleInfoKHR info;
+ info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR;
+ info.semaphore = vk_semaphore;
+ info.handleType = handle_type;
HANDLE handle = nullptr;
VkResult result = vkGetSemaphoreWin32HandleKHR(vk_device, &info, &handle);
diff --git a/chromium/gpu/vulkan/win32/vulkan_surface_win32.cc b/chromium/gpu/vulkan/win32/vulkan_surface_win32.cc
index cb83385c307..5ec56adfe7d 100644
--- a/chromium/gpu/vulkan/win32/vulkan_surface_win32.cc
+++ b/chromium/gpu/vulkan/win32/vulkan_surface_win32.cc
@@ -194,12 +194,12 @@ std::unique_ptr<VulkanSurfaceWin32> VulkanSurfaceWin32::Create(
event.Wait();
VkSurfaceKHR surface;
- VkWin32SurfaceCreateInfoKHR surface_create_info = {
- .sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR,
- .hinstance = reinterpret_cast<HINSTANCE>(
- GetWindowLongPtr(window->hwnd(), GWLP_HINSTANCE)),
- .hwnd = window->hwnd(),
- };
+ VkWin32SurfaceCreateInfoKHR surface_create_info;
+ surface_create_info.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
+ surface_create_info.hinstance = reinterpret_cast<HINSTANCE>(
+ GetWindowLongPtr(window->hwnd(), GWLP_HINSTANCE));
+ surface_create_info.hwnd = window->hwnd();
+
VkResult result = vkCreateWin32SurfaceKHR(vk_instance, &surface_create_info,
nullptr, &surface);
if (VK_SUCCESS != result) {
@@ -241,4 +241,4 @@ bool VulkanSurfaceWin32::Reshape(const gfx::Size& size,
return VulkanSurface::Reshape(size, pre_transform);
}
-} // namespace gpu \ No newline at end of file
+} // namespace gpu
diff --git a/chromium/media/gpu/windows/d3d11_vp9_accelerator.cc b/chromium/media/gpu/windows/d3d11_vp9_accelerator.cc
index 9fbfcd255af..0e70be41490 100644
--- a/chromium/media/gpu/windows/d3d11_vp9_accelerator.cc
+++ b/chromium/media/gpu/windows/d3d11_vp9_accelerator.cc
@@ -27,7 +27,7 @@ CreateSubsampleMappingBlock(const std::vector<SubsampleEntry>& from) {
std::vector<D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK> to(from.size());
for (const auto& entry : from) {
D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK subsample = {
- .ClearSize = entry.clear_bytes, .EncryptedSize = entry.cypher_bytes};
+ entry.clear_bytes, entry.cypher_bytes};
to.push_back(subsample);
}
return to;
diff --git a/chromium/media/renderers/paint_canvas_video_renderer.cc b/chromium/media/renderers/paint_canvas_video_renderer.cc
index 21133386d89..696591109ad 100644
--- a/chromium/media/renderers/paint_canvas_video_renderer.cc
+++ b/chromium/media/renderers/paint_canvas_video_renderer.cc
@@ -375,9 +375,9 @@ void ConvertVideoFrameToRGBPixelsTask(const VideoFrame* video_frame,
// Note: Unlike |data|, stride does not need to be adjusted by the
// visible rect and sample size. Adding the full frame stride to a
// pixel on row N and column M will wrap to column M on row N + 1.
- .stride = video_frame->stride(plane),
+ /*.stride = */video_frame->stride(plane),
- .data = video_frame->visible_data(plane) +
+ /*.data = */video_frame->visible_data(plane) +
video_frame->stride(plane) * (chunk_start * rows_per_chunk) /
VideoFrame::SampleSize(format, plane).height()};
}
diff --git a/chromium/services/network/quic_transport.cc b/chromium/services/network/quic_transport.cc
index 79b4ba48c63..f3591e4c68a 100644
--- a/chromium/services/network/quic_transport.cc
+++ b/chromium/services/network/quic_transport.cc
@@ -28,8 +28,8 @@ net::QuicTransportClient::Parameters CreateParameters(
for (const auto& fingerprint : fingerprints) {
params.server_certificate_fingerprints.push_back(
- quic::CertificateFingerprint{.algorithm = fingerprint->algorithm,
- .fingerprint = fingerprint->fingerprint});
+ quic::CertificateFingerprint{/* .algorithm = */ fingerprint->algorithm,
+ /* .fingerprint = */ fingerprint->fingerprint});
}
return params;
}
diff --git a/chromium/services/network/trust_tokens/trust_token_key_commitment_controller.cc b/chromium/services/network/trust_tokens/trust_token_key_commitment_controller.cc
index 6d6b0731656..dc8ba779797 100644
--- a/chromium/services/network/trust_tokens/trust_token_key_commitment_controller.cc
+++ b/chromium/services/network/trust_tokens/trust_token_key_commitment_controller.cc
@@ -107,7 +107,7 @@ void TrustTokenKeyCommitmentController::HandleRedirect(
// delay before the client deletes this object.
url_loader_.reset();
std::move(completion_callback_)
- .Run({.value = Status::Value::kGotRedirected}, /*result=*/nullptr);
+ .Run({Status::Value::kGotRedirected}, /*result=*/nullptr);
// |this| may be deleted here.
}
@@ -129,12 +129,12 @@ void TrustTokenKeyCommitmentController::HandleResponseBody(
if (!result) {
std::move(completion_callback_)
- .Run({.value = Status::Value::kCouldntParse}, /*result=*/nullptr);
+ .Run({Status::Value::kCouldntParse}, /*result=*/nullptr);
return;
}
std::move(completion_callback_)
- .Run({.value = Status::Value::kOk}, std::move(result));
+ .Run({Status::Value::kOk}, std::move(result));
// |this| may be deleted here.
}
diff --git a/chromium/sql/database.cc b/chromium/sql/database.cc
index bb23163cca5..246b731d7e2 100644
--- a/chromium/sql/database.cc
+++ b/chromium/sql/database.cc
@@ -237,7 +237,7 @@ static_assert(DatabaseOptions::kDefaultPageSize == SQLITE_DEFAULT_PAGE_SIZE,
"DatabaseOptions::kDefaultPageSize must match the value "
"configured into SQLite");
-Database::Database() : Database({.exclusive_locking = false}) {}
+Database::Database() : Database({/*.exclusive_locking =*/ false}) {}
Database::Database(DatabaseOptions options)
: options_(options), mmap_disabled_(!enable_mmap_by_default_) {
diff --git a/chromium/sql/recovery.cc b/chromium/sql/recovery.cc
index 4e6d1519991..6b30a3537f2 100644
--- a/chromium/sql/recovery.cc
+++ b/chromium/sql/recovery.cc
@@ -185,7 +185,9 @@ void Recovery::Rollback(std::unique_ptr<Recovery> r) {
Recovery::Recovery(Database* connection)
: db_(connection),
- recover_db_({.exclusive_locking = false, .page_size = db_->page_size()}) {
+ recover_db_({/*.exclusive_locking =*/ false,
+ base::FeatureList::IsEnabled(sql::features::kEnableWALModeByDefault),
+ /*.page_size =*/ db_->page_size()}) {
// Files with I/O errors cannot be safely memory-mapped.
recover_db_.set_mmap_disabled();
diff --git a/chromium/third_party/blink/common/privacy_budget/aggregating_sample_collector.cc b/chromium/third_party/blink/common/privacy_budget/aggregating_sample_collector.cc
index dfea6e11a47..c28f17c689e 100644
--- a/chromium/third_party/blink/common/privacy_budget/aggregating_sample_collector.cc
+++ b/chromium/third_party/blink/common/privacy_budget/aggregating_sample_collector.cc
@@ -157,7 +157,7 @@ void AggregatingSampleCollector::TryAcceptSingleSample(
per_surface_samples_.emplace(
new_sample.surface,
- Samples{.samples = {{new_sample.value}}, .total_value_count = 1});
+ Samples{/*.samples =*/ {{new_sample.value}}, false, /*.total_value_count =*/ 1});
} else {
Samples& sample_set = samples_for_surface_it->second;
++sample_set.total_value_count;
diff --git a/chromium/third_party/blink/renderer/core/input/scroll_manager.cc b/chromium/third_party/blink/renderer/core/input/scroll_manager.cc
index 9e97ed5bfe4..76722797f5c 100644
--- a/chromium/third_party/blink/renderer/core/input/scroll_manager.cc
+++ b/chromium/third_party/blink/renderer/core/input/scroll_manager.cc
@@ -56,12 +56,11 @@ cc::SnapFlingController::GestureScrollType ToGestureScrollType(
cc::SnapFlingController::GestureScrollUpdateInfo GetGestureScrollUpdateInfo(
const WebGestureEvent& event) {
- return {
- .delta = gfx::Vector2dF(-event.data.scroll_update.delta_x,
- -event.data.scroll_update.delta_y),
- .is_in_inertial_phase = event.data.scroll_update.inertial_phase ==
- WebGestureEvent::InertialPhaseState::kMomentum,
- .event_time = event.TimeStamp()};
+ return {gfx::Vector2dF(-event.data.scroll_update.delta_x,
+ -event.data.scroll_update.delta_y),
+ event.data.scroll_update.inertial_phase ==
+ WebGestureEvent::InertialPhaseState::kMomentum,
+ event.TimeStamp()};
}
} // namespace
diff --git a/chromium/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc b/chromium/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc
index 39508a0f3cb..419362cece7 100644
--- a/chromium/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc
+++ b/chromium/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc
@@ -527,8 +527,8 @@ IDBRequest* IDBObjectStore::DoPutAll(ScriptState* script_state,
Vector<IDBIndexKeys> keys_for_value;
for (const auto& it : Metadata().indexes) {
keys_for_value.emplace_back(IDBIndexKeys{
- .id = it.key,
- .keys = GenerateIndexKeysForValue(script_state->GetIsolate(),
+ /* .id = */ it.key,
+ /* .keys = */ GenerateIndexKeysForValue(script_state->GetIsolate(),
Metadata(), *it.value, clones[i])});
}
puts[i]->index_keys = std::move(keys_for_value);
@@ -778,9 +778,9 @@ IDBRequest* IDBObjectStore::DoPut(ScriptState* script_state,
if (clone.IsEmpty())
value_wrapper.Clone(script_state, &clone);
index_keys.emplace_back(IDBIndexKeys{
- .id = it.key,
- .keys = GenerateIndexKeysForValue(script_state->GetIsolate(),
- Metadata(), *it.value, clone)});
+ it.key,
+ GenerateIndexKeysForValue(script_state->GetIsolate(),
+ Metadata(), *it.value, clone)});
}
// Records 1KB to 1GB.
UMA_HISTOGRAM_COUNTS_1M(
@@ -975,10 +975,10 @@ class IndexPopulator final : public NativeEventListener {
Vector<IDBIndexKeys> index_keys;
index_keys.ReserveInitialCapacity(1);
index_keys.emplace_back(IDBIndexKeys{
- .id = IndexMetadata().id,
- .keys = GenerateIndexKeysForValue(script_state_->GetIsolate(),
- ObjectStoreMetadata(),
- IndexMetadata(), value)});
+ IndexMetadata().id,
+ GenerateIndexKeysForValue(script_state_->GetIsolate(),
+ ObjectStoreMetadata(),
+ IndexMetadata(), value)});
database_->Backend()->SetIndexKeys(transaction_id_, object_store_id_,
IDBKey::Clone(primary_key),
diff --git a/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc b/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
index 93a50012738..2b9d7990cb6 100644
--- a/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
+++ b/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
@@ -862,11 +862,12 @@ void ShapeResult::ApplySpacingImpl(
}
typename ShapeResultSpacing<TextContainerType>::ComputeSpacingParameters
- parameters{.index = run_start_index + glyph_data.character_index,
- .advance_override = run->font_data_->GetAdvanceOverride(),
- .original_advance = glyph_data.advance,
- .advance_proportional_override =
- run->font_data_->GetAdvanceProportionalOverride()};
+ parameters;
+ parameters.index = run_start_index + glyph_data.character_index;
+ parameters.advance_override = run->font_data_->GetAdvanceOverride();
+ parameters.original_advance = glyph_data.advance;
+ parameters.advance_proportional_override =
+ run->font_data_->GetAdvanceProportionalOverride();
space = spacing.ComputeSpacing(parameters, offset);
glyph_data.advance += space;
total_space_for_run += space;
diff --git a/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_spacing.h b/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_spacing.h
index 5af754a255f..f20a9286f21 100644
--- a/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_spacing.h
+++ b/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_spacing.h
@@ -69,7 +69,7 @@ class PLATFORM_EXPORT ShapeResultSpacing final {
float advance_proportional_override = 1.0;
};
float ComputeSpacing(unsigned index, float& offset) {
- return ComputeSpacing(ComputeSpacingParameters{.index = index}, offset);
+ return ComputeSpacing(ComputeSpacingParameters{/*.index =*/ index}, offset);
}
float ComputeSpacing(const ComputeSpacingParameters& parameters,
float& offset);