diff --git a/shell/common/animator.h b/shell/common/animator.h index 32c02f789fe0a..9f84468c01b78 100644 --- a/shell/common/animator.h +++ b/shell/common/animator.h @@ -22,6 +22,10 @@ namespace testing { class ShellTest; } +/// Executor of animations. +/// +/// In conjunction with the |VsyncWaiter| it allows callers (typically Dart +/// code) to schedule work that ends up generating a |LayerTree|. class Animator final { public: class Delegate { diff --git a/shell/common/engine.h b/shell/common/engine.h index 1a84f9f4216f3..293d78c1a7178 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -29,6 +29,9 @@ namespace flutter { +/// Manager of the root Dart isolate and the relay of platform messages. +/// +/// Also setups up dart::ui bindings and handles restarts. class Engine final : public RuntimeDelegate { public: // Used by Engine::Run diff --git a/shell/common/isolate_configuration.h b/shell/common/isolate_configuration.h index a6db9edb69f43..88833df7faf23 100644 --- a/shell/common/isolate_configuration.h +++ b/shell/common/isolate_configuration.h @@ -19,6 +19,7 @@ namespace flutter { +/// Abstract Base Class that will configure a |DartIsolate|. class IsolateConfiguration { public: static std::unique_ptr InferFromSettings( diff --git a/shell/common/persistent_cache.h b/shell/common/persistent_cache.h index f26e819e81aa7..4c7d65d95b15c 100644 --- a/shell/common/persistent_cache.h +++ b/shell/common/persistent_cache.h @@ -17,6 +17,9 @@ namespace flutter { +/// A cache of SkData that gets stored to disk. +/// +/// This is mainly used for Shaders but is also written to by Dart. class PersistentCache : public GrContextOptions::PersistentCache { public: // Mutable static switch that can be set before GetCacheForProcess. If true, diff --git a/shell/common/pipeline.h b/shell/common/pipeline.h index cf959eaa20012..247368b71718d 100644 --- a/shell/common/pipeline.h +++ b/shell/common/pipeline.h @@ -24,6 +24,8 @@ enum class PipelineConsumeResult { size_t GetNextPipelineTraceID(); +/// A thread-safe queue of resources for a single consumer and a single +/// producer. template class Pipeline : public fml::RefCountedThreadSafe> { public: diff --git a/shell/common/platform_view.h b/shell/common/platform_view.h index c8e44836afec9..7965975249a50 100644 --- a/shell/common/platform_view.h +++ b/shell/common/platform_view.h @@ -25,6 +25,8 @@ namespace flutter { class Shell; +/// Abstract Base Class that represents the platform specific view we will be +/// rendering to. class PlatformView { public: class Delegate { diff --git a/shell/common/rasterizer.h b/shell/common/rasterizer.h index 7d525816da73a..b9fc92d11834b 100644 --- a/shell/common/rasterizer.h +++ b/shell/common/rasterizer.h @@ -20,6 +20,7 @@ namespace flutter { +/// Takes |LayerTree|s and draws its contents. class Rasterizer final : public SnapshotDelegate { public: class Delegate { diff --git a/shell/common/run_configuration.h b/shell/common/run_configuration.h index a8b3a8b6e72f1..d5dfd29e0b92e 100644 --- a/shell/common/run_configuration.h +++ b/shell/common/run_configuration.h @@ -18,6 +18,9 @@ namespace flutter { +/// Configuration pertaining to how we will execute the Dart code. +/// +/// For example: what will be the first function we execute (entrypoint). class RunConfiguration { public: static RunConfiguration InferFromSettings( diff --git a/shell/common/shell.h b/shell/common/shell.h index a226761ff2ef1..a05ff47e897f8 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -34,6 +34,8 @@ namespace flutter { +/// Wraps up all the different components of Flutter engine and coordinates them +/// through a series of delegates. class Shell final : public PlatformView::Delegate, public Animator::Delegate, public Engine::Delegate, diff --git a/shell/common/surface.h b/shell/common/surface.h index 06bebed09c51f..7bbc16e24c690 100644 --- a/shell/common/surface.h +++ b/shell/common/surface.h @@ -41,6 +41,7 @@ class SurfaceFrame { FML_DISALLOW_COPY_AND_ASSIGN(SurfaceFrame); }; +/// Abstract Base Class that represents where we will be rendering content. class Surface { public: Surface(); diff --git a/shell/common/thread_host.h b/shell/common/thread_host.h index 93f42a90861e8..b5e14e6fa6bf8 100644 --- a/shell/common/thread_host.h +++ b/shell/common/thread_host.h @@ -12,6 +12,7 @@ namespace flutter { +/// The collection of all the threads used by the engine. struct ThreadHost { enum Type { Platform = 1 << 0, diff --git a/shell/common/vsync_waiter.h b/shell/common/vsync_waiter.h index 3d2cd7aca8a0c..5e80dd4c09c6b 100644 --- a/shell/common/vsync_waiter.h +++ b/shell/common/vsync_waiter.h @@ -15,6 +15,8 @@ namespace flutter { +/// Abstract Base Class that represents a platform specific mechanism for +/// getting callbacks when a vsync event happens. class VsyncWaiter : public std::enable_shared_from_this { public: using Callback = std::function