chromium/third_party/blink/renderer/platform/graphics/deferred_image_decoder.cc

/*
 * Copyright (C) 2012 Google Inc. All rights reserved.
 *
 * 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/graphics/deferred_image_decoder.h"

#include <memory>
#include <optional>
#include <utility>

#include "base/feature_list.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/time/time.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/graphics/decoding_image_generator.h"
#include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
#include "third_party/blink/renderer/platform/graphics/image_frame_generator.h"
#include "third_party/blink/renderer/platform/graphics/parkable_image_manager.h"
#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h"
#include "third_party/blink/renderer/platform/image-decoders/segment_reader.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkImage.h"
#include "ui/gfx/geometry/skia_conversions.h"

namespace blink {

struct DeferredFrameData {};

std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::Create(
    scoped_refptr<SharedBuffer> data,
    bool data_complete,
    ImageDecoder::AlphaOption alpha_option,
    ColorBehavior color_behavior) {}

std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::CreateForTesting(
    std::unique_ptr<ImageDecoder> metadata_decoder) {}

DeferredImageDecoder::DeferredImageDecoder(
    std::unique_ptr<ImageDecoder> metadata_decoder)
    :{}

DeferredImageDecoder::~DeferredImageDecoder() {}

String DeferredImageDecoder::FilenameExtension() const {}

const AtomicString& DeferredImageDecoder::MimeType() const {}

sk_sp<PaintImageGenerator> DeferredImageDecoder::CreateGenerator() {}

bool DeferredImageDecoder::CreateGainmapGenerator(
    sk_sp<PaintImageGenerator>& gainmap_generator,
    SkGainmapInfo& gainmap_info) {}

scoped_refptr<SharedBuffer> DeferredImageDecoder::Data() {}

bool DeferredImageDecoder::HasData() const {}

size_t DeferredImageDecoder::DataSize() const {}

void DeferredImageDecoder::SetData(scoped_refptr<SharedBuffer> data,
                                   bool all_data_received) {}

void DeferredImageDecoder::SetDataInternal(scoped_refptr<SharedBuffer> data,
                                           bool all_data_received,
                                           bool push_data_to_decoder) {}

bool DeferredImageDecoder::IsSizeAvailable() {}

bool DeferredImageDecoder::HasEmbeddedColorProfile() const {}

gfx::Size DeferredImageDecoder::Size() const {}

gfx::Size DeferredImageDecoder::FrameSizeAtIndex(wtf_size_t index) const {}

wtf_size_t DeferredImageDecoder::FrameCount() {}

int DeferredImageDecoder::RepetitionCount() const {}

SkAlphaType DeferredImageDecoder::AlphaType() const {}

bool DeferredImageDecoder::FrameIsReceivedAtIndex(wtf_size_t index) const {}

base::TimeDelta DeferredImageDecoder::FrameDurationAtIndex(
    wtf_size_t index) const {}

ImageOrientation DeferredImageDecoder::OrientationAtIndex(
    wtf_size_t index) const {}

gfx::Size DeferredImageDecoder::DensityCorrectedSizeAtIndex(
    wtf_size_t index) const {}

size_t DeferredImageDecoder::ByteSize() const {}

void DeferredImageDecoder::ActivateLazyDecoding() {}

void DeferredImageDecoder::ActivateLazyGainmapDecoding() {}

void DeferredImageDecoder::PrepareLazyDecodedFrames() {}

bool DeferredImageDecoder::HotSpot(gfx::Point& hot_spot) const {}

}  // namespace blink

namespace WTF {
template <>
struct VectorTraits<blink::DeferredFrameData>
    : public SimpleClassVectorTraits<blink::DeferredFrameData> {};
}  // namespace WTF