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

#include <golden_playground_test.h>

Inheritance diagram for impeller::GoldenPlaygroundTest:

Classes

struct  GoldenPlaygroundTestImpl
 

Public Types

using AiksPlaygroundCallback = std::function< std::optional< Picture >(AiksContext &renderer)>
 
using AiksDlPlaygroundCallback = std::function< sk_sp< flutter::DisplayList >()>
 

Public Member Functions

 GoldenPlaygroundTest ()
 
 ~GoldenPlaygroundTest () override
 
void SetUp ()
 
void TearDown ()
 
PlaygroundBackend GetBackend () const
 
void SetTypographerContext (std::shared_ptr< TypographerContext > typographer_context)
 
bool OpenPlaygroundHere (Picture picture)
 
bool OpenPlaygroundHere (AiksPlaygroundCallback callback)
 
bool OpenPlaygroundHere (const AiksDlPlaygroundCallback &callback)
 
bool OpenPlaygroundHere (const sk_sp< flutter::DisplayList > &list)
 
bool OpenPlaygroundHere (const Playground::SinglePassCallback &callback)
 
std::unique_ptr< testing::ScreenshotMakeScreenshot (const sk_sp< flutter::DisplayList > &list)
 
std::shared_ptr< TextureCreateTextureForFixture (const char *fixture_name, bool enable_mipmapping=false) const
 
sk_sp< flutter::DlImageCreateDlImageForFixture (const char *fixture_name, bool enable_mipmapping=false) const
 
absl::StatusOr< RuntimeStage::MapOpenAssetAsRuntimeStage (const char *asset_name) const
 
std::shared_ptr< ContextGetContext () const
 
std::shared_ptr< ContextMakeContext () const
 
Point GetContentScale () const
 
Scalar GetSecondsElapsed () const
 
ISize GetWindowSize () const
 
IRect GetWindowBounds () const
 
fml::Status SetCapabilities (const std::shared_ptr< Capabilities > &capabilities)
 
RuntimeStageBackend GetRuntimeStageBackend () const
 
void SetEnableWriteGolden (bool write_golden)
 Sets a particular test to either write a golden or not.
 
bool IsPlaygroundEnabled () 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

static bool SaveScreenshot (std::unique_ptr< testing::Screenshot > screenshot, const std::string &postfix="")
 

Protected Member Functions

void SetWindowSize (ISize size)
 
bool RenderingSupportsMSAA () const
 Returns true if the rendering path supports MSAA rendering.
 
SampleCount GetDefaultSampleCount () const
 Returns the default sample count of the rendering path.
 
void EnsureContextIsUnique ()
 
bool EnsureContextSupportsWideGamut ()
 

Detailed Description

Definition at line 27 of file golden_playground_test.h.

Member Typedef Documentation

◆ AiksDlPlaygroundCallback

◆ AiksPlaygroundCallback

using impeller::GoldenPlaygroundTest::AiksPlaygroundCallback = std::function<std::optional<Picture>(AiksContext& renderer)>

Definition at line 30 of file golden_playground_test.h.

Constructor & Destructor Documentation

◆ GoldenPlaygroundTest()

impeller::GoldenPlaygroundTest::GoldenPlaygroundTest ( )
default

Definition at line 159 of file golden_playground_test_mac.cc.

160 : typographer_context_(TypographerContextSkia::Make()),
161 pimpl_(new GoldenPlaygroundTest::GoldenPlaygroundTestImpl()) {}
static std::shared_ptr< TypographerContext > Make()

◆ ~GoldenPlaygroundTest()

impeller::GoldenPlaygroundTest::~GoldenPlaygroundTest ( )
overridedefault

Member Function Documentation

◆ CreateDlImageForFixture()

sk_sp< flutter::DlImage > impeller::GoldenPlaygroundTest::CreateDlImageForFixture ( const char *  fixture_name,
bool  enable_mipmapping = false 
) const

Definition at line 342 of file golden_playground_test_mac.cc.

344 {
345 std::shared_ptr<Texture> texture =
346 CreateTextureForFixture(fixture_name, enable_mipmapping);
348}
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
std::shared_ptr< Texture > CreateTextureForFixture(const char *fixture_name, bool enable_mipmapping=false) const
FlTexture * texture

References CreateTextureForFixture(), impeller::DlImageImpeller::Make(), and texture.

◆ CreateTextureForFixture()

std::shared_ptr< Texture > impeller::GoldenPlaygroundTest::CreateTextureForFixture ( const char *  fixture_name,
bool  enable_mipmapping = false 
) const

Definition at line 329 of file golden_playground_test_mac.cc.

331 {
332 std::shared_ptr<fml::Mapping> mapping =
334 auto result = Playground::CreateTextureForMapping(GetContext(), mapping,
335 enable_mipmapping);
336 if (result) {
337 result->SetLabel(fixture_name);
338 }
339 return result;
340}
std::shared_ptr< Context > GetContext() const
static std::shared_ptr< Texture > CreateTextureForMapping(const std::shared_ptr< Context > &context, std::shared_ptr< fml::Mapping > mapping, bool enable_mipmapping=false)
std::unique_ptr< fml::Mapping > OpenFixtureAsMapping(const std::string &fixture_name)
Opens a fixture of the given file name and returns a mapping to its contents.
Definition testing.cc:58

References impeller::Playground::CreateTextureForMapping(), GetContext(), and flutter::testing::OpenFixtureAsMapping().

Referenced by CreateDlImageForFixture().

◆ EnsureContextIsUnique()

void impeller::GoldenPlaygroundTest::EnsureContextIsUnique ( )
inlineprotected

Definition at line 130 of file golden_playground_test.h.

130{}

◆ EnsureContextSupportsWideGamut()

bool impeller::GoldenPlaygroundTest::EnsureContextSupportsWideGamut ( )
inlineprotected

Definition at line 136 of file golden_playground_test.h.

136{ return true; }

◆ GetBackend()

PlaygroundBackend impeller::GoldenPlaygroundTest::GetBackend ( ) const

Definition at line 253 of file golden_playground_test_mac.cc.

253 {
254 return GetParam();
255}

◆ GetContentScale()

Point impeller::GoldenPlaygroundTest::GetContentScale ( ) const

Definition at line 398 of file golden_playground_test_mac.cc.

398 {
399 return pimpl_->screenshotter->GetPlayground().GetContentScale();
400}

◆ GetContext()

std::shared_ptr< Context > impeller::GoldenPlaygroundTest::GetContext ( ) const

Definition at line 360 of file golden_playground_test_mac.cc.

360 {
361 if (!pimpl_->screenshotter) {
362 return nullptr;
363 }
364 return pimpl_->screenshotter->GetPlayground().GetContext();
365}

Referenced by CreateTextureForFixture(), MakeContext(), MakeScreenshot(), OpenPlaygroundHere(), OpenPlaygroundHere(), SetUp(), and TearDown().

◆ GetDefaultSampleCount()

SampleCount impeller::GoldenPlaygroundTest::GetDefaultSampleCount ( ) const
inlineprotected

Returns the default sample count of the rendering path.

In the case of goldens, all tests are rendered to a non-MSAA backend.

Definition at line 126 of file golden_playground_test.h.

References impeller::kCount1.

◆ GetRuntimeStageBackend()

RuntimeStageBackend impeller::GoldenPlaygroundTest::GetRuntimeStageBackend ( ) const

Definition at line 436 of file golden_playground_test_mac.cc.

436 {
437 return pimpl_->screenshotter->GetPlayground().GetRuntimeStageBackend();
438}

◆ GetSecondsElapsed()

Scalar impeller::GoldenPlaygroundTest::GetSecondsElapsed ( ) const

Definition at line 402 of file golden_playground_test_mac.cc.

402 {
403 return 0.0f;
404}

◆ GetWindowBounds()

IRect impeller::GoldenPlaygroundTest::GetWindowBounds ( ) const

Definition at line 410 of file golden_playground_test_mac.cc.

410 {
411 return IRect::MakeSize(pimpl_->window_size);
412}
static constexpr TRect MakeSize(const TSize< U > &size)
Definition rect.h:150

References impeller::TRect< T >::MakeSize().

◆ GetWindowSize()

ISize impeller::GoldenPlaygroundTest::GetWindowSize ( ) const

Definition at line 406 of file golden_playground_test_mac.cc.

406 {
407 return pimpl_->window_size;
408}

◆ InitializePipelineDescriptorForRendering()

bool impeller::GoldenPlaygroundTest::InitializePipelineDescriptorForRendering ( PipelineDescriptor desc) const

Initializes the provided |PipelineDescriptor| with appropriate default values to match the conditions under which a pipeline will be rendered.

Definition at line 447 of file golden_playground_test_mac.cc.

448 {
449 // Match the golden harness render target: single-sampled, no depth/stencil.
450 // `ClearStencilAttachments` also resets the stencil pixel format on the
451 // pipeline, which Metal validation requires to match the target's lack of a
452 // stencil texture; `SetStencilAttachmentDescriptors(nullopt)` alone leaves
453 // the format set and trips that validation.
454 desc.SetSampleCount(SampleCount::kCount1);
455 desc.ClearStencilAttachments();
456 desc.ClearDepthAttachment();
457 return true;
458}

References impeller::PipelineDescriptor::ClearDepthAttachment(), impeller::PipelineDescriptor::ClearStencilAttachments(), impeller::kCount1, and impeller::PipelineDescriptor::SetSampleCount().

◆ IsPlaygroundEnabled()

bool impeller::GoldenPlaygroundTest::IsPlaygroundEnabled ( ) const
inline

Definition at line 108 of file golden_playground_test.h.

108{ return false; }

◆ MakeContext()

std::shared_ptr< Context > impeller::GoldenPlaygroundTest::MakeContext ( ) const

On Metal we create a context for each test.

Definition at line 367 of file golden_playground_test_mac.cc.

367 {
368 if (GetParam() == PlaygroundBackend::kMetal ||
369 GetParam() == PlaygroundBackend::kMetalSDF) {
370 /// On Metal we create a context for each test.
371 return GetContext();
372 } else if (GetParam() == PlaygroundBackend::kVulkan) {
373 bool enable_vulkan_validations = true;
374 FML_CHECK(!pimpl_->test_vulkan_playground)
375 << "We don't support creating multiple contexts for one test";
376 pimpl_->test_vulkan_playground =
377 MakeVulkanPlayground(enable_vulkan_validations);
378 pimpl_->screenshotter =
379 std::make_unique<testing::VulkanGoldenScreenshotter>(
380 pimpl_->test_vulkan_playground);
381 return pimpl_->test_vulkan_playground->GetContext();
382 } else if (GetParam() == PlaygroundBackend::kOpenGLES ||
383 GetParam() == PlaygroundBackend::kOpenGLESSDF) {
384 FML_CHECK(!pimpl_->test_opengl_playground)
385 << "We don't support creating multiple contexts for one test";
386 bool use_sdfs = (GetParam() == PlaygroundBackend::kOpenGLESSDF);
387 pimpl_->test_opengl_playground = MakeOpenGLESPlayground(use_sdfs);
388 pimpl_->screenshotter =
389 std::make_unique<testing::VulkanGoldenScreenshotter>(
390 pimpl_->test_opengl_playground);
391 return pimpl_->test_opengl_playground->GetContext();
392 } else {
393 FML_CHECK(false);
394 return nullptr;
395 }
396}
#define FML_CHECK(condition)
Definition logging.h:104

References FML_CHECK, GetContext(), impeller::kMetal, impeller::kMetalSDF, impeller::kOpenGLES, impeller::kOpenGLESSDF, and impeller::kVulkan.

◆ MakeScreenshot()

std::unique_ptr< testing::Screenshot > impeller::GoldenPlaygroundTest::MakeScreenshot ( const sk_sp< flutter::DisplayList > &  list)

Definition at line 423 of file golden_playground_test_mac.cc.

424 {
425 AiksContext renderer(GetContext(), typographer_context_);
426 Point content_scale =
427 pimpl_->screenshotter->GetPlayground().GetContentScale();
428
429 ISize physical_window_size(
430 std::round(pimpl_->window_size.width * content_scale.x),
431 std::round(pimpl_->window_size.height * content_scale.y));
432 return pimpl_->screenshotter->MakeScreenshot(
433 renderer, DisplayListToTexture(list, physical_window_size, renderer));
434}
std::shared_ptr< Texture > DisplayListToTexture(const sk_sp< flutter::DisplayList > &display_list, ISize size, AiksContext &context, bool reset_host_buffer, bool generate_mips, std::optional< PixelFormat > target_pixel_format)
Render the provided display list to a texture with the given size.
TPoint< Scalar > Point
Definition point.h:426
ISize64 ISize
Definition size.h:162

References impeller::DisplayListToTexture(), GetContext(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

◆ OpenAssetAsRuntimeStage()

absl::StatusOr< RuntimeStage::Map > impeller::GoldenPlaygroundTest::OpenAssetAsRuntimeStage ( const char *  asset_name) const

Definition at line 350 of file golden_playground_test_mac.cc.

351 {
352 const std::shared_ptr<fml::Mapping> fixture =
354 if (!fixture || fixture->GetSize() == 0) {
355 return absl::NotFoundError("Asset not found or empty.");
356 }
357 return RuntimeStage::DecodeRuntimeStages(fixture);
358}
static absl::StatusOr< Map > DecodeRuntimeStages(const std::shared_ptr< fml::Mapping > &payload)

References impeller::RuntimeStage::DecodeRuntimeStages(), and flutter::testing::OpenFixtureAsMapping().

◆ OpenPlaygroundHere() [1/5]

bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere ( AiksPlaygroundCallback  callback)

◆ OpenPlaygroundHere() [2/5]

bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere ( const AiksDlPlaygroundCallback callback)

Definition at line 257 of file golden_playground_test_mac.cc.

258 {
259 AiksContext renderer(GetContext(), typographer_context_);
260
261 std::unique_ptr<testing::Screenshot> screenshot;
262 Point content_scale =
263 pimpl_->screenshotter->GetPlayground().GetContentScale();
264
265 ISize physical_window_size(
266 std::round(pimpl_->window_size.width * content_scale.x),
267 std::round(pimpl_->window_size.height * content_scale.y));
268 for (int i = 0; i < 2; ++i) {
269 auto display_list = callback();
270 auto texture =
271 DisplayListToTexture(display_list, physical_window_size, renderer);
272 screenshot = pimpl_->screenshotter->MakeScreenshot(renderer, texture);
273 }
274 return SaveScreenshot(std::move(screenshot));
275}
static bool SaveScreenshot(std::unique_ptr< testing::Screenshot > screenshot, const std::string &postfix="")
FlutterDesktopBinaryReply callback

References callback, impeller::DisplayListToTexture(), GetContext(), i, SaveScreenshot(), texture, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

◆ OpenPlaygroundHere() [3/5]

bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere ( const Playground::SinglePassCallback callback)

Renders callback into an offscreen render pass and saves the result as a golden image. The render target is single-sampled, uses the context's default color format, and has no depth or stencil attachment, so a pipeline built from PipelineBuilder<>::MakeDefaultPipelineDescriptor must be reduced to match by calling SetSampleCount(kCount1), ClearStencilAttachments(), and ClearDepthAttachment() on it. Calling only SetStencilAttachmentDescriptors(nullopt) leaves the stencil pixel format set and trips Metal's render pipeline validation.

Definition at line 282 of file golden_playground_test_mac.cc.

283 {
284 AiksContext renderer(GetContext(), typographer_context_);
285 std::shared_ptr<Context> context = GetContext();
286 Point content_scale =
287 pimpl_->screenshotter->GetPlayground().GetContentScale();
288 ISize size(std::round(pimpl_->window_size.width * content_scale.x),
289 std::round(pimpl_->window_size.height * content_scale.y));
290
291 std::unique_ptr<testing::Screenshot> screenshot;
292 // Render twice so the second pass observes warmed pipeline and resource
293 // caches, matching the display list path above.
294 for (int i = 0; i < 2; ++i) {
295 RenderTargetAllocator render_target_allocator(
296 context->GetResourceAllocator());
297 RenderTarget render_target = render_target_allocator.CreateOffscreen(
298 *context, size, /*mip_count=*/1, "Golden Render Pass",
300 /*stencil_attachment_config=*/std::nullopt);
301 if (!render_target.IsValid()) {
302 return false;
303 }
304 std::shared_ptr<CommandBuffer> command_buffer =
305 context->CreateCommandBuffer();
306 if (!command_buffer) {
307 return false;
308 }
309 std::shared_ptr<RenderPass> render_pass =
310 command_buffer->CreateRenderPass(render_target);
311 if (!render_pass) {
312 return false;
313 }
314 if (!callback(*render_pass)) {
315 return false;
316 }
317 if (!render_pass->EncodeCommands()) {
318 return false;
319 }
320 if (!context->GetCommandQueue()->Submit({command_buffer}).ok()) {
321 return false;
322 }
323 screenshot = pimpl_->screenshotter->MakeScreenshot(
324 renderer, render_target.GetRenderTargetTexture());
325 }
326 return SaveScreenshot(std::move(screenshot));
327}
static constexpr AttachmentConfig kDefaultColorAttachmentConfig
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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
std::shared_ptr< ContextGLES > context
std::shared_ptr< RenderPass > render_pass
std::shared_ptr< CommandBuffer > command_buffer

References callback, command_buffer, context, impeller::RenderTargetAllocator::CreateOffscreen(), GetContext(), impeller::RenderTarget::GetRenderTargetTexture(), i, impeller::RenderTarget::IsValid(), impeller::RenderTarget::kDefaultColorAttachmentConfig, render_pass, SaveScreenshot(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

◆ OpenPlaygroundHere() [4/5]

bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere ( const sk_sp< flutter::DisplayList > &  list)

Definition at line 277 of file golden_playground_test_mac.cc.

278 {
279 return OpenPlaygroundHere([&list]() { return list; });
280}
bool OpenPlaygroundHere(Picture picture)

References OpenPlaygroundHere().

◆ OpenPlaygroundHere() [5/5]

bool impeller::GoldenPlaygroundTest::OpenPlaygroundHere ( Picture  picture)

Referenced by OpenPlaygroundHere().

◆ RenderingSupportsMSAA()

bool impeller::GoldenPlaygroundTest::RenderingSupportsMSAA ( ) const
inlineprotected

Returns true if the rendering path supports MSAA rendering.

In the case of goldens, all tests are rendered to a non-MSAA backend.

Definition at line 121 of file golden_playground_test.h.

121{ return false; }

◆ SaveScreenshot()

bool impeller::GoldenPlaygroundTest::SaveScreenshot ( std::unique_ptr< testing::Screenshot screenshot,
const std::string &  postfix = "" 
)
static

Definition at line 133 of file golden_playground_test_mac.cc.

135 {
136 if (!screenshot || !screenshot->GetBytes()) {
137 FML_LOG(ERROR) << "Failed to collect screenshot for test " << GetTestName();
138 return false;
139 }
140 std::string test_name = GetTestName();
141 std::string filename = GetGoldenFilename(postfix);
143 test_name, filename, screenshot->GetWidth(), screenshot->GetHeight());
144 if (!screenshot->WriteToPNG(
146 FML_LOG(ERROR) << "Failed to write screenshot to " << filename;
147 return false;
148 }
149 return true;
150}
static GoldenDigest * Instance()
void AddImage(const std::string &test_name, const std::string &filename, int32_t width, int32_t height)
std::string GetFilenamePath(const std::string &filename) const
static WorkingDirectory * Instance()
#define FML_LOG(severity)
Definition logging.h:101

References impeller::testing::GoldenDigest::AddImage(), FML_LOG, impeller::testing::WorkingDirectory::GetFilenamePath(), impeller::testing::GoldenDigest::Instance(), and impeller::testing::WorkingDirectory::Instance().

Referenced by OpenPlaygroundHere(), and OpenPlaygroundHere().

◆ SetCapabilities()

fml::Status impeller::GoldenPlaygroundTest::SetCapabilities ( const std::shared_ptr< Capabilities > &  capabilities)

Definition at line 418 of file golden_playground_test_mac.cc.

419 {
420 return pimpl_->screenshotter->GetPlayground().SetCapabilities(capabilities);
421}

◆ SetEnableWriteGolden()

void impeller::GoldenPlaygroundTest::SetEnableWriteGolden ( bool  write_golden)

Sets a particular test to either write a golden or not.

For purposes of the GoldenPlayground test harness, we don't maintain a flag for this status, all tests are assumed to be golden tests and passing false here means we should just skip this test entirely (enforced in the implementation with a GTEST_SKIP).

Definition at line 440 of file golden_playground_test_mac.cc.

440 {
441 if (!write_golden) {
442 // If we don't write a golden, we really don't have anything to do.
443 GTEST_SKIP() << "Test does not want a golden image written";
444 }
445}

◆ SetTypographerContext()

void impeller::GoldenPlaygroundTest::SetTypographerContext ( std::shared_ptr< TypographerContext typographer_context)

Definition at line 165 of file golden_playground_test_mac.cc.

166 {
167 typographer_context_ = std::move(typographer_context);
168};

◆ SetUp()

void impeller::GoldenPlaygroundTest::SetUp ( )

Definition at line 189 of file golden_playground_test_mac.cc.

189 {
190 std::filesystem::path testing_assets_path =
192 std::filesystem::path target_path = testing_assets_path.parent_path()
193 .parent_path()
194 .parent_path()
195 .parent_path();
196 std::filesystem::path icd_path = target_path / "vk_swiftshader_icd.json";
197 setenv("VK_ICD_FILENAMES", icd_path.c_str(), 1);
198
199 std::string test_name = GetTestName();
200 PlaygroundSwitches switches;
201 switches.enable_wide_gamut =
202 test_name.find("WideGamut_") != std::string::npos;
203 switch (GetParam()) {
205 switches.flags.use_sdfs = true;
206 [[fallthrough]];
208 if (!DoesSupportWideGamutTests()) {
209 GTEST_SKIP()
210 << "This metal device doesn't support wide gamut golden tests.";
211 }
212 pimpl_->screenshotter =
213 std::make_unique<testing::MetalGoldenScreenshotter>(switches);
214 break;
216 if (switches.enable_wide_gamut) {
217 GTEST_SKIP() << "Vulkan doesn't support wide gamut golden tests.";
218 }
219 const std::unique_ptr<PlaygroundImpl>& playground =
220 GetSharedVulkanPlayground(/*enable_validations=*/true);
221 pimpl_->screenshotter =
222 std::make_unique<testing::VulkanGoldenScreenshotter>(playground);
223 break;
224 }
226 switches.flags.use_sdfs = true;
227 [[fallthrough]];
229 if (switches.enable_wide_gamut) {
230 GTEST_SKIP() << "OpenGLES doesn't support wide gamut golden tests.";
231 }
232 const std::unique_ptr<PlaygroundImpl>& playground =
233 GetSharedOpenGLESPlayground(switches.flags.use_sdfs);
234 ::glfwMakeContextCurrent(
235 reinterpret_cast<GLFWwindow*>(playground->GetWindowHandle()));
236 pimpl_->screenshotter =
237 std::make_unique<testing::VulkanGoldenScreenshotter>(playground);
238 break;
239 }
240 }
241
242 if (std::find(kSkipTests.begin(), kSkipTests.end(), test_name) !=
243 kSkipTests.end()) {
244 GTEST_SKIP()
245 << "GoldenPlaygroundTest doesn't support interactive playground tests "
246 "yet.";
247 }
248
250 "gpu_string", GetContext()->DescribeGpuModel());
251}
void AddDimension(const std::string &name, const std::string &value)
const char * GetTestingAssetsPath()
Returns the directory containing assets shared across all tests.
static const std::vector< std::string > kSkipTests

References impeller::testing::GoldenDigest::AddDimension(), impeller::PlaygroundSwitches::enable_wide_gamut, impeller::PlaygroundSwitches::flags, GetContext(), flutter::testing::GetTestingAssetsPath(), impeller::testing::GoldenDigest::Instance(), impeller::kMetal, impeller::kMetalSDF, impeller::kOpenGLES, impeller::kOpenGLESSDF, impeller::kSkipTests, impeller::kVulkan, and impeller::Flags::use_sdfs.

◆ SetWindowSize()

void impeller::GoldenPlaygroundTest::SetWindowSize ( ISize  size)
protected

Definition at line 80 of file golden_playground_test_stub.cc.

80{}

◆ TearDown()

void impeller::GoldenPlaygroundTest::TearDown ( )

Definition at line 170 of file golden_playground_test_mac.cc.

170 {
171 ASSERT_FALSE(dlopen("/usr/local/lib/libMoltenVK.dylib", RTLD_NOLOAD));
172
173 auto context = GetContext();
174 if (context) {
175 context->DisposeThreadLocalCachedResources();
176 }
177}

References context, and GetContext().


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