Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::testing::VulkanScreenshotter Class Reference

#include <vulkan_screenshotter.h>

Inheritance diagram for impeller::testing::VulkanScreenshotter:
impeller::testing::Screenshotter

Public Member Functions

 VulkanScreenshotter (const std::unique_ptr< PlaygroundImpl > &playground)
 
std::unique_ptr< ScreenshotMakeScreenshot (AiksContext &aiks_context, const Picture &picture, const ISize &size={300, 300}, bool scale_content=true) override
 
PlaygroundImplGetPlayground () override
 
- Public Member Functions inherited from impeller::testing::Screenshotter
virtual ~Screenshotter ()=default
 

Detailed Description

Converts Pictures and DisplayLists to MetalScreenshots with the playground backend.

Definition at line 19 of file vulkan_screenshotter.h.

Constructor & Destructor Documentation

◆ VulkanScreenshotter()

impeller::testing::VulkanScreenshotter::VulkanScreenshotter ( const std::unique_ptr< PlaygroundImpl > &  playground)
explicit

Definition at line 103 of file vulkan_screenshotter.mm.

105 : playground_(playground) {
106 FML_CHECK(playground_);
107}
#define FML_CHECK(condition)
Definition logging.h:85

Member Function Documentation

◆ GetPlayground()

PlaygroundImpl & impeller::testing::VulkanScreenshotter::GetPlayground ( )
inlineoverridevirtual

Implements impeller::testing::Screenshotter.

Definition at line 30 of file vulkan_screenshotter.h.

30{ return *playground_; }

◆ MakeScreenshot()

std::unique_ptr< Screenshot > impeller::testing::VulkanScreenshotter::MakeScreenshot ( AiksContext aiks_context,
const Picture picture,
const ISize size = {300, 300},
bool  scale_content = true 
)
overridevirtual

Implements impeller::testing::Screenshotter.

Definition at line 109 of file vulkan_screenshotter.mm.

113 {
114 Vector2 content_scale =
115 scale_content ? playground_->GetContentScale() : Vector2{1, 1};
116 std::shared_ptr<Image> image = picture.ToImage(
117 aiks_context,
118 ISize(size.width * content_scale.x, size.height * content_scale.y));
119 std::shared_ptr<Texture> texture = image->GetTexture();
120 return ReadTexture(aiks_context.GetContext(), texture);
121}
sk_sp< SkImage > image
Definition examples.cpp:29
FlTexture * texture
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
Point Vector2
Definition point.h:320
TSize< int64_t > ISize
Definition size.h:138

The documentation for this class was generated from the following files: