5#ifndef FLUTTER_IMPELLER_ENTITY_RENDER_TARGET_CACHE_H_
6#define FLUTTER_IMPELLER_ENTITY_RENDER_TARGET_CACHE_H_
23 void Start()
override;
32 const std::string& label =
"Offscreen",
35 std::optional<RenderTarget::AttachmentConfig> stencil_attachment_config =
37 const std::shared_ptr<Texture>& existing_color_texture =
nullptr,
38 const std::shared_ptr<Texture>& existing_depth_stencil_texture =
45 const std::string& label =
"Offscreen MSAA",
48 std::optional<RenderTarget::AttachmentConfig> stencil_attachment_config =
50 const std::shared_ptr<Texture>& existing_color_msaa_texture =
nullptr,
51 const std::shared_ptr<Texture>& existing_color_resolve_texture =
nullptr,
52 const std::shared_ptr<Texture>& existing_depth_stencil_texture =
59 struct RenderTargetData {
65 std::vector<RenderTargetData> render_target_data_;
75 return render_target_data_.begin();
80 return render_target_data_.end();
To do anything rendering related with Impeller, you need a context.
a wrapper around the impeller [Allocator] instance that can be used to provide caching of allocated r...
An implementation of the [RenderTargetAllocator] that caches all allocated texture data for one frame...
size_t CachedTextureCount() const
RenderTargetCache(std::shared_ptr< Allocator > allocator)
~RenderTargetCache()=default
RenderTarget CreateOffscreen(const Context &context, ISize size, int mip_count, const std::string &label="Offscreen", RenderTarget::AttachmentConfig color_attachment_config=RenderTarget::kDefaultColorAttachmentConfig, std::optional< RenderTarget::AttachmentConfig > stencil_attachment_config=RenderTarget::kDefaultStencilAttachmentConfig, const std::shared_ptr< Texture > &existing_color_texture=nullptr, const std::shared_ptr< Texture > &existing_depth_stencil_texture=nullptr) override
RenderTarget CreateOffscreenMSAA(const Context &context, ISize size, int mip_count, const std::string &label="Offscreen MSAA", RenderTarget::AttachmentConfigMSAA color_attachment_config=RenderTarget::kDefaultColorAttachmentConfigMSAA, std::optional< RenderTarget::AttachmentConfig > stencil_attachment_config=RenderTarget::kDefaultStencilAttachmentConfig, const std::shared_ptr< Texture > &existing_color_msaa_texture=nullptr, const std::shared_ptr< Texture > &existing_color_resolve_texture=nullptr, const std::shared_ptr< Texture > &existing_depth_stencil_texture=nullptr) override
std::vector< RenderTargetData >::const_iterator GetRenderTargetDataBegin() const
Visible for testing.
void End() override
Mark the end of a frame workload.
void Start() override
Mark the beginning of a frame workload.
std::vector< RenderTargetData >::const_iterator GetRenderTargetDataEnd() const
Visible for testing.
static constexpr AttachmentConfig kDefaultColorAttachmentConfig
static constexpr AttachmentConfigMSAA kDefaultColorAttachmentConfigMSAA
static constexpr AttachmentConfig kDefaultStencilAttachmentConfig
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