Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
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_TESTING_SCREENSHOTTER_H_
6#define FLUTTER_IMPELLER_TESTING_SCREENSHOTTER_H_
7
10
11namespace impeller {
12namespace testing {
13
14/// Converts `Picture`s and `DisplayList`s to `MetalScreenshot`s with the
15/// playground backend.
17 public:
18 virtual ~Screenshotter() = default;
19
20 static std::unique_ptr<Screenshot> MakeScreenshot(
21 std::shared_ptr<Context>& context,
22 const std::shared_ptr<Texture>& texture);
23
24 virtual std::unique_ptr<Screenshot> MakeScreenshot(
25 const AiksContext& aiks_context,
26 const std::shared_ptr<Texture>& texture) = 0;
27
28 private:
29 static std::unique_ptr<Screenshot> MakeMetalScreenshot(
30 std::shared_ptr<Context>& context,
31 const std::shared_ptr<Texture>& texture);
32 static std::unique_ptr<Screenshot> MakeOpenGLScreenshot(
33 std::shared_ptr<Context>& context,
34 const std::shared_ptr<Texture>& texture);
35 static std::unique_ptr<Screenshot> MakeVulkanScreenshot(
36 std::shared_ptr<Context>& context,
37 const std::shared_ptr<Texture>& texture);
38};
39
40} // namespace testing
41} // namespace impeller
42
43#endif // FLUTTER_IMPELLER_TESTING_SCREENSHOTTER_H_
static std::unique_ptr< Screenshot > MakeScreenshot(std::shared_ptr< Context > &context, const std::shared_ptr< Texture > &texture)
virtual ~Screenshotter()=default
virtual std::unique_ptr< Screenshot > MakeScreenshot(const AiksContext &aiks_context, const std::shared_ptr< Texture > &texture)=0
FlTexture * texture
std::shared_ptr< ContextGLES > context