// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module display.mojom;
import "mojo/public/mojom/base/file_path.mojom";
import "skia/public/mojom/skcolorspace_primaries.mojom";
import "ui/display/mojom/display_constants.mojom";
import "ui/display/mojom/display_mode.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
import "ui/gfx/mojom/color_space.mojom";
import "ui/gfx/mojom/hdr_static_metadata.mojom";
// Corresponds to display::DisplaySnapshot::ColorInfo.
struct DisplaySnapshotColorInfo {
gfx.mojom.ColorSpace color_space;
skia.mojom.SkColorSpacePrimaries edid_primaries;
float edid_gamma;
gfx.mojom.HDRStaticMetadata? hdr_static_metadata;
bool supports_color_temperature_adjustment;
uint32 bits_per_channel;
};
// Corresponds to display::DisplaySnapshot.
struct DisplaySnapshot {
int64 display_id;
int64 port_display_id;
int64 edid_display_id;
uint16 connector_index;
gfx.mojom.Point origin;
gfx.mojom.Size physical_size;
display.mojom.DisplayConnectionType type;
uint64 base_connector_id;
array<uint64> path_topology;
bool is_aspect_preserving_scaling;
bool has_overscan;
display.mojom.PrivacyScreenState privacy_screen_state;
bool has_content_protection_key;
display.mojom.DisplaySnapshotColorInfo color_info;
string display_name;
mojo_base.mojom.FilePath sys_path;
array<display.mojom.DisplayMode> modes;
display.mojom.PanelOrientation panel_orientation;
array<uint8> edid;
uint64 current_mode_index;
bool has_current_mode;
uint64 native_mode_index;
bool has_native_mode;
// |product_code| is a combination of the manufacturer id and the product id.
int64 product_code;
int32 year_of_manufacture;
gfx.mojom.Size maximum_cursor_size;
VariableRefreshRateState variable_refresh_rate_state;
// |drm_formats_and_modifiers| contains a list of supported Linux DRM formats
// and corresponding lists of modifiers for each one.
[EnableIf=is_chromeos]
map<uint32, array<uint64>> drm_formats_and_modifiers;
};