Flutter Engine
The Flutter Engine
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/impeller/aiks/picture.h"
9#include "flutter/impeller/golden_tests/metal_screenshot.h"
10#include "flutter/impeller/golden_tests/screenshotter.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 explicit MetalScreenshotter(bool enable_wide_gamut);
21
22 std::unique_ptr<Screenshot> MakeScreenshot(
23 AiksContext& aiks_context,
24 const Picture& picture,
25 const ISize& size = {300, 300},
26 bool scale_content = true) override;
27
28 PlaygroundImpl& GetPlayground() override { 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_
PlaygroundImpl & GetPlayground() override
std::unique_ptr< Screenshot > MakeScreenshot(AiksContext &aiks_context, const Picture &picture, const ISize &size={300, 300}, bool scale_content=true) override
sk_sp< const SkPicture > picture
Definition: SkRecords.h:299
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259