Flutter Impeller
metal_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_METAL_SCREENSHOTTER_H_
6 #define FLUTTER_IMPELLER_GOLDEN_TESTS_METAL_SCREENSHOTTER_H_
7 
8 #include "flutter/fml/macros.h"
12 
13 namespace impeller {
14 namespace testing {
15 
16 /// Converts `Picture`s and `DisplayList`s to `MetalScreenshot`s with the
17 /// playground backend.
19  public:
21 
22  std::unique_ptr<MetalScreenshot> MakeScreenshot(AiksContext& aiks_context,
23  const Picture& picture,
24  const ISize& size = {300,
25  300},
26  bool scale_content = true);
27 
28  PlaygroundImpl& GetPlayground() { return *playground_; }
29 
30  private:
31  std::unique_ptr<PlaygroundImpl> playground_;
32 };
33 
34 } // namespace testing
35 } // namespace impeller
36 
37 #endif // FLUTTER_IMPELLER_GOLDEN_TESTS_METAL_SCREENSHOTTER_H_
impeller::AiksContext
Definition: aiks_context.h:20
impeller::testing::MetalScreenshotter::GetPlayground
PlaygroundImpl & GetPlayground()
Definition: metal_screenshotter.h:28
impeller::testing::MetalScreenshotter::MetalScreenshotter
MetalScreenshotter()
Definition: metal_screenshotter.mm:16
picture.h
impeller::PlaygroundImpl
Definition: playground_impl.h:18
impeller::Picture
Definition: picture.h:20
impeller::TSize< int64_t >
metal_screenshot.h
impeller::testing::MetalScreenshotter::MakeScreenshot
std::unique_ptr< MetalScreenshot > MakeScreenshot(AiksContext &aiks_context, const Picture &picture, const ISize &size={300, 300}, bool scale_content=true)
Definition: metal_screenshotter.mm:22
impeller::testing::MetalScreenshotter
Definition: metal_screenshotter.h:18
playground_impl.h
impeller
Definition: aiks_context.cc:10