Work around a GCC5 bug where it fails to choose the correct base::span constructor. Adapted from this commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/www-client/chromium?id=7843d29ab07411a9c70962fb90b4cd1546910242 --- a/gpu/ipc/common/mailbox_struct_traits.h +++ b/gpu/ipc/common/mailbox_struct_traits.h @@ -15,7 +15,7 @@ namespace mojo { template <> struct StructTraits { static base::span name(const gpu::Mailbox& mailbox) { - return mailbox.name; + return base::make_span(mailbox.name); } static bool Read(gpu::mojom::MailboxDataView data, gpu::Mailbox* out); }; --- a/services/viz/public/cpp/compositing/filter_operation_struct_traits.h +++ b/services/viz/public/cpp/compositing/filter_operation_struct_traits.h @@ -134,7 +134,7 @@ struct StructTraits { static base::span matrix(const cc::FilterOperation& operation) { if (operation.type() != cc::FilterOperation::COLOR_MATRIX) return base::span(); - return operation.matrix(); + return base::make_span(operation.matrix()); } static base::span shape( --- a/services/viz/public/cpp/compositing/quads_struct_traits.h +++ b/services/viz/public/cpp/compositing/quads_struct_traits.h @@ -308,7 +308,7 @@ static base::span vertex_opacity(const viz::DrawQuad& input) { const viz::TextureDrawQuad* quad = viz::TextureDrawQuad::MaterialCast(&input); - return quad->vertex_opacity; + return base::make_span(quad->vertex_opacity); } static bool y_flipped(const viz::DrawQuad& input) {