Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
embedder_unittests_util.h File Reference
#include <future>
#include <utility>
#include "flutter/fml/mapping.h"
#include "flutter/fml/message_loop.h"
#include "flutter/fml/paths.h"
#include "flutter/shell/platform/embedder/tests/embedder_assertions.h"
#include "flutter/shell/platform/embedder/tests/embedder_config_builder.h"
#include "flutter/shell/platform/embedder/tests/embedder_test.h"
#include "third_party/skia/include/core/SkSurface.h"

Go to the source code of this file.

Classes

class  flutter::testing::EmbedderTestTaskRunner
 A task runner that we expect the embedder to provide but whose implementation is a real FML task runner. More...
 

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Macros

#define FML_USED_ON_EMBEDDER
 

Functions

sk_sp< SkSurfaceflutter::testing::CreateRenderSurface (const FlutterLayer &layer, GrDirectContext *context)
 
bool flutter::testing::RasterImagesAreSame (const sk_sp< SkImage > &a, const sk_sp< SkImage > &b)
 
std::string flutter::testing::FixtureNameForBackend (EmbedderTestContextType backend, const std::string &name)
 Prepends a prefix to the name which is unique to the test context type. This is useful for tests that use EmbedderTestMultiBackend and require different fixtures per backend. For OpenGL, the name remains unchanged.
 
EmbedderTestBackingStoreProducer::RenderTargetType flutter::testing::GetRenderTargetFromBackend (EmbedderTestContextType backend, bool opengl_framebuffer)
 Resolves a render target type for a given backend description. This is useful for tests that use EmbedderTestMultiBackend.
 
void flutter::testing::ConfigureBackingStore (FlutterBackingStore &backing_store, EmbedderTestContextType backend, bool opengl_framebuffer)
 Configures per-backend properties for a given backing store.
 
bool flutter::testing::WriteImageToDisk (const fml::UniqueFD &directory, const std::string &name, const sk_sp< SkImage > &image)
 
bool flutter::testing::ImageMatchesFixture (const std::string &fixture_file_name, const sk_sp< SkImage > &scene_image)
 
bool flutter::testing::ImageMatchesFixture (const std::string &fixture_file_name, std::future< sk_sp< SkImage > > &scene_image)
 
bool flutter::testing::SurfacePixelDataMatchesBytes (SkSurface *surface, const std::vector< uint8_t > &bytes)
 
bool flutter::testing::SurfacePixelDataMatchesBytes (std::future< SkSurface * > &surface_future, const std::vector< uint8_t > &bytes)
 
void flutter::testing::FilterMutationsByType (const FlutterPlatformViewMutation **mutations, size_t count, FlutterPlatformViewMutationType type, const std::function< void(const FlutterPlatformViewMutation &mutation)> &handler)
 
void flutter::testing::FilterMutationsByType (const FlutterPlatformView *view, FlutterPlatformViewMutationType type, const std::function< void(const FlutterPlatformViewMutation &mutation)> &handler)
 
SkMatrix flutter::testing::GetTotalMutationTransformationMatrix (const FlutterPlatformViewMutation **mutations, size_t count)
 
SkMatrix flutter::testing::GetTotalMutationTransformationMatrix (const FlutterPlatformView *view)
 

Macro Definition Documentation

◆ FML_USED_ON_EMBEDDER

#define FML_USED_ON_EMBEDDER

Definition at line 8 of file embedder_unittests_util.h.