#include "ui/snapshot/snapshot_aura.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tracker.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
#include "ui/snapshot/snapshot_async.h"
namespace ui {
static void MakeAsyncCopyRequest(
Layer* layer,
const gfx::Rect& source_rect,
viz::CopyOutputRequest::CopyOutputRequestCallback callback) { … }
static void FinishedAsyncCopyRequest(
std::unique_ptr<aura::WindowTracker> tracker,
const gfx::Rect& source_rect,
viz::CopyOutputRequest::CopyOutputRequestCallback callback,
int retry_count,
std::unique_ptr<viz::CopyOutputResult> result) { … }
static void MakeInitialAsyncCopyRequest(
aura::Window* window,
const gfx::Rect& source_rect,
viz::CopyOutputRequest::CopyOutputRequestCallback callback) { … }
void GrabWindowSnapshotAndScaleAura(aura::Window* window,
const gfx::Rect& source_rect,
const gfx::Size& target_size,
GrabSnapshotImageCallback callback) { … }
void GrabWindowSnapshotAura(aura::Window* window,
const gfx::Rect& source_rect,
GrabSnapshotImageCallback callback) { … }
#if !BUILDFLAG(IS_WIN)
void GrabWindowSnapshotAndScale(gfx::NativeWindow window,
const gfx::Rect& source_rect,
const gfx::Size& target_size,
GrabSnapshotImageCallback callback) { … }
void GrabWindowSnapshot(gfx::NativeWindow window,
const gfx::Rect& source_rect,
GrabSnapshotImageCallback callback) { … }
void GrabViewSnapshot(gfx::NativeView view,
const gfx::Rect& source_rect,
GrabSnapshotImageCallback callback) { … }
void GrabLayerSnapshot(ui::Layer* layer,
const gfx::Rect& source_rect,
GrabSnapshotImageCallback callback) { … }
#endif
}