Commit 6c1c86f3 authored by Ken Rockot's avatar Ken Rockot Committed by Commit Bot

Convert Skia and media/learning typemaps to GN

This is a mechnical translation of .typemap files into equivalent GN
mojom target settings.

Bug: 1059389
Change-Id: I128f2d16ad19617d4cdf7df33bc268823ad70abf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304939Reviewed-by: default avatarMike Klein <mtklein@google.com>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#790510}
parent 7ba2c623
per-file *_struct_traits*.*=set noparent
per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS
per-file *_mojom_traits*.*=set noparent
per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
typemaps = [ "//media/learning/mojo/public/mojom/learning_types.typemap" ]
......@@ -17,4 +17,42 @@ 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"
shared_learning_types_cpp_typemap = {
types = [
{
mojom = "media.learning.mojom.LabelledExample"
cpp = "::media::learning::LabelledExample"
},
{
mojom = "media.learning.mojom.FeatureValue"
cpp = "::media::learning::FeatureValue"
},
{
mojom = "media.learning.mojom.TargetValue"
cpp = "::media::learning::TargetValue"
},
{
mojom = "media.learning.mojom.ObservationCompletion"
cpp = "::media::learning::ObservationCompletion"
},
{
mojom = "media.learning.mojom.TargetHistogramPair"
cpp = "::media::learning::TargetHistogramPair"
},
{
mojom = "media.learning.mojom.TargetHistogram"
cpp = "::media::learning::TargetHistogram"
},
]
traits_headers =
[ "//media/learning/mojo/public/cpp/learning_mojom_traits.h" ]
traits_public_deps = [
"//media/learning/common",
"//media/learning/mojo/public/cpp:shared_typemap_traits",
]
}
cpp_typemaps = [ shared_learning_types_cpp_typemap ]
blink_cpp_typemaps = [ shared_learning_types_cpp_typemap ]
}
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
mojom = "//media/learning/mojo/public/mojom/learning_types.mojom"
public_headers = [
"//media/learning/common/labelled_example.h",
"//media/learning/common/learning_task_controller.h",
"//media/learning/common/value.h",
]
traits_headers = [ "//media/learning/mojo/public/cpp/learning_mojom_traits.h" ]
public_deps = [
"//media/learning/common",
"//media/learning/mojo/public/cpp:shared_typemap_traits",
]
type_mappings = [
"media.learning.mojom.LabelledExample=::media::learning::LabelledExample",
"media.learning.mojom.FeatureValue=::media::learning::FeatureValue",
"media.learning.mojom.TargetValue=::media::learning::TargetValue",
"media.learning.mojom.ObservationCompletion=::media::learning::ObservationCompletion",
"media.learning.mojom.TargetHistogramPair=::media::learning::TargetHistogramPair",
"media.learning.mojom.TargetHistogram=::media::learning::TargetHistogram",
]
......@@ -6,11 +6,8 @@ variant = "blink"
for_blink = true
_typemap_imports = [
"//media/learning/mojo/public/cpp/typemaps.gni",
"//skia/public/mojom/typemaps.gni",
"//third_party/blink/renderer/platform/mojo/blink_typemaps.gni",
]
_typemap_imports =
[ "//third_party/blink/renderer/platform/mojo/blink_typemaps.gni" ]
_typemaps = []
foreach(typemap_import, _typemap_imports) {
......
......@@ -23,7 +23,6 @@ _typemap_imports = [
"//content/public/common/typemaps.gni",
"//media/capture/mojom/typemaps.gni",
"//media/fuchsia/mojom/typemaps.gni",
"//media/learning/mojo/public/cpp/typemaps.gni",
"//media/mojo/mojom/typemaps.gni",
"//sandbox/mac/mojom/typemaps.gni",
"//services/media_session/public/cpp/typemaps.gni",
......@@ -31,7 +30,6 @@ _typemap_imports = [
"//services/resource_coordinator/public/cpp/typemaps.gni",
"//services/service_manager/public/cpp/typemaps.gni",
"//services/tracing/public/mojom/typemaps.gni",
"//skia/public/mojom/typemaps.gni",
"//third_party/blink/common/typemaps.gni",
"//third_party/blink/public/public_typemaps.gni",
]
......
......@@ -37,6 +37,64 @@ mojom("mojom") {
]
public_deps = [ "//mojo/public/mojom/base" ]
shared_skia_cpp_typemaps = [
{
types = [
{
mojom = "skia.mojom.BlurTileMode"
cpp = "::SkBlurImageFilter::TileMode"
},
]
traits_headers = [ "blur_image_filter_tile_mode_mojom_traits.h" ]
traits_public_deps = [ "//skia" ]
},
{
types = [
{
mojom = "skia.mojom.Bitmap"
cpp = "::SkBitmap"
nullable_is_same_type = true
},
{
mojom = "skia.mojom.InlineBitmap"
cpp = "::SkBitmap"
nullable_is_same_type = true
},
]
traits_headers = [ "bitmap_skbitmap_mojom_traits.h" ]
traits_public_deps = [
":shared_typemap_traits",
"//skia",
]
},
{
types = [
{
mojom = "skia.mojom.SkColor"
cpp = "::SkColor"
},
]
traits_headers = [ "skcolor_mojom_traits.h" ]
traits_public_deps = [ "//skia" ]
},
{
types = [
{
mojom = "skia.mojom.ImageInfo"
cpp = "::SkImageInfo"
},
]
traits_headers = [ "image_info_mojom_traits.h" ]
traits_public_deps = [
":shared_typemap_traits",
"//skia",
]
},
]
cpp_typemaps = shared_skia_cpp_typemaps
blink_cpp_typemaps = shared_skia_cpp_typemaps
}
mojom("test_interfaces") {
......
......@@ -3,6 +3,3 @@ per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
per-file *.typemap=set noparent
per-file *.typemap=file://ipc/SECURITY_OWNERS
# 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 = "//skia/public/mojom/blur_image_filter_tile_mode.mojom"
public_headers = [ "//third_party/skia/include/effects/SkBlurImageFilter.h" ]
traits_headers =
[ "//skia/public/mojom/blur_image_filter_tile_mode_mojom_traits.h" ]
type_mappings = [ "skia.mojom.BlurTileMode=::SkBlurImageFilter::TileMode" ]
# 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 = "//skia/public/mojom/bitmap.mojom"
public_headers = [ "//third_party/skia/include/core/SkBitmap.h" ]
traits_headers = [ "//skia/public/mojom/bitmap_skbitmap_mojom_traits.h" ]
deps = [
"//mojo/public/cpp/bindings",
]
public_deps = [
"//skia",
"//skia/public/mojom:shared_typemap_traits",
]
type_mappings = [
"skia.mojom.Bitmap=::SkBitmap[nullable_is_same_type]",
"skia.mojom.InlineBitmap=::SkBitmap[nullable_is_same_type]",
]
# 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 = "//skia/public/mojom/skcolor.mojom"
public_headers = [ "//third_party/skia/include/core/SkColor.h" ]
traits_headers = [ "//skia/public/mojom/skcolor_mojom_traits.h" ]
sources = [
"//skia/public/mojom/skcolor_mojom_traits.h",
]
type_mappings = [ "skia.mojom.SkColor=::SkColor" ]
# 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 = "//skia/public/mojom/image_info.mojom"
public_headers = [ "//third_party/skia/include/core/SkImageInfo.h" ]
traits_headers = [ "//skia/public/mojom/image_info_mojom_traits.h" ]
deps = [
"//mojo/public/cpp/bindings",
]
public_deps = [
"//skia",
"//skia/public/mojom:shared_typemap_traits",
]
type_mappings = [ "skia.mojom.ImageInfo=::SkImageInfo" ]
# 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.
typemaps = [
"//skia/public/mojom/blur_image_filter_tile_mode.typemap",
"//skia/public/mojom/skbitmap.typemap",
"//skia/public/mojom/skcolor.typemap",
"//skia/public/mojom/skimageinfo.typemap",
]
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