Commit 12f01bc1 authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Migrate remaining //services/viz typemaps to GN

Bug: 1059389
Change-Id: Ief6e325d1053efb0be2213508682e33b656e8dcd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2182884
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766490}
parent 7295a9dd
......@@ -32,7 +32,6 @@ _typemap_imports = [
"//services/resource_coordinator/public/cpp/typemaps.gni",
"//services/service_manager/public/cpp/typemaps.gni",
"//services/tracing/public/mojom/typemaps.gni",
"//services/viz/public/cpp/compositing/typemaps.gni",
"//skia/public/mojom/typemaps.gni",
"//third_party/blink/common/typemaps.gni",
"//third_party/blink/public/public_typemaps.gni",
......
per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom =
"//services/viz/public/mojom/compositing/compositor_frame_metadata.mojom"
public_headers = [ "//components/viz/common/quads/compositor_frame_metadata.h" ]
traits_headers = [ "//services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h" ]
deps = [
"//components/viz/common",
]
sources = [
"//services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.cc",
]
type_mappings = [
"viz.mojom.CompositorFrameMetadata=::viz::CompositorFrameMetadata[move_only]",
]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/copy_output_request.mojom"
deps = [
"//components/viz/common",
]
public_headers = [ "//components/viz/common/frame_sinks/copy_output_request.h" ]
traits_headers = [
"//services/viz/public/cpp/compositing/copy_output_request_mojom_traits.h",
]
sources = [
"//services/viz/public/cpp/compositing/copy_output_request_mojom_traits.cc",
]
type_mappings = [ "viz.mojom.CopyOutputRequest=::std::unique_ptr<::viz::CopyOutputRequest>[move_only]" ]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/copy_output_result.mojom"
public_headers = [ "//components/viz/common/frame_sinks/copy_output_result.h" ]
traits_headers = [
"//services/viz/public/cpp/compositing/copy_output_result_mojom_traits.h",
]
deps = [ "//components/viz/common" ]
sources = [
"//services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc",
"//services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.h",
"//services/viz/public/cpp/compositing/copy_output_result_mojom_traits.cc",
]
type_mappings = [ "viz.mojom.CopyOutputResult=::std::unique_ptr<::viz::CopyOutputResult>[move_only]" ]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/filter_operation.mojom"
deps = [
"//cc/paint",
]
public_headers = [ "//cc/paint/filter_operation.h" ]
traits_headers =
[ "//services/viz/public/cpp/compositing/filter_operation_mojom_traits.h" ]
type_mappings = [ "viz.mojom.FilterOperation=::cc::FilterOperation" ]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/filter_operations.mojom"
deps = [
"//cc/paint",
]
public_headers = [ "//cc/paint/filter_operations.h" ]
traits_headers =
[ "//services/viz/public/cpp/compositing/filter_operations_mojom_traits.h" ]
sources = [
"//services/viz/public/cpp/compositing/filter_operations_mojom_traits.cc",
]
type_mappings = [ "viz.mojom.FilterOperations=::cc::FilterOperations" ]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/frame_deadline.mojom"
public_headers = [ "//components/viz/common/quads/frame_deadline.h" ]
traits_headers =
[ "//services/viz/public/cpp/compositing/frame_deadline_mojom_traits.h" ]
deps = [ "//components/viz/common" ]
sources =
[ "//services/viz/public/cpp/compositing/frame_deadline_mojom_traits.cc" ]
type_mappings = [ "viz.mojom.FrameDeadline=::viz::FrameDeadline" ]
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/frame_timing_details.mojom"
public_headers = [ "//components/viz/common/frame_timing_details.h" ]
deps = [
"//components/viz/common",
]
traits_headers = [
"//services/viz/public/cpp/compositing/frame_timing_details_mojom_traits.h",
]
type_mappings = [ "viz.mojom.FrameTimingDetails=::viz::FrameTimingDetails" ]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/viz/public/cpp/compositing/frame_timing_details_mojom_traits.h"
#include "ui/gfx/mojom/presentation_feedback_mojom_traits.h"
#include "ui/gfx/mojom/swap_timings_mojom_traits.h"
namespace mojo {
using Traits = StructTraits<viz::mojom::FrameTimingDetailsDataView,
viz::FrameTimingDetails>;
// static
bool Traits::Read(viz::mojom::FrameTimingDetailsDataView data,
viz::FrameTimingDetails* out) {
return data.ReadReceivedCompositorFrameTimestamp(
&out->received_compositor_frame_timestamp) &&
data.ReadDrawStartTimestamp(&out->draw_start_timestamp) &&
data.ReadSwapTimings(&out->swap_timings) &&
data.ReadPresentationFeedback(&out->presentation_feedback);
}
} // namespace mojo
......@@ -7,7 +7,6 @@
#include "components/viz/common/frame_timing_details.h"
#include "services/viz/public/mojom/compositing/frame_timing_details.mojom-shared.h"
#include "ui/gfx/presentation_feedback.h"
#include "ui/gfx/swap_result.h"
......@@ -37,13 +36,7 @@ struct StructTraits<viz::mojom::FrameTimingDetailsDataView,
}
static bool Read(viz::mojom::FrameTimingDetailsDataView data,
viz::FrameTimingDetails* out) {
return data.ReadReceivedCompositorFrameTimestamp(
&out->received_compositor_frame_timestamp) &&
data.ReadDrawStartTimestamp(&out->draw_start_timestamp) &&
data.ReadSwapTimings(&out->swap_timings) &&
data.ReadPresentationFeedback(&out->presentation_feedback);
}
viz::FrameTimingDetails* out);
};
} // namespace mojo
......
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom =
"//services/viz/public/mojom/compositing/local_surface_id_allocation.mojom"
public_headers =
[ "//components/viz/common/surfaces/local_surface_id_allocation.h" ]
deps = [
"//components/viz/common",
]
traits_headers = [ "//services/viz/public/cpp/compositing/local_surface_id_allocation_mojom_traits.h" ]
type_mappings =
[ "viz.mojom.LocalSurfaceIdAllocation=::viz::LocalSurfaceIdAllocation" ]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/paint_filter.mojom"
public_headers = [ "//cc/paint/paint_filter.h" ]
traits_headers =
[ "//services/viz/public/cpp/compositing/paint_filter_mojom_traits.h" ]
deps = [
"//cc/paint",
]
sources = [
"//services/viz/public/cpp/compositing/paint_filter_mojom_traits.cc",
]
type_mappings = [ "viz.mojom.PaintFilter=::sk_sp<::cc::PaintFilter>" ]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/render_pass.mojom"
public_headers = [
"//components/viz/common/quads/draw_quad.h",
"//components/viz/common/quads/render_pass.h",
"//ui/gl/dc_renderer_layer_params.h",
]
traits_headers = [
"//services/viz/public/cpp/compositing/quads_mojom_traits.h",
"//services/viz/public/cpp/compositing/render_pass_mojom_traits.h",
]
sources = [
"//services/viz/public/cpp/compositing/quads_mojom_traits.cc",
"//services/viz/public/cpp/compositing/render_pass_mojom_traits.cc",
]
deps = [
"//ui/gl",
]
type_mappings = [
"viz.mojom.RenderPass=::std::unique_ptr<::viz::RenderPass>[move_only,nullable_is_same_type]",
"viz::mojom::ProtectedVideoState=::gfx::ProtectedVideoType",
]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/resource_settings.mojom"
public_headers = [ "//components/viz/common/resources/resource_settings.h" ]
traits_headers =
[ "//services/viz/public/cpp/compositing/resource_settings_mojom_traits.h" ]
deps = [
"//components/viz/common",
"//ui/gfx/mojom",
]
sources = [
"//services/viz/public/cpp/compositing/resource_settings_mojom_traits.cc",
]
type_mappings = [
"viz.mojom.BufferUsageAndFormat=::std::pair<::gfx::BufferUsage, gfx::BufferFormat>",
"viz.mojom.ResourceSettings=::viz::ResourceSettings",
]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/selection.mojom"
public_headers = [
"//components/viz/common/quads/selection.h",
"//ui/gfx/selection_bound.h",
]
traits_headers =
[ "//services/viz/public/cpp/compositing/selection_mojom_traits.h" ]
type_mappings =
[ "viz.mojom.Selection=::viz::Selection<::gfx::SelectionBound>" ]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/shared_quad_state.mojom"
public_headers = [ "//components/viz/common/quads/shared_quad_state.h" ]
traits_headers =
[ "//services/viz/public/cpp/compositing/shared_quad_state_mojom_traits.h" ]
type_mappings = [ "viz.mojom.SharedQuadState=::viz::SharedQuadState" ]
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/surface_range.mojom"
public_headers = [ "//components/viz/common/surfaces/surface_range.h" ]
deps = [
"//components/viz/common",
]
traits_headers =
[ "//services/viz/public/cpp/compositing/surface_range_mojom_traits.h" ]
type_mappings = [ "viz.mojom.SurfaceRange=::viz::SurfaceRange" ]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom = "//services/viz/public/mojom/compositing/transferable_resource.mojom"
public_headers = [ "//components/viz/common/resources/transferable_resource.h" ]
traits_headers = [
"//services/viz/public/cpp/compositing/transferable_resource_mojom_traits.h",
]
sources = [
"//services/viz/public/cpp/compositing/transferable_resource_mojom_traits.cc",
]
type_mappings = [ "viz.mojom.TransferableResource=::viz::TransferableResource" ]
deps = [
"//gpu/ipc/common:mojom_traits",
"//ui/gfx/geometry/mojom:mojom_traits",
]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
typemaps = [
"//services/viz/public/cpp/compositing/compositor_frame_metadata.typemap",
"//services/viz/public/cpp/compositing/filter_operation.typemap",
"//services/viz/public/cpp/compositing/filter_operations.typemap",
"//services/viz/public/cpp/compositing/frame_deadline.typemap",
"//services/viz/public/cpp/compositing/copy_output_request.typemap",
"//services/viz/public/cpp/compositing/copy_output_result.typemap",
"//services/viz/public/cpp/compositing/frame_timing_details.typemap",
"//services/viz/public/cpp/compositing/local_surface_id_allocation.typemap",
"//services/viz/public/cpp/compositing/paint_filter.typemap",
"//services/viz/public/cpp/compositing/render_pass.typemap",
"//services/viz/public/cpp/compositing/resource_settings.typemap",
"//services/viz/public/cpp/compositing/selection.typemap",
"//services/viz/public/cpp/compositing/shared_quad_state.typemap",
"//services/viz/public/cpp/compositing/surface_range.typemap",
"//services/viz/public/cpp/compositing/transferable_resource.typemap",
"//services/viz/public/cpp/compositing/vertical_scroll_direction.typemap",
]
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
mojom =
"//services/viz/public/mojom/compositing/vertical_scroll_direction.mojom"
public_headers = [ "//components/viz/common/vertical_scroll_direction.h" ]
traits_headers = [ "//services/viz/public/cpp/compositing/vertical_scroll_direction_mojom_traits.h" ]
type_mappings =
[ "viz.mojom.VerticalScrollDirection=::viz::VerticalScrollDirection" ]
......@@ -180,6 +180,95 @@ mojom("mojom") {
]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.CompositorFrameMetadata"
cpp = "::viz::CompositorFrameMetadata"
move_only = true
},
]
traits_sources = [ "//services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.cc" ]
traits_headers = [ "//services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.CopyOutputRequest"
cpp = "::std::unique_ptr<::viz::CopyOutputRequest>"
move_only = true
},
]
traits_sources = [ "//services/viz/public/cpp/compositing/copy_output_request_mojom_traits.cc" ]
traits_headers = [ "//services/viz/public/cpp/compositing/copy_output_request_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.CopyOutputResult"
cpp = "::std::unique_ptr<::viz::CopyOutputResult>"
move_only = true
},
]
traits_sources = [
"//services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.cc",
"//services/viz/public/cpp/compositing/bitmap_in_shared_memory_mojom_traits.h",
"//services/viz/public/cpp/compositing/copy_output_result_mojom_traits.cc",
]
traits_headers = [ "//services/viz/public/cpp/compositing/copy_output_result_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.FilterOperation"
cpp = "::cc::FilterOperation"
},
]
traits_headers = [
"//services/viz/public/cpp/compositing/filter_operation_mojom_traits.h",
]
traits_public_deps = [ "//cc/paint" ]
},
{
types = [
{
mojom = "viz.mojom.FilterOperations"
cpp = "::cc::FilterOperations"
},
]
traits_sources = [ "//services/viz/public/cpp/compositing/filter_operations_mojom_traits.cc" ]
traits_headers = [ "//services/viz/public/cpp/compositing/filter_operations_mojom_traits.h" ]
traits_public_deps = [ "//cc/paint" ]
},
{
types = [
{
mojom = "viz.mojom.FrameDeadline"
cpp = "::viz::FrameDeadline"
},
]
traits_sources = [
"//services/viz/public/cpp/compositing/frame_deadline_mojom_traits.cc",
]
traits_headers = [
"//services/viz/public/cpp/compositing/frame_deadline_mojom_traits.h",
]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.FrameTimingDetails"
cpp = "::viz::FrameTimingDetails"
},
]
traits_sources = [ "//services/viz/public/cpp/compositing/frame_timing_details_mojom_traits.cc" ]
traits_headers = [ "//services/viz/public/cpp/compositing/frame_timing_details_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
......@@ -199,6 +288,128 @@ mojom("mojom") {
"//ui/gfx/geometry/mojom",
]
},
{
types = [
{
mojom = "viz.mojom.LocalSurfaceIdAllocation"
cpp = "::viz::LocalSurfaceIdAllocation"
},
]
traits_headers = [ "//services/viz/public/cpp/compositing/local_surface_id_allocation_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.PaintFilter"
cpp = "::sk_sp<::cc::PaintFilter>"
},
]
traits_sources = [
"//services/viz/public/cpp/compositing/paint_filter_mojom_traits.cc",
]
traits_headers = [
"//services/viz/public/cpp/compositing/paint_filter_mojom_traits.h",
]
traits_public_deps = [ "//cc/paint" ]
},
{
types = [
{
mojom = "viz.mojom.RenderPass"
cpp = "::std::unique_ptr<::viz::RenderPass>"
move_only = true
nullable_is_same_type = true
},
{
mojom = "viz.mojom.ProtectedVideoState"
cpp = "::gfx::ProtectedVideoType"
},
]
traits_sources = [
"//services/viz/public/cpp/compositing/quads_mojom_traits.cc",
"//services/viz/public/cpp/compositing/render_pass_mojom_traits.cc",
]
traits_headers = [
"//services/viz/public/cpp/compositing/quads_mojom_traits.h",
"//services/viz/public/cpp/compositing/render_pass_mojom_traits.h",
]
traits_public_deps = [ "//ui/gl" ]
},
{
types = [
{
mojom = "viz.mojom.BufferUsageAndFormat"
cpp = "::std::pair<::gfx::BufferUsage, gfx::BufferFormat>"
},
{
mojom = "viz.mojom.ResourceSettings"
cpp = "::viz::ResourceSettings"
},
]
traits_sources = [ "//services/viz/public/cpp/compositing/resource_settings_mojom_traits.cc" ]
traits_headers = [ "//services/viz/public/cpp/compositing/resource_settings_mojom_traits.h" ]
traits_public_deps = [
"//components/viz/common",
"//ui/gfx/mojom",
]
},
{
types = [
{
mojom = "viz.mojom.Selection"
cpp = "::viz::Selection<::gfx::SelectionBound>"
},
]
traits_headers =
[ "//services/viz/public/cpp/compositing/selection_mojom_traits.h" ]
},
{
types = [
{
mojom = "viz.mojom.SharedQuadState"
cpp = "::viz::SharedQuadState"
},
]
traits_headers = [ "//services/viz/public/cpp/compositing/shared_quad_state_mojom_traits.h" ]
},
{
types = [
{
mojom = "viz.mojom.SurfaceRange"
cpp = "::viz::SurfaceRange"
},
]
traits_headers = [
"//services/viz/public/cpp/compositing/surface_range_mojom_traits.h",
]
traits_public_deps = [ "//components/viz/common" ]
},
{
types = [
{
mojom = "viz.mojom.TransferableResource"
cpp = "::viz::TransferableResource"
},
]
traits_sources = [ "//services/viz/public/cpp/compositing/transferable_resource_mojom_traits.cc" ]
traits_headers = [ "//services/viz/public/cpp/compositing/transferable_resource_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
traits_deps = [
"//gpu/ipc/common:mojom_traits",
"//ui/gfx/geometry/mojom",
]
},
{
types = [
{
mojom = "viz.mojom.VerticalScrollDirection"
cpp = "::viz::VerticalScrollDirection"
},
]
traits_headers = [ "//services/viz/public/cpp/compositing/vertical_scroll_direction_mojom_traits.h" ]
traits_public_deps = [ "//components/viz/common" ]
},
]
blink_cpp_typemaps = shared_cpp_typemaps
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment