blob: a1f7c618b0653cd7ef216306b3d86841022e6c1e [file] [log] [blame] [edit]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_LIB_UI_SNAPSHOT_DELEGATE_H_
#define FLUTTER_LIB_UI_SNAPSHOT_DELEGATE_H_
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace flutter {
class SnapshotDelegate {
public:
virtual sk_sp<SkImage> MakeRasterSnapshot(
std::function<void(SkCanvas*)> draw_callback,
SkISize picture_size) = 0;
virtual sk_sp<SkImage> MakeRasterSnapshot(sk_sp<SkPicture> picture,
SkISize picture_size) = 0;
virtual sk_sp<SkImage> ConvertToRasterImage(sk_sp<SkImage> image) = 0;
};
} // namespace flutter
#endif // FLUTTER_LIB_UI_SNAPSHOT_DELEGATE_H_