#include "ui/snapshot/snapshot_async.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/numerics/safe_conversions.h"
#include "base/task/thread_pool.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/skbitmap_operations.h"
namespace ui {
namespace {
void OnFrameScalingFinished(GrabSnapshotImageCallback callback,
const SkBitmap& scaled_bitmap) { … }
SkBitmap ScaleBitmap(const SkBitmap& input_bitmap,
const gfx::Size& target_size) { … }
}
void SnapshotAsync::ScaleCopyOutputResult(
GrabSnapshotImageCallback callback,
const gfx::Size& target_size,
std::unique_ptr<viz::CopyOutputResult> result) { … }
void SnapshotAsync::RunCallbackWithCopyOutputResult(
GrabSnapshotImageCallback callback,
std::unique_ptr<viz::CopyOutputResult> result) { … }
}