| // gpu/ipc/common/shared_image_capabilities.mojom-data-view.h is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2025 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_SHARED_IMAGE_CAPABILITIES_MOJOM_DATA_VIEW_H_ |
| #define GPU_IPC_COMMON_SHARED_IMAGE_CAPABILITIES_MOJOM_DATA_VIEW_H_ |
| |
| #include <stdint.h> |
| |
| #include <functional> |
| #include <iosfwd> |
| #include <type_traits> |
| #include <utility> |
| #include "mojo/public/cpp/bindings/array_data_view.h" |
| #include "mojo/public/cpp/bindings/enum_traits.h" |
| #include "mojo/public/cpp/bindings/interface_data_view.h" |
| #include "mojo/public/cpp/bindings/map_data_view.h" |
| #include "mojo/public/cpp/bindings/string_data_view.h" |
| |
| #include "gpu/ipc/common/shared_image_capabilities.mojom-shared-internal.h" |
| |
| |
| namespace gpu::mojom { |
| class SharedImageCapabilitiesDataView; |
| |
| |
| |
| } // gpu::mojom |
| |
| |
| namespace mojo { |
| namespace internal { |
| |
| template <> |
| struct MojomTypeTraits<::gpu::mojom::SharedImageCapabilitiesDataView> { |
| using Data = ::gpu::mojom::internal::SharedImageCapabilities_Data; |
| using DataAsArrayElement = Pointer<Data>; |
| static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct; |
| }; |
| |
| } // namespace internal |
| } // namespace mojo |
| |
| |
| namespace gpu::mojom { |
| |
| |
| class SharedImageCapabilitiesDataView { |
| public: |
| SharedImageCapabilitiesDataView() = default; |
| |
| SharedImageCapabilitiesDataView( |
| internal::SharedImageCapabilities_Data* data, |
| mojo::Message* message) |
| : data_(data) {} |
| |
| bool is_null() const { return !data_; } |
| bool supports_scanout_shared_images() const { |
| return data_->supports_scanout_shared_images; |
| } |
| bool supports_luminance_shared_images() const { |
| return data_->supports_luminance_shared_images; |
| } |
| bool supports_r16_shared_images() const { |
| return data_->supports_r16_shared_images; |
| } |
| bool supports_native_nv12_mappable_shared_images() const { |
| return data_->supports_native_nv12_mappable_shared_images; |
| } |
| bool is_r16f_supported() const { |
| return data_->is_r16f_supported; |
| } |
| bool disable_r8_shared_images() const { |
| return data_->disable_r8_shared_images; |
| } |
| bool disable_webgpu_shared_images() const { |
| return data_->disable_webgpu_shared_images; |
| } |
| bool disable_one_component_textures() const { |
| return data_->disable_one_component_textures; |
| } |
| bool shared_image_d3d() const { |
| return data_->shared_image_d3d; |
| } |
| bool shared_image_swap_chain() const { |
| return data_->shared_image_swap_chain; |
| } |
| private: |
| internal::SharedImageCapabilities_Data* data_ = nullptr; |
| }; |
| |
| |
| } // gpu::mojom |
| |
| #endif // GPU_IPC_COMMON_SHARED_IMAGE_CAPABILITIES_MOJOM_DATA_VIEW_H_ |