| Flutter Impeller |

Public Member Functions | List of all members
impeller::testing::GaussianBlurFilterContentsTest Class Reference
Inheritance diagram for impeller::testing::GaussianBlurFilterContentsTest:

## Public Member Functions
std::shared_ptr< Texture > | MakeTexture (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)
std::shared_ptr< TypographerContext > | GetTypographerContext () const
bool | OpenPlaygroundHere (Entity entity)
bool | OpenPlaygroundHere (EntityPlaygroundCallback callback)
std::shared_ptr< ContentContext > | GetContentContext () const
Public Member Functions inherited from impeller::PlaygroundTest
| PlaygroundTest ()
virtual | ~PlaygroundTest ()
void | SetUp () override
void | TearDown () override
PlaygroundBackend | GetBackend () const
std::unique_ptr< fml::Mapping > | OpenAssetAsMapping (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< Context > | GetContext () const
std::shared_ptr< Context > | MakeContext () const
bool | OpenPlaygroundHere (const RenderCallback &render_callback)
bool | OpenPlaygroundHere (SinglePassCallback pass_callback)
std::shared_ptr< Texture > | CreateTextureForFixture (const char *fixture_name, bool enable_mipmapping=false) const
std::shared_ptr< Texture > | CreateTextureCubeForFixture (std::array< const char *, 6 > fixture_names) const
fml::Status | SetCapabilities (const std::shared_ptr< Capabilities > &capabilities)
bool | WillRenderSomething () const
| Returns true if `OpenPlaygroundHere` will actually render anything. More...
GLProcAddressResolver | CreateGLProcAddressResolver () const
VKProcAddressResolver | CreateVKProcAddressResolver () const
void | SetGPUDisabled (bool disabled) const
| Mark the GPU as unavilable. More...

## 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)>
using | RenderCallback = std::function< bool(RenderTarget &render_target)>
using | GLProcAddressResolver = std::function< void *(const char *proc_name)>
using | VKProcAddressResolver = std::function< void *(void *instance, const char *proc_name)>
Static Public Member Functions inherited from impeller::Playground
static bool | ShouldOpenNewPlaygrounds ()
static std::shared_ptr< CompressedImage > | LoadFixtureImageCompressed (std::shared_ptr< fml::Mapping > mapping)
static std::optional< DecompressedImage > | DecodeImageRGBA (const std::shared_ptr< CompressedImage > &compressed)
static std::shared_ptr< Texture > | CreateTextureForMapping (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
void | SetWindowSize (ISize size)
Protected Attributes inherited from impeller::Playground
const PlaygroundSwitches | switches_

## Detailed Description

Definition at line 83 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 86 of file gaussian_blur_filter_contents_unittests.cc.

86 {
87 std::shared_ptr<CommandBuffer> command_buffer =
88 GetContentContext()->GetContext()->CreateCommandBuffer();
89 if (!command_buffer) {
90 return nullptr;
91 }
92
93 auto render_target = GetContentContext()->MakeSubpass(
94 "Clear Subpass", size, command_buffer,
95 [](const ContentContext&, RenderPass&) { return true; });
96
97 if (!GetContentContext()
98 ->GetContext()
99 ->GetCommandQueue()
100 ->Submit(/*buffers=*/{command_buffer})
101 .ok()) {
102 return nullptr;
103 }
104
105 if (render_target.ok()) {
106 return render_target.value().GetRenderTargetTexture();
107 }
108 return nullptr;
109 }
impeller::EntityPlayground::GetContentContext
std::shared_ptr< ContentContext > GetContentContext() const
Definition: entity_playground.cc:28
impeller::Playground::GetContext
std::shared_ptr< Context > GetContext() const
Definition: playground.cc:91

References impeller::EntityPlayground::GetContentContext(), and impeller::Playground::GetContext().

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

- impeller/entity/contents/filters/gaussian_blur_filter_contents_unittests.cc