blob: f35b4c4199ad108a0b30c2b424c9179c4c51fcb5 [file] [log] [blame]
// gpu/ipc/common/gpu_preferences.mojom-shared-internal.h is auto generated by mojom_bindings_generator.py, do not edit
// 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.
#ifndef GPU_IPC_COMMON_GPU_PREFERENCES_MOJOM_SHARED_INTERNAL_H_
#define GPU_IPC_COMMON_GPU_PREFERENCES_MOJOM_SHARED_INTERNAL_H_
#include "mojo/public/cpp/bindings/lib/array_internal.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/map_data_internal.h"
#include "mojo/public/cpp/bindings/lib/buffer.h"
#include "ui/gfx/mojom/buffer_types.mojom-shared-internal.h"
#include "mojo/public/cpp/bindings/lib/native_enum_data.h"
#include "mojo/public/interfaces/bindings/native_struct.mojom-shared-internal.h"
#ifdef KYTHE_IS_RUNNING
#pragma kythe_inline_metadata "Metadata comment"
#endif
namespace mojo {
namespace internal {
class ValidationContext;
}
}
namespace gpu::mojom {
namespace internal {
class GpuPreferences_Data;
struct VulkanImplementationName_Data {
public:
static bool constexpr kIsExtensible = false;
static bool IsKnownValue(int32_t value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
}
return false;
}
static bool Validate(int32_t value,
mojo::internal::ValidationContext* validation_context) {
if (kIsExtensible || IsKnownValue(value))
return true;
ReportValidationError(validation_context,
mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
return false;
}
};
struct WebGPUAdapterName_Data {
public:
static bool constexpr kIsExtensible = false;
static bool IsKnownValue(int32_t value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
}
return false;
}
static bool Validate(int32_t value,
mojo::internal::ValidationContext* validation_context) {
if (kIsExtensible || IsKnownValue(value))
return true;
ReportValidationError(validation_context,
mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
return false;
}
};
struct WebGPUPowerPreference_Data {
public:
static bool constexpr kIsExtensible = false;
static bool IsKnownValue(int32_t value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
}
return false;
}
static bool Validate(int32_t value,
mojo::internal::ValidationContext* validation_context) {
if (kIsExtensible || IsKnownValue(value))
return true;
ReportValidationError(validation_context,
mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
return false;
}
};
struct GrContextType_Data {
public:
static bool constexpr kIsExtensible = false;
static bool IsKnownValue(int32_t value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
}
return false;
}
static bool Validate(int32_t value,
mojo::internal::ValidationContext* validation_context) {
if (kIsExtensible || IsKnownValue(value))
return true;
ReportValidationError(validation_context,
mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
return false;
}
};
struct DawnBackendValidationLevel_Data {
public:
static bool constexpr kIsExtensible = false;
static bool IsKnownValue(int32_t value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
}
return false;
}
static bool Validate(int32_t value,
mojo::internal::ValidationContext* validation_context) {
if (kIsExtensible || IsKnownValue(value))
return true;
ReportValidationError(validation_context,
mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
return false;
}
};
#pragma pack(push, 1)
class GpuPreferences_Data {
public:
static bool Validate(const void* data,
mojo::internal::ValidationContext* validation_context);
mojo::internal::StructHeader header_;
uint8_t disable_accelerated_video_decode : 1;
uint8_t disable_accelerated_video_encode : 1;
uint8_t gpu_startup_dialog : 1;
uint8_t disable_gpu_watchdog : 1;
uint8_t gpu_sandbox_start_early : 1;
uint8_t enable_low_latency_dxva : 1;
uint8_t enable_zero_copy_dxgi_video : 1;
uint8_t enable_nv12_dxgi_video : 1;
uint8_t disable_software_rasterizer : 1;
uint8_t log_gpu_control_list_decisions : 1;
uint8_t compile_shader_always_succeeds : 1;
uint8_t disable_gl_error_limit : 1;
uint8_t disable_glsl_translator : 1;
uint8_t disable_shader_name_hashing : 1;
uint8_t enable_gpu_command_logging : 1;
uint8_t enable_gpu_debugging : 1;
uint8_t enable_gpu_service_logging_gpu : 1;
uint8_t enable_gpu_driver_debug_logging : 1;
uint8_t disable_gpu_program_cache : 1;
uint8_t enforce_gl_minimums : 1;
uint8_t disable_gpu_shader_disk_cache : 1;
uint8_t enable_threaded_texture_mailboxes : 1;
uint8_t gl_shader_interm_output : 1;
uint8_t perform_graphite_precompilation : 1;
uint8_t enable_gpu_service_logging : 1;
uint8_t enable_gpu_service_tracing : 1;
uint8_t use_passthrough_cmd_decoder : 1;
uint8_t ignore_gpu_blocklist : 1;
uint8_t watchdog_starts_backgrounded : 1;
uint8_t enable_vulkan_protected_memory : 1;
uint8_t disable_vulkan_surface : 1;
uint8_t disable_vulkan_fallback_to_gl_for_testing : 1;
uint32_t force_gpu_mem_discardable_limit_bytes;
uint32_t force_max_texture_size;
uint32_t gpu_program_cache_size;
int32_t gr_context_type;
int32_t use_vulkan;
uint32_t vulkan_heap_memory_limit;
uint32_t vulkan_sync_cpu_memory_limit;
uint8_t enable_gpu_benchmarking_extension : 1;
uint8_t enable_webgpu : 1;
uint8_t enable_unsafe_webgpu : 1;
uint8_t enable_webgpu_developer_features : 1;
uint8_t enable_webgpu_experimental_features : 1;
uint8_t force_webgpu_compat : 1;
uint8_t enable_perf_data_collection : 1;
uint8_t enable_native_gpu_memory_buffers : 1;
uint8_t force_separate_egl_display_for_webgl_testing : 1;
uint8_t pad47_[2];
int32_t use_webgpu_adapter;
int32_t use_webgpu_power_preference;
int32_t enable_dawn_backend_validation;
mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<mojo::internal::String_Data>>> enabled_dawn_features_list;
mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<mojo::internal::String_Data>>> disabled_dawn_features_list;
private:
friend class mojo::internal::MessageFragment<GpuPreferences_Data>;
GpuPreferences_Data();
~GpuPreferences_Data() = delete;
};
static_assert(sizeof(GpuPreferences_Data) == 72,
"Bad sizeof(GpuPreferences_Data)");
// Used by GpuPreferences::WrapAsMessage to lazily serialize the struct.
template <typename UserType, typename DataView>
struct GpuPreferences_UnserializedMessageContext
: public mojo::internal::UnserializedMessageContext {
public:
static const mojo::internal::UnserializedMessageContext::Tag kMessageTag;
GpuPreferences_UnserializedMessageContext(
uint32_t message_name,
uint32_t message_flags,
UserType input)
: mojo::internal::UnserializedMessageContext(&kMessageTag, message_name, message_flags)
, user_data_(std::move(input)) {}
~GpuPreferences_UnserializedMessageContext() override = default;
UserType TakeData() {
return std::move(user_data_);
}
private:
// mojo::internal::UnserializedMessageContext:
void Serialize(mojo::Message& message) override {
mojo::internal::MessageFragment<GpuPreferences_Data> fragment(message);
mojo::internal::Serialize<DataView>(user_data_, fragment);
}
UserType user_data_;
};
template <typename UserType, typename DataView>
const mojo::internal::UnserializedMessageContext::Tag
GpuPreferences_UnserializedMessageContext<UserType, DataView>::kMessageTag = {};
#pragma pack(pop)
} // namespace internal
} // gpu::mojom
#endif // GPU_IPC_COMMON_GPU_PREFERENCES_MOJOM_SHARED_INTERNAL_H_
/* Metadata comment
eyJ0eXBlIjogImt5dGhlMCIsICJtZXRhIjogW119
*/