chromium/third_party/blink/renderer/platform/image-decoders/image_frame.cc

/*
 * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
 * Copyright (C) 2008, 2009 Google, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#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 {}

}  // namespace blink