#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/data_decoder/public/mojom/image_decoder.mojom.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/data_decoder/public/mojom/image_decoder.mojom-params-data.h"
#include "services/data_decoder/public/mojom/image_decoder.mojom-shared-message-ids.h"
#include "services/data_decoder/public/mojom/image_decoder.mojom-import-headers.h"
#include "services/data_decoder/public/mojom/image_decoder.mojom-test-utils.h"
namespace data_decoder::mojom {
AnimationFrame::AnimationFrame()
: … { … }
AnimationFrame::AnimationFrame(
const ::SkBitmap& bitmap_in,
::base::TimeDelta duration_in)
: … { … }
AnimationFrame::~AnimationFrame() = default;
void AnimationFrame::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool AnimationFrame::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char ImageDecoder::Name_[] = …;
ImageDecoder::IPCStableHashFunction ImageDecoder::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ImageDecoder::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ImageDecoder::DecodeImage_Sym::IPCStableHash() { … }
uint32_t ImageDecoder::DecodeAnimation_Sym::IPCStableHash() { … }
# endif
class ImageDecoder_DecodeImage_ForwardToCallback
: public mojo::MessageReceiver { … };
class ImageDecoder_DecodeAnimation_ForwardToCallback
: public mojo::MessageReceiver { … };
ImageDecoderProxy::ImageDecoderProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ImageDecoderProxy::DecodeImage(
::mojo_base::BigBuffer in_encoded_data, ImageCodec in_codec, bool in_shrink_to_fit, int64_t in_max_size_in_bytes, const ::gfx::Size& in_desired_image_frame_size, DecodeImageCallback callback) { … }
void ImageDecoderProxy::DecodeAnimation(
::mojo_base::BigBuffer in_encoded_data, bool in_shrink_to_fit, int64_t in_max_size_in_bytes, DecodeAnimationCallback callback) { … }
class ImageDecoder_DecodeImage_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ImageDecoder_DecodeImage_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ImageDecoder_DecodeImage_ProxyToResponder::Run(
::base::TimeDelta in_decoding_duration, const ::SkBitmap& in_decoded_image) { … }
class ImageDecoder_DecodeAnimation_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ImageDecoder_DecodeAnimation_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ImageDecoder_DecodeAnimation_ProxyToResponder::Run(
std::vector<AnimationFramePtr> in_decoded_image) { … }
bool ImageDecoderStubDispatch::Accept(
ImageDecoder* impl,
mojo::Message* message) { … }
bool ImageDecoderStubDispatch::AcceptWithResponder(
ImageDecoder* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kImageDecoderValidationInfo[] = …;
bool ImageDecoderRequestValidator::Accept(mojo::Message* message) { … }
bool ImageDecoderResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::data_decoder::mojom::AnimationFrame::DataView, ::data_decoder::mojom::AnimationFramePtr>::Read(
::data_decoder::mojom::AnimationFrame::DataView input,
::data_decoder::mojom::AnimationFramePtr* output) { … }
}
namespace data_decoder::mojom {
void ImageDecoderInterceptorForTesting::DecodeImage(::mojo_base::BigBuffer encoded_data, ImageCodec codec, bool shrink_to_fit, int64_t max_size_in_bytes, const ::gfx::Size& desired_image_frame_size, DecodeImageCallback callback) { … }
void ImageDecoderInterceptorForTesting::DecodeAnimation(::mojo_base::BigBuffer encoded_data, bool shrink_to_fit, int64_t max_size_in_bytes, DecodeAnimationCallback callback) { … }
ImageDecoderAsyncWaiter::ImageDecoderAsyncWaiter(
ImageDecoder* proxy) : … { … }
ImageDecoderAsyncWaiter::~ImageDecoderAsyncWaiter() = default;
void ImageDecoderAsyncWaiter::DecodeImage(
::mojo_base::BigBuffer encoded_data, ImageCodec codec, bool shrink_to_fit, int64_t max_size_in_bytes, const ::gfx::Size& desired_image_frame_size, ::base::TimeDelta* out_decoding_duration, ::SkBitmap* out_decoded_image) { … }
void ImageDecoderAsyncWaiter::DecodeAnimation(
::mojo_base::BigBuffer encoded_data, bool shrink_to_fit, int64_t max_size_in_bytes, std::vector<AnimationFramePtr>* out_decoded_image) { … }
std::vector<AnimationFramePtr> ImageDecoderAsyncWaiter::DecodeAnimation(
::mojo_base::BigBuffer encoded_data, bool shrink_to_fit, int64_t max_size_in_bytes) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif