25 RenderToTexture(context,
ISize(
coverage->GetSize()), translate);
40std::shared_ptr<Texture> Picture::RenderToTexture(
43 std::optional<const Matrix> translate)
const {
46 pass->IterateAllEntities([&translate](
auto& entity) ->
bool {
47 auto matrix = translate.has_value()
48 ? translate.value() * entity.GetTransform()
49 : entity.GetTransform();
50 entity.SetTransform(
matrix);
56 const std::shared_ptr<Context>& impeller_context = context.
GetContext();
59 RenderTargetAllocator render_target_allocator =
60 RenderTargetAllocator(impeller_context->GetResourceAllocator());
62 if (impeller_context->GetCapabilities()->SupportsOffscreenMSAA()) {
63 target = render_target_allocator.CreateOffscreenMSAA(
67 "Picture Snapshot MSAA",
69 kDefaultColorAttachmentConfigMSAA
72 target = render_target_allocator.CreateOffscreen(
bool Render(const Picture &picture, RenderTarget &render_target, bool reset_host_buffer)
std::shared_ptr< Context > GetContext() const
static constexpr AttachmentConfig kDefaultColorAttachmentConfig
#define FML_DCHECK(condition)
unsigned useCenter Optional< SkMatrix > matrix
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
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
static constexpr Matrix MakeTranslation(const Vector3 &t)
std::shared_ptr< Image > ToImage(AiksContext &context, ISize size) const
std::unique_ptr< EntityPass > pass
std::optional< Snapshot > Snapshot(AiksContext &context)
Represents a texture and its intended draw transform/sampler configuration.
std::shared_ptr< Texture > texture