Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
impeller::PlaygroundTestWithGoldens Class Reference

#include <playground_test.h>

Inheritance diagram for impeller::PlaygroundTestWithGoldens:
impeller::PlaygroundTest impeller::Playground

Protected Member Functions

bool IsGoldenTestSuite () const override
 This method is overridden on a test suite basis and establishes whether a given set of tests is intended to generate goldens.
 
- Protected Member Functions inherited from impeller::Playground
void TearDownContextData ()
 
virtual void EnsureContextIsUnique ()
 Make sure that when the context is later created that it will not be shared with any other playgrounds.
 
bool PlatformSupportsWideGamutTests () const
 Returns true if the platform can support wide gamuts.
 
bool RenderingSupportsMSAA () const
 Returns true if the rendering path supports MSAA rendering.
 
SampleCount GetDefaultSampleCount () const
 Returns the default sample count of the rendering path.
 
virtual bool EnsureContextSupportsWideGamut ()
 Make sure that when the context is later created that it will support wide gamuts if the platform supports it. Returns whether the platform supports wide gamut.
 
const PlaygroundSwitchesGetSwitches () const
 Return an unmodifiable reference to the current switches. The switches might change at the start of a test as it has a brief opportunity to call any of the Ensure* methods that define the environment it expects, but should be stable by the time any subsequent methods that might perform work are called.
 
void SetTypographerContext (std::shared_ptr< TypographerContext > typographer_context)
 
void SetWindowSize (ISize size)
 

Additional Inherited Members

- 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)>
 
- 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
 
absl::StatusOr< RuntimeStage::MapOpenAssetAsRuntimeStage (const char *asset_name) const
 
std::string GetWindowTitle () const override
 
testing::GoldenDigestManagerGetGoldenDigestManager () const override
 
- Public Member Functions inherited from impeller::Playground
 Playground (PlaygroundBackend backend, const PlaygroundSwitches &switches)
 
virtual ~Playground ()
 
bool IsPlaygroundEnabled () const
 
Point GetCursorPosition () const
 
ISize GetWindowSize () const
 
IRect GetWindowBounds () const
 
Point GetContentScale () const
 
Scalar GetSecondsElapsed () const
 Get the amount of time elapsed from the start of the playground's execution.
 
std::shared_ptr< ContextGetContext () const
 
std::shared_ptr< ContextMakeContext () const
 
ContentContextGetContentContext () const
 
std::shared_ptr< TypographerContextGetTypographerContext () const
 
bool ShouldWriteGoldenImage ()
 Whether this instance will write a golden image of the output from |OpenPlaygroundHere|.
 
void SetEnableWriteGolden (bool write_golden)
 Sets a particular test to either write a golden or not, false by default.
 
bool OpenPlaygroundHere (const RenderCallback &render_callback)
 
bool OpenPlaygroundHere (const 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
 
fml::Status SetCapabilities (const std::shared_ptr< Capabilities > &capabilities)
 
GLProcAddressResolver CreateGLProcAddressResolver () const
 
VKProcAddressResolver CreateVKProcAddressResolver () const
 
void SetGPUDisabled (bool disabled) const
 Mark the GPU as unavilable.
 
RuntimeStageBackend GetRuntimeStageBackend () const
 
bool InitializePipelineDescriptorForRendering (PipelineDescriptor &desc) const
 Initializes the provided |PipelineDescriptor| with appropriate default values to match the conditions under which a pipeline will be rendered.
 
- Static Public Member Functions inherited from impeller::PlaygroundTest
static void SetupTestEnvironment ()
 
- Static Public Member Functions inherited from impeller::Playground
static void OnTearDownTestEnvironment ()
 
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)
 

Detailed Description

Definition at line 74 of file playground_test.h.

Member Function Documentation

◆ IsGoldenTestSuite()

bool impeller::PlaygroundTestWithGoldens::IsGoldenTestSuite ( ) const
inlineoverrideprotectedvirtual

This method is overridden on a test suite basis and establishes whether a given set of tests is intended to generate goldens.

The return value of this method is used to set the default value of |PlaygroundShouldWriteGoldenImage|, but an individual test is still allowed to enable a golden image by calling |SetEnableWriteGolden|.

Returns
false by default unless overridden in a subclass

Reimplemented from impeller::PlaygroundTest.

Definition at line 76 of file playground_test.h.

76{ return true; }

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