Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
golden_tests
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"
9
#include "flutter/impeller/aiks/picture.h"
10
#include "flutter/impeller/golden_tests/metal_screenshot.h"
11
#include "flutter/impeller/golden_tests/screenshotter.h"
12
#include "flutter/impeller/playground/playground_impl.h"
13
14
namespace
impeller
{
15
namespace
testing {
16
17
/// Converts `Picture`s and `DisplayList`s to `MetalScreenshot`s with the
18
/// playground backend.
19
class
MetalScreenshotter
:
public
Screenshotter
{
20
public
:
21
explicit
MetalScreenshotter
(
bool
enable_wide_gamut);
22
23
std::unique_ptr<Screenshot>
MakeScreenshot
(
24
AiksContext
& aiks_context,
25
const
Picture
& picture,
26
const
ISize
& size = {300, 300},
27
bool
scale_content =
true
)
override
;
28
29
PlaygroundImpl
&
GetPlayground
()
override
{
return
*playground_; }
30
31
private
:
32
std::unique_ptr<PlaygroundImpl> playground_;
33
};
34
35
}
// namespace testing
36
}
// namespace impeller
37
38
#endif
// FLUTTER_IMPELLER_GOLDEN_TESTS_METAL_SCREENSHOTTER_H_
impeller::AiksContext
Definition
aiks_context.h:20
impeller::PlaygroundImpl
Definition
playground_impl.h:18
impeller::testing::MetalScreenshotter
Definition
metal_screenshotter.h:19
impeller::testing::MetalScreenshotter::GetPlayground
PlaygroundImpl & GetPlayground() override
Definition
metal_screenshotter.h:29
impeller::testing::MetalScreenshotter::MakeScreenshot
std::unique_ptr< Screenshot > MakeScreenshot(AiksContext &aiks_context, const Picture &picture, const ISize &size={300, 300}, bool scale_content=true) override
Definition
metal_screenshotter.mm:23
impeller::testing::Screenshotter
Definition
screenshotter.h:18
impeller
Definition
texture.h:18
impeller::Picture
Definition
picture.h:20
impeller::TSize< int64_t >
Generated on Fri Apr 26 2024 06:14:11 for Flutter Engine by
1.9.8