| Flutter Impeller |

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
13 namespace impeller {
14 namespace testing {
15
16 /// Converts `Picture`s and `DisplayList`s to `MetalScreenshot`s with the
17 /// playground backend.
18 class Screenshotter {
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
28 virtual PlaygroundImpl& GetPlayground() = 0;
29 };
30
31 } // namespace testing
32 } // namespace impeller
33
34 #endif // FLUTTER_IMPELLER_GOLDEN_TESTS_SCREENSHOTTER_H_
impeller::testing::Screenshotter::MakeScreenshot
virtual std::unique_ptr< Screenshot > MakeScreenshot(AiksContext &aiks_context, const Picture &picture, const ISize &size={300, 300}, bool scale_content=true)=0
impeller::AiksContext
Definition: aiks_context.h:20
impeller::testing::Screenshotter
Definition: screenshotter.h:18
picture.h
screenshot.h
impeller::PlaygroundImpl
Definition: playground_impl.h:18
impeller::Picture
Definition: picture.h:20
impeller::TSize< int64_t >
impeller::testing::Screenshotter::~Screenshotter
virtual ~Screenshotter()=default
impeller::testing::Screenshotter::GetPlayground
virtual PlaygroundImpl & GetPlayground()=0
playground_impl.h
impeller
Definition: aiks_blur_unittests.cc:20