Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
screenshotter.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_GOLDEN_TESTS_SCREENSHOTTER_H_
6#define FLUTTER_IMPELLER_GOLDEN_TESTS_SCREENSHOTTER_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/impeller/aiks/picture.h"
10#include "flutter/impeller/golden_tests/screenshot.h"
11#include "flutter/impeller/playground/playground_impl.h"
12
13namespace impeller {
14namespace testing {
15
16/// Converts `Picture`s and `DisplayList`s to `MetalScreenshot`s with the
17/// playground backend.
19 public:
20 virtual ~Screenshotter() = default;
21
22 virtual std::unique_ptr<Screenshot> MakeScreenshot(
23 AiksContext& aiks_context,
24 const Picture& picture,
25 const ISize& size = {300, 300},
26 bool scale_content = true) = 0;
27
29};
30
31} // namespace testing
32} // namespace impeller
33
34#endif // FLUTTER_IMPELLER_GOLDEN_TESTS_SCREENSHOTTER_H_
virtual PlaygroundImpl & GetPlayground()=0
virtual std::unique_ptr< Screenshot > MakeScreenshot(AiksContext &aiks_context, const Picture &picture, const ISize &size={300, 300}, bool scale_content=true)=0
virtual ~Screenshotter()=default