diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-22 15:27:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-10-07 08:40:03 +0000 |
commit | 93f97ed20ac72a3b861bc2a40cdd4dd7b10c323e (patch) | |
tree | ed5f5e78e6172502614ed4c46571ca5e0953fd2c | |
parent | 62aa7cb6e09ae3adec5a597a2d21e0b5f5a3bfbd (diff) | |
download | qtwebengine-chromium-93f97ed20ac72a3b861bc2a40cdd4dd7b10c323e.tar.gz |
Fix building with gcc 6/7 after 77 merge
Change-Id: Id8b9212be6568deabf44368be789c2864a6eda81
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
17 files changed, 63 insertions, 51 deletions
diff --git a/chromium/base/task/promise/promise_executor.h b/chromium/base/task/promise/promise_executor.h index f893a2cefef..1a7acfada4b 100644 --- a/chromium/base/task/promise/promise_executor.h +++ b/chromium/base/task/promise/promise_executor.h @@ -214,7 +214,7 @@ class BASE_EXPORT PromiseExecutor { // static template <typename T> -const PromiseExecutor::VTable PromiseExecutor::VTableHelper<T>::vtable_; +constexpr PromiseExecutor::VTable PromiseExecutor::VTableHelper<T>::vtable_; } // namespace internal } // namespace base diff --git a/chromium/content/browser/indexed_db/indexed_db_transaction.cc b/chromium/content/browser/indexed_db/indexed_db_transaction.cc index 11783f25063..8bc44ae29f7 100644 --- a/chromium/content/browser/indexed_db/indexed_db_transaction.cc +++ b/chromium/content/browser/indexed_db/indexed_db_transaction.cc @@ -615,7 +615,7 @@ void IndexedDBTransaction::AddObservation( auto it = connection_changes_map_.find(connection_id); if (it == connection_changes_map_.end()) { it = connection_changes_map_ - .insert({connection_id, blink::mojom::IDBObserverChanges::New()}) + .emplace(connection_id, blink::mojom::IDBObserverChanges::New()) .first; } it->second->observations.push_back(std::move(observation)); diff --git a/chromium/content/browser/notifications/notification_event_dispatcher_impl.cc b/chromium/content/browser/notifications/notification_event_dispatcher_impl.cc index 4caf49cd6a1..26d0fa6fc31 100644 --- a/chromium/content/browser/notifications/notification_event_dispatcher_impl.cc +++ b/chromium/content/browser/notifications/notification_event_dispatcher_impl.cc @@ -459,8 +459,7 @@ void NotificationEventDispatcherImpl::RegisterNonPersistentNotificationListener( non_persistent_notification_listeners_.erase(notification_id); } - non_persistent_notification_listeners_.insert( - {notification_id, std::move(bound_remote)}); + non_persistent_notification_listeners_.emplace(notification_id, std::move(bound_remote)); } void NotificationEventDispatcherImpl::DispatchNonPersistentShowEvent( diff --git a/chromium/device/fido/device_response_converter.cc b/chromium/device/fido/device_response_converter.cc index 86b3518fc96..8d88c0c7968 100644 --- a/chromium/device/fido/device_response_converter.cc +++ b/chromium/device/fido/device_response_converter.cc @@ -549,7 +549,7 @@ base::Optional<cbor::Value> FixInvalidUTF8(cbor::Value in, PathPredicate predicate) { if (!ContainsInvalidUTF8(in)) { // Common case that everything is fine. - return in; + return std::move(in); } std::vector<const cbor::Value*> path; diff --git a/chromium/device/fido/pin.cc b/chromium/device/fido/pin.cc index ff212fc2fa8..e469afe1d6f 100644 --- a/chromium/device/fido/pin.cc +++ b/chromium/device/fido/pin.cc @@ -122,7 +122,7 @@ base::Optional<bssl::UniquePtr<EC_POINT>> PointFromKeyAgreementResponse( return base::nullopt; } - return ret; + return std::move(ret); } // static diff --git a/chromium/extensions/browser/api/declarative_net_request/ruleset_manager.cc b/chromium/extensions/browser/api/declarative_net_request/ruleset_manager.cc index 49c8521929c..7ad05e51b13 100644 --- a/chromium/extensions/browser/api/declarative_net_request/ruleset_manager.cc +++ b/chromium/extensions/browser/api/declarative_net_request/ruleset_manager.cc @@ -453,7 +453,7 @@ RulesetManager::GetRedirectOrUpgradeAction( Action action(Action::Type::REDIRECT); action.redirect_url = std::move(redirect_action.redirect_url); - return action; + return std::move(action); } return base::nullopt; @@ -472,7 +472,7 @@ base::Optional<RulesetManager::Action> RulesetManager::GetRemoveHeadersAction( Action action(Action::Type::REMOVE_HEADERS); PopulateHeadersFromMask(mask, &action.request_headers_to_remove, &action.response_headers_to_remove); - return action; + return std::move(action); } RulesetManager::Action RulesetManager::EvaluateRequestInternal( 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 5617b2e4f85..89188437b0b 100644 --- a/chromium/gpu/command_buffer/service/external_vk_image_backing.cc +++ b/chromium/gpu/command_buffer/service/external_vk_image_backing.cc @@ -50,10 +50,11 @@ VkResult CreateVkImage(SharedContextState* context_state, bool is_external, VkImage* image) { VkExternalMemoryImageCreateInfoKHR external_info = { - .sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR, - .handleTypes = context_state->vk_context_provider() - ->GetVulkanImplementation() - ->GetExternalImageHandleType(), + VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR, + nullptr, + context_state->vk_context_provider() + ->GetVulkanImplementation() + ->GetExternalImageHandleType(), }; auto usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT; @@ -61,21 +62,21 @@ VkResult CreateVkImage(SharedContextState* context_state, usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT; VkImageCreateInfo create_info = { - .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, - .pNext = is_external ? &external_info : nullptr, - .flags = 0, - .imageType = VK_IMAGE_TYPE_2D, - .format = format, - .extent = {size.width(), size.height(), 1}, - .mipLevels = 1, - .arrayLayers = 1, - .samples = VK_SAMPLE_COUNT_1_BIT, - .tiling = VK_IMAGE_TILING_OPTIMAL, - .usage = usage, - .sharingMode = VK_SHARING_MODE_EXCLUSIVE, - .queueFamilyIndexCount = 0, - .pQueueFamilyIndices = nullptr, - .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + is_external ? &external_info : nullptr, + 0, + VK_IMAGE_TYPE_2D, + format, + {size.width(), size.height(), 1}, + 1, + 1, + VK_SAMPLE_COUNT_1_BIT, + VK_IMAGE_TILING_OPTIMAL, + usage, + VK_SHARING_MODE_EXCLUSIVE, + 0, + nullptr, + VK_IMAGE_LAYOUT_UNDEFINED, }; VkDevice device = @@ -162,17 +163,18 @@ std::unique_ptr<ExternalVkImageBacking> ExternalVkImageBacking::Create( } VkExportMemoryAllocateInfoKHR external_info = { - .sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, - .handleTypes = context_state->vk_context_provider() - ->GetVulkanImplementation() - ->GetExternalImageHandleType(), + VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, + nullptr, + context_state->vk_context_provider() + ->GetVulkanImplementation() + ->GetExternalImageHandleType(), }; VkMemoryAllocateInfo mem_alloc_info = { - .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, - .pNext = is_external ? &external_info : nullptr, - .allocationSize = requirements.size, - .memoryTypeIndex = FindMemoryTypeIndex( + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, + is_external ? &external_info : nullptr, + requirements.size, + FindMemoryTypeIndex( context_state, requirements, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT), }; @@ -605,10 +607,12 @@ bool ExternalVkImageBacking::WritePixels(size_t data_size, FillBufferCallback callback) { 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, }; VkBuffer stage_buffer = VK_NULL_HANDLE; // TODO: Consider reusing stage_buffer and stage_memory, if allocation causes @@ -624,12 +628,12 @@ bool ExternalVkImageBacking::WritePixels(size_t data_size, vkGetBufferMemoryRequirements(device(), stage_buffer, &memory_requirements); VkMemoryAllocateInfo memory_allocate_info = { - .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, - .allocationSize = memory_requirements.size, - .memoryTypeIndex = - FindMemoryTypeIndex(context_state_, memory_requirements, - VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | - VK_MEMORY_PROPERTY_HOST_COHERENT_BIT), + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, + nullptr, + memory_requirements.size, + FindMemoryTypeIndex(context_state_, memory_requirements, + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT), }; VkDeviceMemory stage_memory = VK_NULL_HANDLE; diff --git a/chromium/media/renderers/paint_canvas_video_renderer.h b/chromium/media/renderers/paint_canvas_video_renderer.h index 2628f28725d..bc47f35b542 100644 --- a/chromium/media/renderers/paint_canvas_video_renderer.h +++ b/chromium/media/renderers/paint_canvas_video_renderer.h @@ -17,6 +17,7 @@ #include "cc/paint/paint_canvas.h" #include "cc/paint/paint_flags.h" #include "cc/paint/paint_image.h" +#include "components/viz/common/gpu/context_provider.h" #include "gpu/command_buffer/common/mailbox.h" #include "media/base/media_export.h" #include "media/base/timestamp_constants.h" diff --git a/chromium/mojo/public/tools/bindings/chromium_bindings_configuration.gni b/chromium/mojo/public/tools/bindings/chromium_bindings_configuration.gni index 25384ccd0ad..fd186b339a2 100644 --- a/chromium/mojo/public/tools/bindings/chromium_bindings_configuration.gni +++ b/chromium/mojo/public/tools/bindings/chromium_bindings_configuration.gni @@ -16,7 +16,7 @@ _typemap_imports = [ "//components/chromeos_camera/common/typemaps.gni", "//components/sync/mojom/typemaps.gni", "//components/typemaps.gni", - "//content/browser/typemaps.gni", +# "//content/browser/typemaps.gni", "//content/common/typemaps.gni", "//content/public/common/typemaps.gni", "//device/bluetooth/public/mojom/typemaps.gni", diff --git a/chromium/net/dns/dns_query.cc b/chromium/net/dns/dns_query.cc index 90176623c05..eb2210ab799 100644 --- a/chromium/net/dns/dns_query.cc +++ b/chromium/net/dns/dns_query.cc @@ -85,7 +85,7 @@ base::Optional<OptRecordRdata> AddPaddingIfNecessary( std::string(padding_size - OptRecordRdata::Opt::kHeaderSize, 0))); } - return merged_opt_rdata; + return base::make_optional(std::move(merged_opt_rdata)); } } // namespace diff --git a/chromium/services/tracing/perfetto/track_event_json_exporter.cc b/chromium/services/tracing/perfetto/track_event_json_exporter.cc index 14eefc11b48..c96bf465824 100644 --- a/chromium/services/tracing/perfetto/track_event_json_exporter.cc +++ b/chromium/services/tracing/perfetto/track_event_json_exporter.cc @@ -757,6 +757,6 @@ TrackEventJSONExporter::HandleLegacyEvent(const TrackEvent::LegacyEvent& event, } // Even if |flags==0|, we need to call AddFlags to output instant event scope. builder.AddFlags(flags, id, event.id_scope()); - return builder; + return std::move(builder); } } // namespace tracing diff --git a/chromium/third_party/blink/renderer/core/css/css_paint_value.cc b/chromium/third_party/blink/renderer/core/css/css_paint_value.cc index a4c875a55cb..85733ea0026 100644 --- a/chromium/third_party/blink/renderer/core/css/css_paint_value.cc +++ b/chromium/third_party/blink/renderer/core/css/css_paint_value.cc @@ -88,6 +88,7 @@ scoped_refptr<Image> CSSPaintValue::GetImage( layout_object.GetFrame()->GetPage()->DeviceScaleFactorDeprecated(); } +#ifndef TOOLKIT_QT // For Off-Thread PaintWorklet, we just collect the necessary inputs together // and defer the actual JavaScript call until much later (during cc Raster). if (RuntimeEnabledFeatures::OffMainThreadCSSPaintEnabled()) { @@ -114,6 +115,7 @@ scoped_refptr<Image> CSSPaintValue::GetImage( } } } +#endif return generator_->Paint(client, target_size, parsed_input_arguments_, device_scale_factor); diff --git a/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.cc b/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.cc index a90eb46fa93..15d688cc5ac 100644 --- a/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.cc +++ b/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.cc @@ -105,6 +105,7 @@ bool BuildCustomValues(const Document& document, } // namespace +#ifndef TOOLKIT_QT // static base::Optional<PaintWorkletStylePropertyMap::CrossThreadData> PaintWorkletStylePropertyMap::BuildCrossThreadData( @@ -123,6 +124,7 @@ PaintWorkletStylePropertyMap::BuildCrossThreadData( return base::nullopt; return data; } +#endif // static PaintWorkletStylePropertyMap::CrossThreadData diff --git a/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.h b/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.h index f7695831639..38fbd17002f 100644 --- a/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.h +++ b/chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.h @@ -31,12 +31,14 @@ class CORE_EXPORT PaintWorkletStylePropertyMap HashMap<String, std::unique_ptr<CrossThreadStyleValue>>; // Build the data that will be passed to the worklet thread to construct a // style map. Should be called on the main thread only. +#ifndef TOOLKIT_QT static base::Optional<CrossThreadData> BuildCrossThreadData( const Document&, const ComputedStyle&, Node* styled_node, const Vector<CSSPropertyID>& native_properties, const Vector<AtomicString>& custom_properties); +#endif static CrossThreadData CopyCrossThreadData(const CrossThreadData& data); diff --git a/chromium/third_party/blink/renderer/modules/manifest/manifest_parser.cc b/chromium/third_party/blink/renderer/modules/manifest/manifest_parser.cc index 45020797187..eea3bdb409a 100644 --- a/chromium/third_party/blink/renderer/modules/manifest/manifest_parser.cc +++ b/chromium/third_party/blink/renderer/modules/manifest/manifest_parser.cc @@ -622,7 +622,7 @@ ManifestParser::ParseShareTarget(const JSONObject* object) { return base::nullopt; } - return share_target; + return std::move(share_target); } base::Optional<mojom::blink::ManifestFileHandlerPtr> @@ -648,7 +648,7 @@ ManifestParser::ParseFileHandler(const JSONObject* object) { return base::nullopt; } - return file_handler; + return std::move(file_handler); } String ManifestParser::ParseRelatedApplicationPlatform( diff --git a/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h b/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h index a1a6708907c..710ef8519e9 100644 --- a/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h +++ b/chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h @@ -67,6 +67,7 @@ class ShapeResult::GlyphOffset final : public FloatSize { USING_FAST_MALLOC(GlyphOffset); public: + GlyphOffset() = default; using FloatSize::FloatSize; explicit GlyphOffset(const FloatSize& other) : FloatSize(other) {} diff --git a/chromium/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h b/chromium/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h index b9231df245c..be35605ec18 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h +++ b/chromium/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h @@ -215,8 +215,9 @@ class PLATFORM_EXPORT Canvas2DLayerBridge : public cc::TextureLayerClient { void ClearPendingRasterTimers(); void FinishRasterTimers(gpu::gles2::GLES2Interface*); struct RasterTimer { + RasterTimer() : gl_query_id(0) { } // The id for querying the duration of the gpu-side of the draw - GLuint gl_query_id = 0u; + GLuint gl_query_id; // The duration of the CPU-side of the draw base::TimeDelta cpu_raster_duration; |