chromium/cc/paint/paint_image.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/paint/paint_image.h"

#include <memory>
#include <sstream>
#include <utility>

#include "base/atomic_sequence_num.h"
#include "base/hash/hash.h"
#include "base/logging.h"
#include "base/types/optional_util.h"
#include "cc/paint/paint_image_builder.h"
#include "cc/paint/paint_image_generator.h"
#include "cc/paint/paint_record.h"
#include "cc/paint/paint_worklet_input.h"
#include "cc/paint/skia_paint_image_generator.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkPixmap.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkSize.h"
#include "third_party/skia/include/core/SkYUVAPixmaps.h"
#include "third_party/skia/include/gpu/GrBackendSurface.h"
#include "ui/gfx/geometry/skia_conversions.h"

namespace cc {
namespace {
base::AtomicSequenceNumber g_next_image_id;
base::AtomicSequenceNumber g_next_image_content_id;
base::AtomicSequenceNumber g_next_generator_client_id;
}  // namespace

const PaintImage::Id PaintImage::kNonLazyStableId =;
const size_t PaintImage::kDefaultFrameIndex =;
const PaintImage::Id PaintImage::kInvalidId =;
const PaintImage::ContentId PaintImage::kInvalidContentId =;
const PaintImage::GeneratorClientId PaintImage::kDefaultGeneratorClientId =;

ImageHeaderMetadata::ImageHeaderMetadata() = default;
ImageHeaderMetadata::ImageHeaderMetadata(const ImageHeaderMetadata& other) =
    default;
ImageHeaderMetadata& ImageHeaderMetadata::operator=(
    const ImageHeaderMetadata& other) = default;
ImageHeaderMetadata::ImageHeaderMetadata::~ImageHeaderMetadata() = default;

PaintImage::PaintImage() = default;
PaintImage::PaintImage(const PaintImage& other) = default;
PaintImage::PaintImage(PaintImage&& other) = default;
PaintImage::~PaintImage() = default;

PaintImage& PaintImage::operator=(const PaintImage& other) = default;
PaintImage& PaintImage::operator=(PaintImage&& other) = default;

bool PaintImage::IsSameForTesting(const PaintImage& other) const {}

// static
PaintImage::DecodingMode PaintImage::GetConservative(DecodingMode one,
                                                     DecodingMode two) {}

// static
PaintImage::Id PaintImage::GetNextId() {}

// static
PaintImage::ContentId PaintImage::GetNextContentId() {}

// static
PaintImage::GeneratorClientId PaintImage::GetNextGeneratorClientId() {}

// static
PaintImage PaintImage::CreateFromBitmap(SkBitmap bitmap) {}

const sk_sp<SkImage>& PaintImage::GetSkImage() const {}

sk_sp<SkImage> PaintImage::GetSwSkImage() const {}

sk_sp<SkImage> PaintImage::GetAcceleratedSkImage() const {}

bool PaintImage::readPixels(const SkImageInfo& dst_info,
                            void* dst_pixels,
                            size_t dst_row_bytes,
                            int src_x,
                            int src_y) const {}

SkImageInfo PaintImage::GetSkImageInfo(AuxImage aux_image) const {}

gpu::Mailbox PaintImage::GetMailbox() const {}

bool PaintImage::IsOpaque() const {}

void PaintImage::CreateSkImage() {}

SkISize PaintImage::GetSupportedDecodeSize(const SkISize& requested_size,
                                           AuxImage aux_image) const {}

bool PaintImage::Decode(SkPixmap pixmap,
                        size_t frame_index,
                        AuxImage aux_image,
                        GeneratorClientId client_id) const {}

bool PaintImage::DecodeYuv(const SkYUVAPixmaps& pixmaps,
                           size_t frame_index,
                           AuxImage aux_image,
                           GeneratorClientId client_id) const {}

bool PaintImage::DecodeFromSkImage(SkPixmap pixmap,
                                   size_t frame_index,
                                   GeneratorClientId client_id) const {}

bool PaintImage::ShouldAnimate() const {}

PaintImage::FrameKey PaintImage::GetKeyForFrame(size_t frame_index) const {}

PaintImage::ContentId PaintImage::GetContentIdForFrame(
    size_t frame_index) const {}

bool PaintImage::IsTextureBacked() const {}

void PaintImage::FlushPendingSkiaOps() {}

gfx::Size PaintImage::GetSize(AuxImage aux_image) const {}

gfx::ContentColorUsage PaintImage::GetContentColorUsage(bool* is_hlg) const {}

const ImageHeaderMetadata* PaintImage::GetImageHeaderMetadata() const {}

bool PaintImage::IsYuv(
    const SkYUVAPixmapInfo::SupportedDataTypes& supported_data_types,
    AuxImage aux_image,
    SkYUVAPixmapInfo* info) const {}

bool PaintImage::NeedsLayer() const {}

const std::vector<FrameMetadata>& PaintImage::GetFrameMetadata() const {}

size_t PaintImage::FrameCount() const {}

sk_sp<SkImage> PaintImage::GetSkImageForFrame(
    size_t index,
    GeneratorClientId client_id) const {}

std::string PaintImage::ToString() const {}

PaintImage::FrameKey::FrameKey(ContentId content_id, size_t frame_index)
    :{}

bool PaintImage::FrameKey::operator==(const FrameKey& other) const {}

bool PaintImage::FrameKey::operator!=(const FrameKey& other) const {}

std::string PaintImage::FrameKey::ToString() const {}

}  // namespace cc