chromium/ui/gfx/codec/jpeg_codec.cc

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

#include "ui/gfx/codec/jpeg_codec.h"

#include <climits>
#include <memory>

#include "base/notreached.h"
#include "third_party/skia/include/codec/SkJpegDecoder.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColorPriv.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/encode/SkJpegEncoder.h"
#include "ui/gfx/codec/vector_wstream.h"

namespace gfx {

// Encoder ---------------------------------------------------------------------

bool JPEGCodec::Encode(const SkPixmap& input,
                       int quality,
                       SkJpegEncoder::Downsample downsample,
                       std::vector<unsigned char>* output,
                       const SkData* xmp_metadata) {}

bool JPEGCodec::Encode(const SkPixmap& input,
                       int quality,
                       std::vector<unsigned char>* output) {}

bool JPEGCodec::Encode(const SkBitmap& src,
                       int quality,
                       std::vector<unsigned char>* output) {}

// Decoder --------------------------------------------------------------------

static bool PrepareForJPEGDecode(const unsigned char* input,
                                 size_t input_size,
                                 SkColorType color_type,
                                 std::unique_ptr<SkCodec>* codec,
                                 SkImageInfo* image_info) {}

bool JPEGCodec::Decode(const unsigned char* input,
                       size_t input_size,
                       SkColorType color_type,
                       std::vector<unsigned char>* output,
                       int* w,
                       int* h) {}

// static
std::unique_ptr<SkBitmap> JPEGCodec::Decode(const unsigned char* input,
                                            size_t input_size) {}

}  // namespace gfx