#include "third_party/blink/renderer/platform/image-decoders/image_frame.h"
#include "third_party/blink/renderer/platform/image-decoders/image_decoder.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "ui/gfx/geometry/skia_conversions.h"
namespace blink {
ImageFrame::ImageFrame() = default;
ImageFrame::~ImageFrame() = default;
ImageFrame::ImageFrame(const ImageFrame& other) : … { … }
ImageFrame& ImageFrame::operator=(const ImageFrame& other) { … }
void ImageFrame::ClearPixelData() { … }
void ImageFrame::ZeroFillPixelData() { … }
bool ImageFrame::CopyBitmapData(const ImageFrame& other) { … }
bool ImageFrame::TakeBitmapDataIfWritable(ImageFrame* other) { … }
bool ImageFrame::AllocatePixelData(int new_width,
int new_height,
sk_sp<SkColorSpace> color_space) { … }
sk_sp<SkImage> ImageFrame::FinalizePixelsAndGetImage() { … }
void ImageFrame::SetHasAlpha(bool alpha) { … }
void ImageFrame::SetStatus(Status status) { … }
void ImageFrame::ZeroFillFrameRect(const gfx::Rect& rect) { … }
static void BlendRGBAF16Buffer(ImageFrame::PixelDataF16* dst,
ImageFrame::PixelDataF16* src,
size_t num_pixels,
SkAlphaType dst_alpha_type) { … }
void ImageFrame::BlendRGBARawF16Buffer(PixelDataF16* dst,
PixelDataF16* src,
size_t num_pixels) { … }
void ImageFrame::BlendRGBAPremultipliedF16Buffer(PixelDataF16* dst,
PixelDataF16* src,
size_t num_pixels) { … }
static uint8_t BlendChannel(uint8_t src,
uint8_t src_a,
uint8_t dst,
uint8_t dst_a,
unsigned scale) { … }
static uint32_t BlendSrcOverDstNonPremultiplied(uint32_t src, uint32_t dst) { … }
void ImageFrame::BlendRGBARaw(PixelData* dest,
unsigned r,
unsigned g,
unsigned b,
unsigned a) { … }
void ImageFrame::BlendSrcOverDstRaw(PixelData* src, PixelData dst) { … }
SkAlphaType ImageFrame::ComputeAlphaType() const { … }
}