#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/viz/public/mojom/compositing/frame_sink_bundle.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/frame_sink_bundle.mojom-params-data.h"
#include "services/viz/public/mojom/compositing/frame_sink_bundle.mojom-shared-message-ids.h"
#include "services/viz/public/mojom/compositing/frame_sink_bundle.mojom-blink-import-headers.h"
#include "services/viz/public/mojom/compositing/frame_sink_bundle.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
#include "gpu/ipc/common/mailbox_holder_mojom_traits.h"
#include "gpu/ipc/common/mailbox_mojom_traits.h"
#include "gpu/ipc/common/sync_token_mojom_traits.h"
#include "ipc/ipc_message_utils.h"
#include "services/viz/public/cpp/compositing/begin_frame_args_mojom_traits.h"
#include "services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h"
#include "services/viz/public/cpp/compositing/compositor_frame_mojom_traits.h"
#include "services/viz/public/cpp/compositing/compositor_render_pass_id_mojom_traits.h"
#include "services/viz/public/cpp/compositing/compositor_render_pass_mojom_traits.h"
#include "services/viz/public/cpp/compositing/filter_operation_mojom_traits.h"
#include "services/viz/public/cpp/compositing/filter_operations_mojom_traits.h"
#include "services/viz/public/cpp/compositing/quads_mojom_traits.h"
#include "services/viz/public/cpp/compositing/selection_mojom_traits.h"
#include "services/viz/public/cpp/compositing/shared_quad_state_mojom_traits.h"
#include "services/viz/public/cpp/compositing/transferable_resource_mojom_traits.h"
#include "ui/gfx/mojom/selection_bound_mojom_traits.h"
#include "ui/gfx/mojom/transform_mojom_traits.h"
#include "ui/latency/mojom/latency_info_mojom_traits.h"
namespace viz::mojom::blink {
BundledFrameSubmission::BundledFrameSubmission()
: … { … }
BundledFrameSubmission::BundledFrameSubmission(
uint32_t sink_id_in,
BundledFrameSubmissionDataPtr data_in)
: … { … }
BundledFrameSubmission::~BundledFrameSubmission() = default;
void BundledFrameSubmission::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool BundledFrameSubmission::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
BundledCompositorFrame::BundledCompositorFrame()
: … { … }
BundledCompositorFrame::BundledCompositorFrame(
const ::viz::LocalSurfaceId& local_surface_id_in,
::viz::CompositorFrame frame_in,
std::optional<::viz::HitTestRegionList> hit_test_region_list_in,
uint64_t submit_time_in)
: … { … }
BundledCompositorFrame::~BundledCompositorFrame() = default;
void BundledCompositorFrame::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool BundledCompositorFrame::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
BundledReturnedResources::BundledReturnedResources()
: … { … }
BundledReturnedResources::BundledReturnedResources(
uint32_t sink_id_in,
WTF::Vector<::viz::ReturnedResource> resources_in)
: … { … }
BundledReturnedResources::~BundledReturnedResources() = default;
void BundledReturnedResources::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool BundledReturnedResources::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
BeginFrameInfo::BeginFrameInfo()
: … { … }
BeginFrameInfo::BeginFrameInfo(
uint32_t sink_id_in,
const ::viz::BeginFrameArgs& args_in,
const WTF::HashMap<uint32_t, ::viz::FrameTimingDetails>& details_in,
bool frame_ack_in,
WTF::Vector<::viz::ReturnedResource> resources_in)
: … { … }
BeginFrameInfo::~BeginFrameInfo() = default;
void BeginFrameInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool BeginFrameInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
BundledFrameSubmissionData::BundledFrameSubmissionData() : … { … }
BundledFrameSubmissionData::~BundledFrameSubmissionData() { … }
void BundledFrameSubmissionData::set_frame(
BundledCompositorFramePtr frame) { … }
void BundledFrameSubmissionData::set_did_not_produce_frame(
const ::viz::BeginFrameAck& did_not_produce_frame) { … }
void BundledFrameSubmissionData::set_did_delete_shared_bitmap(
const ::viz::SharedBitmapId& did_delete_shared_bitmap) { … }
void BundledFrameSubmissionData::DestroyActive() { … }
bool BundledFrameSubmissionData::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char FrameSinkBundle::Name_[] = …;
FrameSinkBundle::IPCStableHashFunction FrameSinkBundle::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FrameSinkBundle::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FrameSinkBundle::InitializeCompositorFrameSinkType_Sym::IPCStableHash() { … }
uint32_t FrameSinkBundle::SetNeedsBeginFrame_Sym::IPCStableHash() { … }
uint32_t FrameSinkBundle::SetWantsBeginFrameAcks_Sym::IPCStableHash() { … }
uint32_t FrameSinkBundle::Submit_Sym::IPCStableHash() { … }
uint32_t FrameSinkBundle::DidAllocateSharedBitmap_Sym::IPCStableHash() { … }
# endif
FrameSinkBundleProxy::FrameSinkBundleProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FrameSinkBundleProxy::InitializeCompositorFrameSinkType(
uint32_t in_sink_id, ::viz::mojom::blink::CompositorFrameSinkType in_type) { … }
void FrameSinkBundleProxy::SetNeedsBeginFrame(
uint32_t in_sink_id, bool in_needs_begin_frame) { … }
void FrameSinkBundleProxy::SetWantsBeginFrameAcks(
uint32_t in_sink_id) { … }
void FrameSinkBundleProxy::Submit(
WTF::Vector<BundledFrameSubmissionPtr> in_submissions) { … }
void FrameSinkBundleProxy::DidAllocateSharedBitmap(
uint32_t in_sink_id, ::base::ReadOnlySharedMemoryRegion in_region, const ::viz::SharedBitmapId& in_id) { … }
bool FrameSinkBundleStubDispatch::Accept(
FrameSinkBundle* impl,
mojo::Message* message) { … }
bool FrameSinkBundleStubDispatch::AcceptWithResponder(
FrameSinkBundle* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFrameSinkBundleValidationInfo[] = …;
bool FrameSinkBundleRequestValidator::Accept(mojo::Message* message) { … }
const char FrameSinkBundleClient::Name_[] = …;
FrameSinkBundleClient::IPCStableHashFunction FrameSinkBundleClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FrameSinkBundleClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FrameSinkBundleClient::FlushNotifications_Sym::IPCStableHash() { … }
uint32_t FrameSinkBundleClient::OnBeginFramePausedChanged_Sym::IPCStableHash() { … }
uint32_t FrameSinkBundleClient::OnCompositorFrameTransitionDirectiveProcessed_Sym::IPCStableHash() { … }
# endif
FrameSinkBundleClientProxy::FrameSinkBundleClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FrameSinkBundleClientProxy::FlushNotifications(
WTF::Vector<BundledReturnedResourcesPtr> in_acks, WTF::Vector<BeginFrameInfoPtr> in_begin_frames, WTF::Vector<BundledReturnedResourcesPtr> in_reclaimed_resources) { … }
void FrameSinkBundleClientProxy::OnBeginFramePausedChanged(
uint32_t in_sink_id, bool in_paused) { … }
void FrameSinkBundleClientProxy::OnCompositorFrameTransitionDirectiveProcessed(
uint32_t in_sink_id, uint32_t in_sequence_id) { … }
bool FrameSinkBundleClientStubDispatch::Accept(
FrameSinkBundleClient* impl,
mojo::Message* message) { … }
bool FrameSinkBundleClientStubDispatch::AcceptWithResponder(
FrameSinkBundleClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFrameSinkBundleClientValidationInfo[] = …;
bool FrameSinkBundleClientRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::viz::mojom::blink::BundledFrameSubmission::DataView, ::viz::mojom::blink::BundledFrameSubmissionPtr>::Read(
::viz::mojom::blink::BundledFrameSubmission::DataView input,
::viz::mojom::blink::BundledFrameSubmissionPtr* output) { … }
bool StructTraits<::viz::mojom::blink::BundledCompositorFrame::DataView, ::viz::mojom::blink::BundledCompositorFramePtr>::Read(
::viz::mojom::blink::BundledCompositorFrame::DataView input,
::viz::mojom::blink::BundledCompositorFramePtr* output) { … }
bool StructTraits<::viz::mojom::blink::BundledReturnedResources::DataView, ::viz::mojom::blink::BundledReturnedResourcesPtr>::Read(
::viz::mojom::blink::BundledReturnedResources::DataView input,
::viz::mojom::blink::BundledReturnedResourcesPtr* output) { … }
bool StructTraits<::viz::mojom::blink::BeginFrameInfo::DataView, ::viz::mojom::blink::BeginFrameInfoPtr>::Read(
::viz::mojom::blink::BeginFrameInfo::DataView input,
::viz::mojom::blink::BeginFrameInfoPtr* output) { … }
bool UnionTraits<::viz::mojom::blink::BundledFrameSubmissionData::DataView, ::viz::mojom::blink::BundledFrameSubmissionDataPtr>::Read(
::viz::mojom::blink::BundledFrameSubmissionData::DataView input,
::viz::mojom::blink::BundledFrameSubmissionDataPtr* output) { … }
}
namespace viz::mojom::blink {
void FrameSinkBundleInterceptorForTesting::InitializeCompositorFrameSinkType(uint32_t sink_id, ::viz::mojom::blink::CompositorFrameSinkType type) { … }
void FrameSinkBundleInterceptorForTesting::SetNeedsBeginFrame(uint32_t sink_id, bool needs_begin_frame) { … }
void FrameSinkBundleInterceptorForTesting::SetWantsBeginFrameAcks(uint32_t sink_id) { … }
void FrameSinkBundleInterceptorForTesting::Submit(WTF::Vector<BundledFrameSubmissionPtr> submissions) { … }
void FrameSinkBundleInterceptorForTesting::DidAllocateSharedBitmap(uint32_t sink_id, ::base::ReadOnlySharedMemoryRegion region, const ::viz::SharedBitmapId& id) { … }
FrameSinkBundleAsyncWaiter::FrameSinkBundleAsyncWaiter(
FrameSinkBundle* proxy) : … { … }
FrameSinkBundleAsyncWaiter::~FrameSinkBundleAsyncWaiter() = default;
void FrameSinkBundleClientInterceptorForTesting::FlushNotifications(WTF::Vector<BundledReturnedResourcesPtr> acks, WTF::Vector<BeginFrameInfoPtr> begin_frames, WTF::Vector<BundledReturnedResourcesPtr> reclaimed_resources) { … }
void FrameSinkBundleClientInterceptorForTesting::OnBeginFramePausedChanged(uint32_t sink_id, bool paused) { … }
void FrameSinkBundleClientInterceptorForTesting::OnCompositorFrameTransitionDirectiveProcessed(uint32_t sink_id, uint32_t sequence_id) { … }
FrameSinkBundleClientAsyncWaiter::FrameSinkBundleClientAsyncWaiter(
FrameSinkBundleClient* proxy) : … { … }
FrameSinkBundleClientAsyncWaiter::~FrameSinkBundleClientAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif