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

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

#include "third_party/blink/renderer/platform/graphics/image_decoder_wrapper.h"

#include "base/system/sys_info.h"
#include "base/trace_event/trace_event.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
#include "third_party/blink/renderer/platform/graphics/image_frame_generator.h"

namespace blink {
namespace {

ImageDecoder::AlphaOption PixmapAlphaOption(const SkPixmap& pixmap) {}

bool CompatibleInfo(const SkImageInfo& src, const SkImageInfo& dst) {}

// Creates a SkPixelRef such that the memory for pixels is given by an external
// body. This is used to write directly to the memory given by Skia during
// decoding.
class ExternalMemoryAllocator final : public SkBitmap::Allocator {};

}  // namespace

ImageDecoderWrapper::ImageDecoderWrapper(
    ImageFrameGenerator* generator,
    SegmentReader* data,
    const SkPixmap& pixmap,
    ColorBehavior decoder_color_behavior,
    cc::AuxImage aux_image,
    wtf_size_t index,
    bool all_data_received,
    cc::PaintImage::GeneratorClientId client_id)
    :{}

ImageDecoderWrapper::~ImageDecoderWrapper() = default;

namespace {

bool IsLowEndDeviceOrPartialLowEndModeEnabled() {}

}  // namespace

bool ImageDecoderWrapper::Decode(ImageDecoderFactory* factory,
                                 wtf_size_t* frame_count,
                                 bool* has_alpha) {}

bool ImageDecoderWrapper::ShouldDecodeToExternalMemory(
    wtf_size_t frame_count,
    bool resume_decoding) const {}

bool ImageDecoderWrapper::ShouldRemoveDecoder(
    bool frame_was_completely_decoded,
    bool decoded_to_external_memory) const {}

void ImageDecoderWrapper::PurgeAllFramesIfNecessary(
    ImageDecoder* decoder,
    bool frame_was_completely_decoded,
    wtf_size_t frame_count) const {}

std::unique_ptr<ImageDecoder> ImageDecoderWrapper::CreateDecoderWithData(
    ImageDecoderFactory* factory) const {}

}  // namespace blink