chromium/services/image_annotation/public/cpp/image_processor.cc

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

#include "services/image_annotation/public/cpp/image_processor.h"

#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "services/image_annotation/image_annotation_metrics.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "ui/gfx/codec/jpeg_codec.h"

namespace image_annotation {

namespace {

// Returns a scaled version of the given bitmap.
SkBitmap ScaleImage(const SkBitmap& source, const float scale) {}

// Runs the given callback with the image data for a scaled and re-encoded
// version of the given bitmap.
void ScaleAndEncodeImage(scoped_refptr<base::SequencedTaskRunner> task_runner,
                         ImageProcessor::GetJpgImageDataCallback callback,
                         const SkBitmap& image,
                         const int max_pixels,
                         const int jpg_quality) {}

}  // namespace

// static
constexpr int ImageProcessor::kMaxPixels;
// static
constexpr int ImageProcessor::kJpgQuality;

ImageProcessor::ImageProcessor(base::RepeatingCallback<SkBitmap()> get_pixels)
    :{}

ImageProcessor::~ImageProcessor() = default;

mojo::PendingRemote<mojom::ImageProcessor> ImageProcessor::GetPendingRemote() {}

void ImageProcessor::GetJpgImageData(GetJpgImageDataCallback callback) {}

}  // namespace image_annotation