chromium/third_party/blink/renderer/platform/graphics/image_frame_generator.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.
 */

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

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

#include <memory>
#include <utility>

#include "base/not_fatal_until.h"
#include "base/synchronization/lock.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/graphics/image_decoder_wrapper.h"
#include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
#include "third_party/blink/renderer/platform/image-decoders/image_decoder.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/skia/include/core/SkData.h"

namespace blink {

SkYUVAInfo::Subsampling SubsamplingToSkiaSubsampling(
    cc::YUVSubsampling subsampling) {}

static bool UpdateYUVAInfoSubsamplingAndWidthBytes(
    ImageDecoder* decoder,
    SkYUVAInfo::Subsampling* subsampling,
    size_t component_width_bytes[SkYUVAInfo::kMaxPlanes]) {}

ImageFrameGenerator::ImageFrameGenerator(const SkISize& full_size,
                                         bool is_multi_frame,
                                         ColorBehavior color_behavior,
                                         cc::AuxImage aux_image,
                                         Vector<SkISize> supported_sizes)
    :{}

ImageFrameGenerator::~ImageFrameGenerator() {}

bool ImageFrameGenerator::DecodeAndScale(
    SegmentReader* data,
    bool all_data_received,
    wtf_size_t index,
    const SkPixmap& pixmap,
    cc::PaintImage::GeneratorClientId client_id) {}

bool ImageFrameGenerator::DecodeToYUV(
    SegmentReader* data,
    wtf_size_t index,
    SkColorType color_type,
    const SkISize component_sizes[cc::kNumYUVPlanes],
    void* planes[cc::kNumYUVPlanes],
    const wtf_size_t row_bytes[cc::kNumYUVPlanes],
    cc::PaintImage::GeneratorClientId client_id) {}

void ImageFrameGenerator::SetHasAlpha(wtf_size_t index, bool has_alpha) {}

void ImageFrameGenerator::RecordWhetherMultiDecoded(
    cc::PaintImage::GeneratorClientId client_id) {}

bool ImageFrameGenerator::HasAlpha(wtf_size_t index) {}

bool ImageFrameGenerator::GetYUVAInfo(
    SegmentReader* data,
    const SkYUVAPixmapInfo::SupportedDataTypes& supported_data_types,
    SkYUVAPixmapInfo* info) {}

SkISize ImageFrameGenerator::GetSupportedDecodeSize(
    const SkISize& requested_size) const {}

ImageFrameGenerator::ClientAutoLock::ClientAutoLock(
    ImageFrameGenerator* generator,
    cc::PaintImage::GeneratorClientId client_id)
    :{}

ImageFrameGenerator::ClientAutoLock::~ClientAutoLock() {}

}  // namespace blink