Flutter Engine
The Flutter Engine
|
#include <shell_test.h>
Classes | |
struct | Config |
Public Types | |
enum | ServiceProtocolEnum { kGetSkSLs , kEstimateRasterCacheMemory , kSetAssetBundlePath , kRunInView , kRenderFrameWithRasterStats } |
Public Member Functions | |
ShellTest () | |
Settings | CreateSettingsForFixture () override |
std::unique_ptr< Shell > | CreateShell (const Settings &settings, std::optional< TaskRunners > task_runners={}) |
std::unique_ptr< Shell > | CreateShell (const Config &config) |
void | DestroyShell (std::unique_ptr< Shell > shell) |
void | DestroyShell (std::unique_ptr< Shell > shell, const TaskRunners &task_runners) |
TaskRunners | GetTaskRunnersForFixture () |
fml::TimePoint | GetLatestFrameTargetTime (Shell *shell) const |
void | SendPlatformMessage (Shell *shell, std::unique_ptr< PlatformMessage > message) |
void | SendEnginePlatformMessage (Shell *shell, std::unique_ptr< PlatformMessage > message) |
std::shared_ptr< txt::FontCollection > | GetFontCollection (Shell *shell) |
Public Member Functions inherited from flutter::testing::FixtureTest | |
FixtureTest () | |
FixtureTest (std::string kernel_filename, std::string elf_filename, std::string elf_split_filename) | |
Public Member Functions inherited from flutter::testing::DartFixture | |
DartFixture () | |
DartFixture (std::string kernel_filename, std::string elf_filename, std::string elf_split_filename) | |
virtual Settings | CreateSettingsForFixture () |
void | AddNativeCallback (const std::string &name, Dart_NativeFunction callback) |
void | AddFfiNativeCallback (const std::string &name, void *callback_ptr) |
Public Member Functions inherited from flutter::testing::ThreadTest | |
ThreadTest () | |
fml::RefPtr< fml::TaskRunner > | GetCurrentTaskRunner () |
Get the task runner for the thread that the current unit-test is running on. This creates a message loop as necessary. More... | |
fml::RefPtr< fml::TaskRunner > | CreateNewThread (const std::string &name="") |
Creates a new thread, initializes a message loop on it, and, returns its task runner to the unit-test. The message loop is terminated (and its thread joined) when the test ends. This allows tests to create multiple named threads as necessary. More... | |
Static Public Member Functions | |
static void | PlatformViewNotifyCreated (Shell *shell) |
static void | PlatformViewNotifyDestroyed (Shell *shell) |
static void | RunEngine (Shell *shell, RunConfiguration configuration) |
static void | RestartEngine (Shell *shell, RunConfiguration configuration) |
static void | VSyncFlush (Shell *shell, bool *will_draw_new_frame=nullptr) |
static void | SetViewportMetrics (Shell *shell, double width, double height) |
static void | NotifyIdle (Shell *shell, fml::TimeDelta deadline) |
static void | PumpOneFrame (Shell *shell) |
static void | PumpOneFrame (Shell *shell, FrameContent frame_content) |
static void | DispatchFakePointerData (Shell *shell, double x) |
static void | DispatchPointerData (Shell *shell, std::unique_ptr< PointerDataPacket > packet) |
static bool | GetNeedsReportTimings (Shell *shell) |
static void | SetNeedsReportTimings (Shell *shell, bool value) |
static void | StorePersistentCache (PersistentCache *cache, const SkData &key, const SkData &value) |
static bool | IsAnimatorRunning (Shell *shell) |
static void | OnServiceProtocol (Shell *shell, ServiceProtocolEnum some_protocol, const fml::RefPtr< fml::TaskRunner > &task_runner, const ServiceProtocol::Handler::ServiceProtocolMap ¶ms, rapidjson::Document *response) |
static int | UnreportedTimingsCount (Shell *shell) |
static size_t | GetLiveTrackedPathCount (const std::shared_ptr< VolatilePathTracker > &tracker) |
static void | TurnOffGPU (Shell *shell, bool value) |
Additional Inherited Members | |
Protected Member Functions inherited from flutter::testing::DartFixture | |
void | SetSnapshotsAndAssets (Settings &settings) |
Protected Attributes inherited from flutter::testing::DartFixture | |
std::shared_ptr< TestDartNativeResolver > | native_resolver_ |
ELFAOTSymbols | split_aot_symbols_ |
std::string | kernel_filename_ |
std::string | elf_filename_ |
fml::UniqueFD | assets_dir_ |
ELFAOTSymbols | aot_symbols_ |
Definition at line 64 of file shell_test.h.
Enumerator | |
---|---|
kGetSkSLs | |
kEstimateRasterCacheMemory | |
kSetAssetBundlePath | |
kRunInView | |
kRenderFrameWithRasterStats |
Definition at line 134 of file shell_test.h.
flutter::testing::ShellTest::ShellTest | ( | ) |
Definition at line 58 of file shell_test.cc.
|
overridevirtual |
Reimplemented from flutter::testing::DartFixture.
Definition at line 336 of file shell_test.cc.
Definition at line 378 of file shell_test.cc.
std::unique_ptr< Shell > flutter::testing::ShellTest::CreateShell | ( | const Settings & | settings, |
std::optional< TaskRunners > | task_runners = {} |
||
) |
Definition at line 369 of file shell_test.cc.
void flutter::testing::ShellTest::DestroyShell | ( | std::unique_ptr< Shell > | shell | ) |
Definition at line 400 of file shell_test.cc.
void flutter::testing::ShellTest::DestroyShell | ( | std::unique_ptr< Shell > | shell, |
const TaskRunners & | task_runners | ||
) |
Definition at line 404 of file shell_test.cc.
|
static |
Definition at line 261 of file shell_test.cc.
|
static |
Definition at line 270 of file shell_test.cc.
std::shared_ptr< txt::FontCollection > flutter::testing::ShellTest::GetFontCollection | ( | Shell * | shell | ) |
Definition at line 331 of file shell_test.cc.
fml::TimePoint flutter::testing::ShellTest::GetLatestFrameTargetTime | ( | Shell * | shell | ) | const |
Definition at line 365 of file shell_test.cc.
|
static |
Definition at line 415 of file shell_test.cc.
|
static |
Definition at line 290 of file shell_test.cc.
TaskRunners flutter::testing::ShellTest::GetTaskRunnersForFixture | ( | ) |
Definition at line 355 of file shell_test.cc.
|
static |
|
static |
Definition at line 199 of file shell_test.cc.
|
static |
Definition at line 300 of file shell_test.cc.
|
static |
Definition at line 84 of file shell_test.cc.
|
static |
Definition at line 94 of file shell_test.cc.
|
static |
Definition at line 211 of file shell_test.cc.
|
static |
Definition at line 215 of file shell_test.cc.
|
static |
Definition at line 118 of file shell_test.cc.
|
static |
Definition at line 104 of file shell_test.cc.
void flutter::testing::ShellTest::SendEnginePlatformMessage | ( | Shell * | shell, |
std::unique_ptr< PlatformMessage > | message | ||
) |
Definition at line 68 of file shell_test.cc.
void flutter::testing::ShellTest::SendPlatformMessage | ( | Shell * | shell, |
std::unique_ptr< PlatformMessage > | message | ||
) |
Definition at line 63 of file shell_test.cc.
|
static |
Definition at line 286 of file shell_test.cc.
|
static |
Definition at line 154 of file shell_test.cc.
|
static |
Definition at line 294 of file shell_test.cc.
|
static |
Definition at line 424 of file shell_test.cc.
Definition at line 282 of file shell_test.cc.
|
static |
Issue as many VSYNC as needed to flush the UI tasks so far, and reset the content of will_draw_new_frame
to true if it's not nullptr.
Definition at line 128 of file shell_test.cc.