Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
impeller::testing::GaussianBlurFilterContentsTest Class Reference
Inheritance diagram for impeller::testing::GaussianBlurFilterContentsTest:
impeller::EntityPlayground impeller::PlaygroundTest impeller::Playground

Public Member Functions

std::shared_ptr< TextureMakeTexture (ISize size)
 Create a texture that has been cleared to transparent black. More...
 
- Public Member Functions inherited from impeller::EntityPlayground
 EntityPlayground ()
 
 ~EntityPlayground ()
 
void SetTypographerContext (std::shared_ptr< TypographerContext > typographer_context)
 
bool OpenPlaygroundHere (Entity entity)
 
bool OpenPlaygroundHere (EntityPass &entity_pass)
 
bool OpenPlaygroundHere (EntityPlaygroundCallback callback)
 
std::shared_ptr< ContentContextGetContentContext () const
 
- Public Member Functions inherited from impeller::PlaygroundTest
 PlaygroundTest ()
 
virtual ~PlaygroundTest ()
 
void SetUp () override
 
void TearDown () override
 
PlaygroundBackend GetBackend () const
 
std::unique_ptr< fml::MappingOpenAssetAsMapping (std::string asset_name) const override
 
RuntimeStage::Map OpenAssetAsRuntimeStage (const char *asset_name) const
 
std::string GetWindowTitle () const override
 
- Public Member Functions inherited from impeller::Playground
 Playground (PlaygroundSwitches switches)
 
virtual ~Playground ()
 
void SetupContext (PlaygroundBackend backend, const PlaygroundSwitches &switches)
 
void SetupWindow ()
 
void TeardownWindow ()
 
bool IsPlaygroundEnabled () const
 
Point GetCursorPosition () const
 
ISize GetWindowSize () const
 
Point GetContentScale () const
 
Scalar GetSecondsElapsed () const
 Get the amount of time elapsed from the start of the playground's execution. More...
 
std::shared_ptr< ContextGetContext () const
 
std::shared_ptr< ContextMakeContext () const
 
bool OpenPlaygroundHere (const Renderer::RenderCallback &render_callback)
 
bool OpenPlaygroundHere (SinglePassCallback pass_callback)
 
std::shared_ptr< TextureCreateTextureForFixture (const char *fixture_name, bool enable_mipmapping=false) const
 
std::shared_ptr< TextureCreateTextureCubeForFixture (std::array< const char *, 6 > fixture_names) const
 
virtual std::unique_ptr< fml::MappingOpenAssetAsMapping (std::string asset_name) const =0
 
virtual std::string GetWindowTitle () const =0
 
fml::Status SetCapabilities (const std::shared_ptr< Capabilities > &capabilities)
 
bool WillRenderSomething () const
 

Additional Inherited Members

- Public Types inherited from impeller::EntityPlayground
using EntityPlaygroundCallback = std::function< bool(ContentContext &context, RenderPass &pass)>
 
- Public Types inherited from impeller::Playground
using SinglePassCallback = std::function< bool(RenderPass &pass)>
 
- Static Public Member Functions inherited from impeller::Playground
static bool ShouldOpenNewPlaygrounds ()
 
static std::shared_ptr< CompressedImageLoadFixtureImageCompressed (std::shared_ptr< fml::Mapping > mapping)
 
static std::optional< DecompressedImageDecodeImageRGBA (const std::shared_ptr< CompressedImage > &compressed)
 
static std::shared_ptr< TextureCreateTextureForMapping (const std::shared_ptr< Context > &context, std::shared_ptr< fml::Mapping > mapping, bool enable_mipmapping=false)
 
static bool SupportsBackend (PlaygroundBackend backend)
 
- Protected Member Functions inherited from impeller::Playground
virtual bool ShouldKeepRendering () const
 
void SetWindowSize (ISize size)
 
- Protected Attributes inherited from impeller::Playground
const PlaygroundSwitches switches_
 

Detailed Description

Definition at line 74 of file gaussian_blur_filter_contents_unittests.cc.

Member Function Documentation

◆ MakeTexture()

std::shared_ptr< Texture > impeller::testing::GaussianBlurFilterContentsTest::MakeTexture ( ISize  size)
inline

Create a texture that has been cleared to transparent black.

Definition at line 77 of file gaussian_blur_filter_contents_unittests.cc.

77 {
78 std::shared_ptr<CommandBuffer> command_buffer =
79 GetContentContext()->GetContext()->CreateCommandBuffer();
80 if (!command_buffer) {
81 return nullptr;
82 }
83
84 auto render_target = GetContentContext()->MakeSubpass(
85 "Clear Subpass", size, command_buffer,
86 [](const ContentContext&, RenderPass&) { return true; });
87
89 ->GetContext()
90 ->GetCommandQueue()
91 ->Submit(/*buffers=*/{command_buffer})
92 .ok()) {
93 return nullptr;
94 }
95
96 if (render_target.ok()) {
97 return render_target.value().GetRenderTargetTexture();
98 }
99 return nullptr;
100 }
static bool ok(int result)
std::shared_ptr< ContentContext > GetContentContext() const
std::shared_ptr< Context > GetContext() const
Definition: playground.cc:90
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

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