#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/viz/public/mojom/compositing/quads.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "services/viz/public/mojom/compositing/quads.mojom-params-data.h"
#include "services/viz/public/mojom/compositing/quads.mojom-shared-message-ids.h"
#include "services/viz/public/mojom/compositing/quads.mojom-blink-import-headers.h"
#include "services/viz/public/mojom/compositing/quads.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace viz::mojom::blink {
RoundedDisplayMasksInfo::RoundedDisplayMasksInfo()
: … { … }
RoundedDisplayMasksInfo::RoundedDisplayMasksInfo(
bool is_horizontally_positioned_in,
WTF::Vector<uint8_t> radii_in)
: … { … }
RoundedDisplayMasksInfo::~RoundedDisplayMasksInfo() = default;
void RoundedDisplayMasksInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool RoundedDisplayMasksInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DebugBorderQuadState::DebugBorderQuadState()
: … { … }
DebugBorderQuadState::DebugBorderQuadState(
const ::SkColor4f& color_in,
int32_t width_in)
: … { … }
DebugBorderQuadState::~DebugBorderQuadState() = default;
void DebugBorderQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool DebugBorderQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
CompositorRenderPassQuadState::CompositorRenderPassQuadState()
: … { … }
CompositorRenderPassQuadState::CompositorRenderPassQuadState(
::viz::mojom::blink::CompositorRenderPassIdPtr render_pass_id_in,
::viz::mojom::blink::ResourceIdPtr mask_resource_id_in,
const ::gfx::RectF& mask_uv_rect_in,
const ::gfx::Size& mask_texture_size_in,
const ::gfx::Vector2dF& filters_scale_in,
const ::gfx::PointF& filters_origin_in,
const ::gfx::RectF& tex_coord_rect_in,
bool force_anti_aliasing_off_in,
float backdrop_filter_quality_in,
bool intersects_damage_under_in)
: … { … }
CompositorRenderPassQuadState::~CompositorRenderPassQuadState() = default;
void CompositorRenderPassQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool CompositorRenderPassQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SolidColorQuadState::SolidColorQuadState()
: … { … }
SolidColorQuadState::SolidColorQuadState(
const ::SkColor4f& color_in,
bool force_anti_aliasing_off_in)
: … { … }
SolidColorQuadState::~SolidColorQuadState() = default;
void SolidColorQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SolidColorQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SurfaceQuadState::SurfaceQuadState()
: … { … }
SurfaceQuadState::SurfaceQuadState(
::viz::mojom::blink::SurfaceRangePtr surface_range_in,
const ::SkColor4f& default_background_color_in,
bool stretch_content_to_fill_bounds_in,
bool is_reflection_in,
bool allow_merge_in)
: … { … }
SurfaceQuadState::~SurfaceQuadState() = default;
void SurfaceQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SurfaceQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
TextureQuadState::TextureQuadState()
: … { … }
TextureQuadState::TextureQuadState(
::viz::mojom::blink::ResourceIdPtr resource_id_in,
const ::gfx::Size& resource_size_in_pixels_in,
bool premultiplied_alpha_in,
const ::gfx::PointF& uv_top_left_in,
const ::gfx::PointF& uv_bottom_right_in,
const ::SkColor4f& background_color_in,
bool y_flipped_in,
bool nearest_neighbor_in,
bool secure_output_only_in,
bool is_stream_video_in,
bool is_video_frame_in,
bool force_rgbx_in,
ProtectedVideoState protected_video_type_in,
const std::optional<::gfx::Rect>& damage_rect_in,
OverlayPriority overlay_priority_hint_in,
RoundedDisplayMasksInfoPtr rounded_display_masks_info_in)
: … { … }
TextureQuadState::~TextureQuadState() = default;
void TextureQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool TextureQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
TileQuadState::TileQuadState()
: … { … }
TileQuadState::TileQuadState(
const ::gfx::RectF& tex_coord_rect_in,
const ::gfx::Size& texture_size_in,
bool is_premultiplied_in,
::viz::mojom::blink::ResourceIdPtr resource_id_in,
bool nearest_neighbor_in,
bool force_anti_aliasing_off_in)
: … { … }
TileQuadState::~TileQuadState() = default;
void TileQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool TileQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
YUVVideoQuadState::YUVVideoQuadState()
: … { … }
YUVVideoQuadState::YUVVideoQuadState(
const ::gfx::Size& coded_size_in,
const ::gfx::Rect& video_visible_rect_in,
uint8_t u_scale_in,
uint8_t v_scale_in,
::viz::mojom::blink::ResourceIdPtr y_plane_resource_id_in,
::viz::mojom::blink::ResourceIdPtr u_plane_resource_id_in,
::viz::mojom::blink::ResourceIdPtr v_plane_resource_id_in,
::viz::mojom::blink::ResourceIdPtr a_plane_resource_id_in,
uint32_t bits_per_channel_in,
const ::gfx::ColorSpace& video_color_space_in,
ProtectedVideoState protected_video_type_in,
::gfx::mojom::blink::HDRMetadataPtr hdr_metadata_in,
const std::optional<::gfx::Rect>& damage_rect_in)
: … { … }
YUVVideoQuadState::~YUVVideoQuadState() = default;
void YUVVideoQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool YUVVideoQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
VideoHoleQuadState::VideoHoleQuadState()
: … { … }
VideoHoleQuadState::VideoHoleQuadState(
const ::base::UnguessableToken& overlay_plane_id_in)
: … { … }
VideoHoleQuadState::~VideoHoleQuadState() = default;
void VideoHoleQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool VideoHoleQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SharedElementQuadState::SharedElementQuadState()
: … { … }
SharedElementQuadState::SharedElementQuadState(
::viz::mojom::blink::ViewTransitionElementResourceIdPtr resource_id_in)
: … { … }
SharedElementQuadState::~SharedElementQuadState() = default;
void SharedElementQuadState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SharedElementQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DrawQuad::DrawQuad()
: … { … }
DrawQuad::DrawQuad(
const ::gfx::Rect& rect_in,
const ::gfx::Rect& visible_rect_in,
bool needs_blending_in,
::viz::mojom::blink::SharedQuadStatePtr sqs_in,
DrawQuadStatePtr draw_quad_state_in)
: … { … }
DrawQuad::~DrawQuad() = default;
void DrawQuad::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool DrawQuad::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DrawQuadState::DrawQuadState() : … { … }
DrawQuadState::~DrawQuadState() { … }
void DrawQuadState::set_debug_border_quad_state(
DebugBorderQuadStatePtr debug_border_quad_state) { … }
void DrawQuadState::set_render_pass_quad_state(
CompositorRenderPassQuadStatePtr render_pass_quad_state) { … }
void DrawQuadState::set_solid_color_quad_state(
SolidColorQuadStatePtr solid_color_quad_state) { … }
void DrawQuadState::set_surface_quad_state(
SurfaceQuadStatePtr surface_quad_state) { … }
void DrawQuadState::set_texture_quad_state(
TextureQuadStatePtr texture_quad_state) { … }
void DrawQuadState::set_tile_quad_state(
TileQuadStatePtr tile_quad_state) { … }
void DrawQuadState::set_yuv_video_quad_state(
YUVVideoQuadStatePtr yuv_video_quad_state) { … }
void DrawQuadState::set_video_hole_quad_state(
VideoHoleQuadStatePtr video_hole_quad_state) { … }
void DrawQuadState::set_shared_element_quad_state(
SharedElementQuadStatePtr shared_element_quad_state) { … }
void DrawQuadState::DestroyActive() { … }
bool DrawQuadState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
}
namespace mojo {
bool StructTraits<::viz::mojom::blink::RoundedDisplayMasksInfo::DataView, ::viz::mojom::blink::RoundedDisplayMasksInfoPtr>::Read(
::viz::mojom::blink::RoundedDisplayMasksInfo::DataView input,
::viz::mojom::blink::RoundedDisplayMasksInfoPtr* output) { … }
bool StructTraits<::viz::mojom::blink::DebugBorderQuadState::DataView, ::viz::mojom::blink::DebugBorderQuadStatePtr>::Read(
::viz::mojom::blink::DebugBorderQuadState::DataView input,
::viz::mojom::blink::DebugBorderQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::CompositorRenderPassQuadState::DataView, ::viz::mojom::blink::CompositorRenderPassQuadStatePtr>::Read(
::viz::mojom::blink::CompositorRenderPassQuadState::DataView input,
::viz::mojom::blink::CompositorRenderPassQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::SolidColorQuadState::DataView, ::viz::mojom::blink::SolidColorQuadStatePtr>::Read(
::viz::mojom::blink::SolidColorQuadState::DataView input,
::viz::mojom::blink::SolidColorQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::SurfaceQuadState::DataView, ::viz::mojom::blink::SurfaceQuadStatePtr>::Read(
::viz::mojom::blink::SurfaceQuadState::DataView input,
::viz::mojom::blink::SurfaceQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::TextureQuadState::DataView, ::viz::mojom::blink::TextureQuadStatePtr>::Read(
::viz::mojom::blink::TextureQuadState::DataView input,
::viz::mojom::blink::TextureQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::TileQuadState::DataView, ::viz::mojom::blink::TileQuadStatePtr>::Read(
::viz::mojom::blink::TileQuadState::DataView input,
::viz::mojom::blink::TileQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::YUVVideoQuadState::DataView, ::viz::mojom::blink::YUVVideoQuadStatePtr>::Read(
::viz::mojom::blink::YUVVideoQuadState::DataView input,
::viz::mojom::blink::YUVVideoQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::VideoHoleQuadState::DataView, ::viz::mojom::blink::VideoHoleQuadStatePtr>::Read(
::viz::mojom::blink::VideoHoleQuadState::DataView input,
::viz::mojom::blink::VideoHoleQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::SharedElementQuadState::DataView, ::viz::mojom::blink::SharedElementQuadStatePtr>::Read(
::viz::mojom::blink::SharedElementQuadState::DataView input,
::viz::mojom::blink::SharedElementQuadStatePtr* output) { … }
bool StructTraits<::viz::mojom::blink::DrawQuad::DataView, ::viz::mojom::blink::DrawQuadPtr>::Read(
::viz::mojom::blink::DrawQuad::DataView input,
::viz::mojom::blink::DrawQuadPtr* output) { … }
bool UnionTraits<::viz::mojom::blink::DrawQuadState::DataView, ::viz::mojom::blink::DrawQuadStatePtr>::Read(
::viz::mojom::blink::DrawQuadState::DataView input,
::viz::mojom::blink::DrawQuadStatePtr* output) { … }
}
namespace viz::mojom::blink {
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif