#include "services/data_decoder/image_decoder_impl.h"
#include <string.h>
#include <utility>
#include "base/metrics/histogram_functions.h"
#include "base/timer/elapsed_timer.h"
#include "base/trace_event/trace_event.h"
#include "skia/ext/image_operations.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/web/web_image.h"
#include "third_party/skia/include/core/SkBitmap.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "ui/gfx/codec/png_codec.h"
#endif
namespace data_decoder {
namespace {
int64_t kPadding = …;
void ResizeImage(SkBitmap* decoded_image,
bool shrink_to_fit,
int64_t max_size_in_bytes) { … }
}
ImageDecoderImpl::ImageDecoderImpl() = default;
ImageDecoderImpl::~ImageDecoderImpl() = default;
void ImageDecoderImpl::DecodeImage(mojo_base::BigBuffer encoded_data,
mojom::ImageCodec codec,
bool shrink_to_fit,
int64_t max_size_in_bytes,
const gfx::Size& desired_image_frame_size,
DecodeImageCallback callback) { … }
void ImageDecoderImpl::DecodeAnimation(mojo_base::BigBuffer encoded_data,
bool shrink_to_fit,
int64_t max_size_in_bytes,
DecodeAnimationCallback callback) { … }
}