1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
|
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// gpu/config/gpu_info.h
module gpu.mojom;
import "mojo/public/mojom/base/time.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
import "ui/gl/mojom/gl_implementation.mojom";
import "ui/gl/mojom/gpu_preference.mojom";
[EnableIf=is_win]
import "gpu/ipc/common/luid.mojom";
[EnableIf=supports_vulkan]
import "gpu/ipc/common/vulkan_info.mojom";
// gpu::GPUInfo::GPUDevice
struct GpuDevice {
uint32 vendor_id;
uint32 device_id;
[EnableIf=is_win]
uint32 sub_sys_id;
[EnableIf=is_chromeos|is_win]
uint32 revision;
bool active;
string vendor_string;
string device_string;
string driver_vendor;
string driver_version;
[EnableIf=is_win]
Luid luid;
gl.mojom.GpuPreference gpu_preference;
};
// gpu::SkiaBackendType
enum SkiaBackendType {
kUnknown,
kNone,
kGaneshGL,
kGaneshVulkan,
kGraphiteDawnVulkan,
kGraphiteDawnMetal,
kGraphiteDawnD3D11,
kGraphiteDawnD3D12,
kGraphiteMetal,
};
// LINT.IfChange(VideoCodecProfile)
enum VideoCodecProfile {
VIDEO_CODEC_PROFILE_UNKNOWN = -1,
H264PROFILE_BASELINE = 0,
H264PROFILE_MAIN = 1,
H264PROFILE_EXTENDED = 2,
H264PROFILE_HIGH = 3,
H264PROFILE_HIGH10PROFILE = 4,
H264PROFILE_HIGH422PROFILE = 5,
H264PROFILE_HIGH444PREDICTIVEPROFILE = 6,
H264PROFILE_SCALABLEBASELINE = 7,
H264PROFILE_SCALABLEHIGH = 8,
H264PROFILE_STEREOHIGH = 9,
H264PROFILE_MULTIVIEWHIGH = 10,
VP8PROFILE_ANY = 11,
VP9PROFILE_PROFILE0 = 12,
VP9PROFILE_PROFILE1 = 13,
VP9PROFILE_PROFILE2 = 14,
VP9PROFILE_PROFILE3 = 15,
HEVCPROFILE_MAIN = 16,
HEVCPROFILE_MAIN10 = 17,
HEVCPROFILE_MAIN_STILL_PICTURE = 18,
DOLBYVISION_PROFILE0 = 19,
// Deprecated: DOLBYVISION_PROFILE4 = 20,
DOLBYVISION_PROFILE5 = 21,
DOLBYVISION_PROFILE7 = 22,
THEORAPROFILE_ANY = 23,
AV1PROFILE_PROFILE_MAIN = 24,
AV1PROFILE_PROFILE_HIGH = 25,
AV1PROFILE_PROFILE_PRO = 26,
DOLBYVISION_PROFILE8 = 27,
DOLBYVISION_PROFILE9 = 28,
HEVCPROFILE_REXT = 29,
HEVCPROFILE_HIGH_THROUGHPUT = 30,
HEVCPROFILE_MULTIVIEW_MAIN = 31,
HEVCPROFILE_SCALABLE_MAIN = 32,
HEVCPROFILE_3D_MAIN = 33,
HEVCPROFILE_SCREEN_EXTENDED = 34,
HEVCPROFILE_SCALABLE_REXT = 35,
HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED = 36,
VVCPROFILE_MAIN10 = 37,
VVCPROFILE_MAIN12 = 38,
VVCPROFILE_MAIN12_INTRA = 39,
VVCPROIFLE_MULTILAYER_MAIN10 = 40,
VVCPROFILE_MAIN10_444 = 41,
VVCPROFILE_MAIN12_444 = 42,
VVCPROFILE_MAIN16_444 = 43,
VVCPROFILE_MAIN12_444_INTRA = 44,
VVCPROFILE_MAIN16_444_INTRA = 45,
VVCPROFILE_MULTILAYER_MAIN10_444 = 46,
VVCPROFILE_MAIN10_STILL_PICTURE = 47,
VVCPROFILE_MAIN12_STILL_PICTURE = 48,
VVCPROFILE_MAIN10_444_STILL_PICTURE = 49,
VVCPROFILE_MAIN12_444_STILL_PICTURE = 50,
VVCPROFILE_MAIN16_444_STILL_PICTURE = 51
};
// LINT.ThenChange(//gpu/config/gpu_info.h:VideoCodecProfile)
// gpu::VideoDecodeAcceleratorSupportedProfile
struct VideoDecodeAcceleratorSupportedProfile {
VideoCodecProfile profile;
gfx.mojom.Size max_resolution;
gfx.mojom.Size min_resolution;
bool encrypted_only;
};
// gpu::VideoDecodeAcceleratorCapabilities
struct VideoDecodeAcceleratorCapabilities {
array<VideoDecodeAcceleratorSupportedProfile> supported_profiles;
uint32 flags;
};
// gpu::VideoEncodeAcceleratorSupportedProfile
struct VideoEncodeAcceleratorSupportedProfile {
VideoCodecProfile profile;
gfx.mojom.Size min_resolution;
gfx.mojom.Size max_resolution;
uint32 max_framerate_numerator;
uint32 max_framerate_denominator;
};
// gpu::ImageDecodeAcceleratorType
enum ImageDecodeAcceleratorType {
kJpeg,
kWebP,
kUnknown,
};
// gpu::ImageDecodeAcceleratorSubsampling
enum ImageDecodeAcceleratorSubsampling {
k420,
k422,
k444,
};
// gpu::ImageDecodeAcceleratorSupportedProfile
struct ImageDecodeAcceleratorSupportedProfile {
ImageDecodeAcceleratorType image_type;
gfx.mojom.Size min_encoded_dimensions;
gfx.mojom.Size max_encoded_dimensions;
array<ImageDecodeAcceleratorSubsampling> subsamplings;
};
// gpu::OverlaySupport
[EnableIf=is_win]
enum OverlaySupport {
NONE,
DIRECT,
SCALING,
SOFTWARE,
};
// gpu::OverlayInfo
[EnableIf=is_win]
struct OverlayInfo {
bool direct_composition;
bool supports_overlays;
OverlaySupport yuy2_overlay_support;
OverlaySupport nv12_overlay_support;
OverlaySupport bgra8_overlay_support;
OverlaySupport rgb10a2_overlay_support;
OverlaySupport p010_overlay_support;
};
// Corresponds to |gpu::GPUInfo| in gpu/config/gpu_info.h
struct GpuInfo {
mojo_base.mojom.TimeDelta initialization_time;
bool optimus;
bool amd_switchable;
GpuDevice gpu;
array<GpuDevice> secondary_gpus;
array<GpuDevice> npus;
string pixel_shader_version;
string vertex_shader_version;
string max_msaa_samples;
string machine_model_name;
string machine_model_version;
string display_type;
SkiaBackendType skia_backend_type;
string gl_version;
string gl_vendor;
string gl_renderer;
string gl_extensions;
string gl_ws_vendor;
string gl_ws_version;
string gl_ws_extensions;
uint32 gl_reset_notification_strategy;
gl.mojom.GLImplementationParts gl_implementation_parts;
string direct_rendering_version;
bool sandboxed;
bool in_process_gpu;
bool passthrough_cmd_decoder;
bool can_support_threaded_texture_mailbox;
[EnableIf=is_win]
uint32 directml_feature_level;
[EnableIf=is_win]
uint32 d3d12_feature_level;
[EnableIf=is_win]
uint32 vulkan_version;
[EnableIf=is_win]
OverlayInfo overlay_info;
[EnableIf=is_win]
bool shared_image_d3d;
array<VideoDecodeAcceleratorSupportedProfile>
video_decode_accelerator_supported_profiles;
array<VideoEncodeAcceleratorSupportedProfile>
video_encode_accelerator_supported_profiles;
bool jpeg_decode_accelerator_supported;
array<ImageDecodeAcceleratorSupportedProfile>
image_decode_accelerator_supported_profiles;
bool subpixel_font_rendering;
uint32 visibility_callback_call_count;
[EnableIf=supports_vulkan]
bool hardware_supports_vulkan;
[EnableIf=supports_vulkan]
VulkanInfo? vulkan_info;
};
|