Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
impeller::Picture Struct Reference

#include <picture.h>

Public Member Functions

std::optional< SnapshotSnapshot (AiksContext &context)
 
std::shared_ptr< ImageToImage (AiksContext &context, ISize size) const
 

Public Attributes

std::unique_ptr< EntityPasspass
 

Detailed Description

Definition at line 20 of file picture.h.

Member Function Documentation

◆ Snapshot()

std::optional< Snapshot > impeller::Picture::Snapshot ( AiksContext context)

Definition at line 17 of file picture.cc.

17 {
18 auto coverage = pass->GetElementsCoverage(std::nullopt);
19 if (!coverage.has_value() || coverage->IsEmpty()) {
20 return std::nullopt;
21 }
22
23 const auto translate = Matrix::MakeTranslation(-coverage->GetOrigin());
24 auto texture =
25 RenderToTexture(context, ISize(coverage->GetSize()), translate);
26 return impeller::Snapshot{
27 .texture = std::move(texture),
28 .transform = Matrix::MakeTranslation(coverage->GetOrigin())};
29}
FlTexture * texture
TSize< int64_t > ISize
Definition size.h:138
static constexpr Matrix MakeTranslation(const Vector3 &t)
Definition matrix.h:95
std::unique_ptr< EntityPass > pass
Definition picture.h:21
Represents a texture and its intended draw transform/sampler configuration.
Definition snapshot.h:24
std::shared_ptr< Texture > texture
Definition snapshot.h:25

◆ ToImage()

std::shared_ptr< Image > impeller::Picture::ToImage ( AiksContext context,
ISize  size 
) const

Definition at line 31 of file picture.cc.

32 {
33 if (size.IsEmpty()) {
34 return nullptr;
35 }
36 auto texture = RenderToTexture(context, size);
37 return texture ? std::make_shared<Image>(texture) : nullptr;
38}
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

Member Data Documentation

◆ pass

std::unique_ptr<EntityPass> impeller::Picture::pass

Definition at line 21 of file picture.h.


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