blob: 6c8a184b080d40c180079b42c7fd12f2db1961bc [file] [log] [blame]
// gpu/ipc/common/shared_image_metadata.mojom.m.js is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {mojo} from '../../../mojo/public/js/bindings.js';
import {
SharedImageFormat as viz_mojom_SharedImageFormat,
SharedImageFormatSpec as viz_mojom_SharedImageFormatSpec
} from '../../../services/viz/public/mojom/compositing/shared_image_format.mojom.m.js';
import {
AlphaType as skia_mojom_AlphaType,
AlphaTypeSpec as skia_mojom_AlphaTypeSpec
} from '../../../skia/public/mojom/image_info.mojom.m.js';
import {
SurfaceOrigin as skia_mojom_SurfaceOrigin,
SurfaceOriginSpec as skia_mojom_SurfaceOriginSpec
} from '../../../skia/public/mojom/surface_origin.mojom.m.js';
import {
Size as gfx_mojom_Size,
SizeSpec as gfx_mojom_SizeSpec
} from '../../../ui/gfx/geometry/mojom/geometry.mojom.m.js';
import {
ColorSpace as gfx_mojom_ColorSpace,
ColorSpaceSpec as gfx_mojom_ColorSpaceSpec
} from '../../../ui/gfx/mojom/color_space.mojom.m.js';
/**
* @const { {$:!mojo.internal.MojomType}}
*/
export const SharedImageMetadataSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
mojo.internal.Struct(
SharedImageMetadataSpec.$,
'SharedImageMetadata',
[
mojo.internal.StructField(
'format', 0,
0,
viz_mojom_SharedImageFormatSpec.$,
null,
false /* nullable */,
0,
),
mojo.internal.StructField(
'size', 16,
0,
gfx_mojom_SizeSpec.$,
null,
false /* nullable */,
0,
),
mojo.internal.StructField(
'colorSpace', 24,
0,
gfx_mojom_ColorSpaceSpec.$,
null,
false /* nullable */,
0,
),
mojo.internal.StructField(
'surfaceOrigin', 32,
0,
skia_mojom_SurfaceOriginSpec.$,
0,
false /* nullable */,
0,
),
mojo.internal.StructField(
'alphaType', 36,
0,
skia_mojom_AlphaTypeSpec.$,
0,
false /* nullable */,
0,
),
mojo.internal.StructField(
'usage', 40,
0,
mojo.internal.Uint32,
0,
false /* nullable */,
0,
),
],
[[0, 56],]);
/**
* @record
*/
export class SharedImageMetadata {
constructor() {
/** @type { !viz_mojom_SharedImageFormat } */
this.format;
/** @type { !gfx_mojom_Size } */
this.size;
/** @type { !gfx_mojom_ColorSpace } */
this.colorSpace;
/** @type { !skia_mojom_SurfaceOrigin } */
this.surfaceOrigin;
/** @type { !skia_mojom_AlphaType } */
this.alphaType;
/** @type { !number } */
this.usage;
}
}