Convert Viz typemaps to GN (1/2)
This covers everything but public compositor typemaps, since there's a lot of those. Bug: 1059389 Change-Id: I1e0c1212d8c450a98413e964b760a2fd514ceee9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111198 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#753854}
This commit is contained in:
mojo/public/tools/bindings
services/viz
@ -34,10 +34,7 @@ _typemap_imports = [
|
||||
"//services/resource_coordinator/public/cpp/typemaps.gni",
|
||||
"//services/service_manager/public/cpp/typemaps.gni",
|
||||
"//services/tracing/public/mojom/typemaps.gni",
|
||||
"//services/viz/privileged/cpp/typemaps.gni",
|
||||
"//services/viz/privileged/mojom/compositing/typemaps.gni",
|
||||
"//services/viz/public/cpp/compositing/typemaps.gni",
|
||||
"//services/viz/public/cpp/hit_test/typemaps.gni",
|
||||
"//skia/public/mojom/typemaps.gni",
|
||||
"//third_party/blink/common/typemaps.gni",
|
||||
"//third_party/blink/public/public_typemaps.gni",
|
||||
|
@ -1,4 +1,2 @@
|
||||
per-file *.typemap=set noparent
|
||||
per-file *.typemap=file://ipc/SECURITY_OWNERS
|
||||
per-file *_mojom_traits*.*=set noparent
|
||||
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
|
||||
|
@ -1,14 +0,0 @@
|
||||
# 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/privileged/mojom/gl/context_lost_reason.mojom"
|
||||
public_headers = [ "//gpu/command_buffer/common/constants.h" ]
|
||||
traits_headers =
|
||||
[ "//services/viz/privileged/cpp/context_lost_reason_traits.h" ]
|
||||
public_deps = [
|
||||
"//gpu/command_buffer/common",
|
||||
]
|
||||
|
||||
type_mappings =
|
||||
[ "viz.mojom.ContextLostReason=::gpu::error::ContextLostReason" ]
|
@ -6,7 +6,7 @@
|
||||
#define SERVICES_VIZ_PRIVILEGED_CPP_CONTEXT_LOST_REASON_TRAITS_H_
|
||||
|
||||
#include "gpu/command_buffer/common/constants.h"
|
||||
#include "services/viz/privileged/mojom/gl/context_lost_reason.mojom.h"
|
||||
#include "services/viz/privileged/mojom/gl/context_lost_reason.mojom-shared.h"
|
||||
|
||||
namespace mojo {
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
# 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/privileged/mojom/compositing/overlay_strategy.mojom"
|
||||
public_headers = [ "//components/viz/common/display/overlay_strategy.h" ]
|
||||
traits_headers =
|
||||
[ "//services/viz/privileged/cpp/overlay_strategy_mojom_traits.h" ]
|
||||
public_deps = [
|
||||
"//components/viz/common",
|
||||
#"//services/viz/privileged/mojom/compositing"
|
||||
]
|
||||
|
||||
type_mappings = [ "viz.mojom.OverlayStrategy=::viz::OverlayStrategy" ]
|
@ -6,7 +6,7 @@
|
||||
#define SERVICES_VIZ_PRIVILEGED_CPP_OVERLAY_STRATEGY_MOJOM_TRAITS_H_
|
||||
|
||||
#include "components/viz/common/display/overlay_strategy.h"
|
||||
#include "services/viz/privileged/mojom/compositing/overlay_strategy.mojom.h"
|
||||
#include "services/viz/privileged/mojom/compositing/overlay_strategy.mojom-shared.h"
|
||||
|
||||
namespace mojo {
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
typemaps = [
|
||||
"//services/viz/privileged/cpp/context_lost_reason.typemap",
|
||||
"//services/viz/privileged/cpp/overlay_strategy.typemap",
|
||||
]
|
@ -36,4 +36,21 @@ mojom("compositing") {
|
||||
if (use_x11) {
|
||||
enabled_features += [ "use_x11" ]
|
||||
}
|
||||
|
||||
cpp_typemaps = [
|
||||
{
|
||||
types = [
|
||||
{
|
||||
mojom = "viz.mojom.RendererSettings"
|
||||
cpp = "::viz::RendererSettings"
|
||||
},
|
||||
]
|
||||
traits_headers = [ "//services/viz/privileged/mojom/compositing/renderer_settings_mojom_traits.h" ]
|
||||
traits_sources = [ "//services/viz/privileged/mojom/compositing/renderer_settings_mojom_traits.cc" ]
|
||||
traits_public_deps = [
|
||||
"//cc",
|
||||
"//ui/gfx/geometry/mojom",
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@ -2,5 +2,3 @@ per-file *.mojom=set noparent
|
||||
per-file *.mojom=file://ipc/SECURITY_OWNERS
|
||||
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
|
||||
|
@ -1,17 +0,0 @@
|
||||
# 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/privileged/mojom/compositing/renderer_settings.mojom"
|
||||
public_headers = [ "//components/viz/common/display/renderer_settings.h" ]
|
||||
traits_headers = [ "//services/viz/privileged/mojom/compositing/renderer_settings_mojom_traits.h" ]
|
||||
deps = [
|
||||
"//cc",
|
||||
]
|
||||
public_deps = [
|
||||
"//ui/gfx/geometry/mojom",
|
||||
]
|
||||
sources = [
|
||||
"renderer_settings_mojom_traits.cc",
|
||||
]
|
||||
type_mappings = [ "viz.mojom.RendererSettings=::viz::RendererSettings" ]
|
@ -9,7 +9,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "components/viz/common/display/renderer_settings.h"
|
||||
#include "services/viz/privileged/cpp/overlay_strategy_mojom_traits.h"
|
||||
#include "services/viz/privileged/mojom/compositing/renderer_settings.mojom.h"
|
||||
#include "services/viz/privileged/mojom/compositing/renderer_settings.mojom-shared.h"
|
||||
#include "ui/gfx/geometry/mojom/geometry_mojom_traits.h"
|
||||
|
||||
#if defined(USE_OZONE)
|
||||
|
@ -1,6 +0,0 @@
|
||||
# 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/privileged/mojom/compositing/renderer_settings.typemap" ]
|
@ -30,4 +30,29 @@ mojom("gl") {
|
||||
if (!is_android) {
|
||||
enabled_features += [ "is_not_android" ]
|
||||
}
|
||||
|
||||
cpp_typemaps = [
|
||||
{
|
||||
types = [
|
||||
{
|
||||
mojom = "viz.mojom.ContextLostReason"
|
||||
cpp = "::gpu::error::ContextLostReason"
|
||||
},
|
||||
]
|
||||
traits_headers =
|
||||
[ "//services/viz/privileged/cpp/context_lost_reason_traits.h" ]
|
||||
traits_public_deps = [ "//gpu/command_buffer/common" ]
|
||||
},
|
||||
{
|
||||
types = [
|
||||
{
|
||||
mojom = "viz.mojom.OverlayStrategy"
|
||||
cpp = "::viz::OverlayStrategy"
|
||||
},
|
||||
]
|
||||
traits_headers =
|
||||
[ "//services/viz/privileged/cpp/overlay_strategy_mojom_traits.h" ]
|
||||
traits_public_deps = [ "//components/viz/common" ]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "components/viz/common/display/renderer_settings.h"
|
||||
#include "services/viz/privileged/mojom/compositing/renderer_settings_mojom_traits.h"
|
||||
#include "services/viz/privileged/mojom/compositing/renderer_settings.mojom.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "ui/gfx/mojom/color_space_mojom_traits.h"
|
||||
|
||||
|
@ -1,4 +1,2 @@
|
||||
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
|
||||
|
@ -1,16 +0,0 @@
|
||||
# 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/hit_test/aggregated_hit_test_region.mojom"
|
||||
public_headers =
|
||||
[ "//components/viz/common/hit_test/aggregated_hit_test_region.h" ]
|
||||
deps = [
|
||||
"//components/viz/common",
|
||||
]
|
||||
traits_headers = [ "//services/viz/public/cpp/hit_test/aggregated_hit_test_region_mojom_traits.h" ]
|
||||
sources = [
|
||||
"//services/viz/public/cpp/hit_test/aggregated_hit_test_region_mojom_traits.cc",
|
||||
]
|
||||
type_mappings =
|
||||
[ "viz.mojom.AggregatedHitTestRegion=::viz::AggregatedHitTestRegion" ]
|
@ -1,18 +0,0 @@
|
||||
# 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/hit_test/hit_test_region_list.mojom"
|
||||
public_headers = [ "//components/viz/common/hit_test/hit_test_region_list.h" ]
|
||||
deps = [
|
||||
"//components/viz/common",
|
||||
]
|
||||
traits_headers =
|
||||
[ "//services/viz/public/cpp/hit_test/hit_test_region_list_mojom_traits.h" ]
|
||||
sources = [
|
||||
"//services/viz/public/cpp/hit_test/hit_test_region_list_mojom_traits.cc",
|
||||
]
|
||||
type_mappings = [
|
||||
"viz.mojom.HitTestRegion=::viz::HitTestRegion",
|
||||
"viz.mojom.HitTestRegionList=::viz::HitTestRegionList[move_only]",
|
||||
]
|
@ -1,8 +0,0 @@
|
||||
# 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.
|
||||
|
||||
typemaps = [
|
||||
"//services/viz/public/cpp/hit_test/aggregated_hit_test_region.typemap",
|
||||
"//services/viz/public/cpp/hit_test/hit_test_region_list.typemap",
|
||||
]
|
@ -58,4 +58,40 @@ mojom("mojom") {
|
||||
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
|
||||
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
|
||||
export_header_blink = "third_party/blink/public/platform/web_common.h"
|
||||
|
||||
cpp_typemaps = [
|
||||
{
|
||||
types = [
|
||||
{
|
||||
mojom = "viz.mojom.AggregatedHitTestRegion"
|
||||
cpp = "::viz::AggregatedHitTestRegion"
|
||||
},
|
||||
]
|
||||
traits_headers = [ "//services/viz/public/cpp/hit_test/aggregated_hit_test_region_mojom_traits.h" ]
|
||||
traits_sources = [ "//services/viz/public/cpp/hit_test/aggregated_hit_test_region_mojom_traits.cc" ]
|
||||
traits_public_deps = [
|
||||
"//components/viz/common",
|
||||
"//ui/gfx/geometry/mojom",
|
||||
]
|
||||
},
|
||||
{
|
||||
types = [
|
||||
{
|
||||
mojom = "viz.mojom.HitTestRegion"
|
||||
cpp = "::viz::HitTestRegion"
|
||||
},
|
||||
{
|
||||
mojom = "viz.mojom.HitTestRegionList"
|
||||
cpp = "::viz::HitTestRegionList"
|
||||
move_only = true
|
||||
},
|
||||
]
|
||||
traits_headers = [ "//services/viz/public/cpp/hit_test/hit_test_region_list_mojom_traits.h" ]
|
||||
traits_sources = [ "//services/viz/public/cpp/hit_test/hit_test_region_list_mojom_traits.cc" ]
|
||||
traits_public_deps = [
|
||||
"//components/viz/common",
|
||||
"//ui/gfx/geometry/mojom",
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user