Public Member Functions | |
RendererDartTest () | |
flutter::testing::AutoIsolateShutdown * | GetIsolate () |
std::shared_ptr< Texture > | GetRenderedTextureFromDart (const char *dart_function_name) |
Run a Dart function that's expected to create a texture and pass it back for rendering via drawToPlayground . More... | |
bool | RunDartFunction (const char *dart_function_name) |
Invokes a Dart function. More... | |
bool | RunDartFunctionWithWindowSize (const char *dart_function_name) |
Invokes a Dart function with the window's width and height as arguments. More... | |
bool | RenderDartToPlayground (const char *dart_function_name) |
Call a dart function that produces a texture and render the result in the playground. More... | |
![]() | |
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 |
![]() | |
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 | |
![]() | |
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 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) |
![]() | |
void | SetWindowSize (ISize size) |
![]() | |
const PlaygroundSwitches | switches_ |
Definition at line 42 of file renderer_dart_unittests.cc.
|
inline |
Definition at line 45 of file renderer_dart_unittests.cc.
|
inline |
Definition at line 74 of file renderer_dart_unittests.cc.
References impeller::Playground::GetContext(), and impeller::testing::InstantiateTestShaderLibrary().
Referenced by GetRenderedTextureFromDart(), RunDartFunction(), and RunDartFunctionWithWindowSize().
|
inline |
Run a Dart function that's expected to create a texture and pass it back for rendering via drawToPlayground
.
Definition at line 86 of file renderer_dart_unittests.cc.
References GetIsolate(), and impeller::Playground::GetWindowSize().
Referenced by RenderDartToPlayground().
|
inline |
Call a dart function that produces a texture and render the result in the playground.
If the playground isn't enabled, the function is simply run once in order to verify that it doesn't throw any unhandled exceptions.
Prepare pipeline.
Prepare vertex data.
Prepare sampler.
Render to playground.
Definition at line 151 of file renderer_dart_unittests.cc.
References impeller::VertexBufferBuilder< VertexType_, IndexType_ >::AddVertices(), impeller::HostBuffer::Create(), impeller::VertexBufferBuilder< VertexType_, IndexType_ >::CreateVertexBuffer(), impeller::Playground::GetContext(), GetRenderedTextureFromDart(), impeller::Playground::IsPlaygroundEnabled(), impeller::kCount4, impeller::kUnknown, impeller::Playground::OpenPlaygroundHere(), and RunDartFunctionWithWindowSize().
|
inline |
Invokes a Dart function.
Returns false if invoking the function failed or if any unhandled exceptions were thrown.
Definition at line 116 of file renderer_dart_unittests.cc.
References GetIsolate().
|
inline |
Invokes a Dart function with the window's width and height as arguments.
Returns false if invoking the function failed or if any unhandled exceptions were thrown.
Definition at line 132 of file renderer_dart_unittests.cc.
References GetIsolate(), and impeller::Playground::GetWindowSize().
Referenced by RenderDartToPlayground().