5#ifndef FLUTTER_SHELL_COMMON_SHELL_TEST_H_
6#define FLUTTER_SHELL_COMMON_SHELL_TEST_H_
8#include "flutter/shell/common/shell.h"
12#include "flutter/common/graphics/persistent_cache.h"
13#include "flutter/common/settings.h"
14#include "flutter/flow/layers/container_layer.h"
15#include "flutter/fml/build_config.h"
16#include "flutter/fml/macros.h"
17#include "flutter/fml/time/time_point.h"
18#include "flutter/lib/ui/volatile_path_tracker.h"
19#include "flutter/lib/ui/window/platform_message.h"
20#include "flutter/shell/common/run_configuration.h"
21#include "flutter/shell/common/shell_test_external_view_embedder.h"
22#include "flutter/shell/common/shell_test_platform_view.h"
23#include "flutter/shell/common/thread_host.h"
24#include "flutter/shell/common/vsync_waiters_test.h"
25#include "flutter/testing/elf_loader.h"
26#include "flutter/testing/fixture_test.h"
27#include "flutter/testing/test_dart_native_resolver.h"
82 std::optional<TaskRunners> task_runners = {});
92 std::unique_ptr<PlatformMessage>
message);
95 std::unique_ptr<PlatformMessage>
message);
117 std::unique_ptr<PointerDataPacket> packet);
150 rapidjson::Document* response);
160 const std::shared_ptr<VolatilePathTracker>& tracker);
Specifies all the configuration required by the runtime library to launch the root isolate....
std::map< std::string_view, std::string_view > ServiceProtocolMap
std::function< std::unique_ptr< T >(Shell &)> CreateCallback
static void PlatformViewNotifyDestroyed(Shell *shell)
void SendPlatformMessage(Shell *shell, std::unique_ptr< PlatformMessage > message)
static void PlatformViewNotifyCreated(Shell *shell)
static void PumpOneFrame(Shell *shell)
static bool IsAnimatorRunning(Shell *shell)
static void TurnOffGPU(Shell *shell, bool value)
static int UnreportedTimingsCount(Shell *shell)
static void RunEngine(Shell *shell, RunConfiguration configuration)
std::shared_ptr< txt::FontCollection > GetFontCollection(Shell *shell)
Settings CreateSettingsForFixture() override
@ kRenderFrameWithRasterStats
@ kEstimateRasterCacheMemory
TaskRunners GetTaskRunnersForFixture()
static void VSyncFlush(Shell *shell, bool *will_draw_new_frame=nullptr)
std::unique_ptr< Shell > CreateShell(const Settings &settings, std::optional< TaskRunners > task_runners={})
static void DispatchPointerData(Shell *shell, std::unique_ptr< PointerDataPacket > packet)
static bool GetNeedsReportTimings(Shell *shell)
static void RestartEngine(Shell *shell, RunConfiguration configuration)
void SendEnginePlatformMessage(Shell *shell, std::unique_ptr< PlatformMessage > message)
static void NotifyIdle(Shell *shell, fml::TimeDelta deadline)
fml::TimePoint GetLatestFrameTargetTime(Shell *shell) const
static void SetNeedsReportTimings(Shell *shell, bool value)
static size_t GetLiveTrackedPathCount(const std::shared_ptr< VolatilePathTracker > &tracker)
static void StorePersistentCache(PersistentCache *cache, const SkData &key, const SkData &value)
static void SetViewportMetrics(Shell *shell, double width, double height)
void DestroyShell(std::unique_ptr< Shell > shell)
static void DispatchFakePointerData(Shell *shell, double x)
static void OnServiceProtocol(Shell *shell, ServiceProtocolEnum some_protocol, const fml::RefPtr< fml::TaskRunner > &task_runner, const ServiceProtocol::Handler::ServiceProtocolMap ¶ms, rapidjson::Document *response)
const EmbeddedViewParams * params
Dart_NativeFunction function
std::function< void(std::shared_ptr< ContainerLayer > root)> LayerTreeBuilder
std::map< int64_t, ViewContent > FrameContent
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent cache
The collection of all the threads used by the engine.
const Settings & settings
Shell::CreateCallback< PlatformView > platform_view_create_callback
std::optional< TaskRunners > task_runners
static FrameContent ImplicitView(double width, double height, LayerTreeBuilder builder)
static FrameContent DummyView(double width=1, double height=1)
flutter::ViewportMetrics viewport_metrics
static FrameContent NoViews()