Fixed a few typos in comments (flutter/engine#33062)

This commit is contained in:
hellohuanlin 2022-05-02 18:59:04 -07:00 committed by GitHub
parent c32bd5d9d1
commit 37048bc2f9
5 changed files with 13 additions and 13 deletions

View File

@ -24,7 +24,7 @@ namespace flutter {
class LayerTree;
enum class RasterStatus {
// Frame has successfully rasterized.
// Frame has been successfully rasterized.
kSuccess,
// Frame is submitted twice. This is only used on Android when
// switching the background surface to FlutterImageView.
@ -77,8 +77,8 @@ class FrameDamage {
}
// Calculates clip rect for current rasterization. This is diff of layer tree
// and previous layer tree + any additional provideddamage.
// If previous layer tree is not specified, clip rect will be nulloptional,
// and previous layer tree + any additional provided damage.
// If previous layer tree is not specified, clip rect will be nullopt,
// but the paint region of layer_tree will be calculated so that it can be
// used for diffing of subsequent frames.
std::optional<SkRect> ComputeClipRect(flutter::LayerTree& layer_tree);

View File

@ -94,7 +94,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
/// It is up to the caller to decide to re-purpose the running isolate,
/// terminate it, or use another shell to host the new isolate. This is
/// mostly used by embedders which have a fire-and-forget strategy to root
/// isolate launch. For example, the application may try to "launch" and
/// isolate launch. For example, the application may try to "launch" an
/// isolate when the embedders launches or resumes from a paused state. That
/// the isolate is running is not necessarily a failure condition for them.
/// But from the engine's perspective, the run configuration was rejected.
@ -111,7 +111,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
/// of sub-components. The engine will attempt to log the same when
/// possible. With the aid of logs, the common causes of failure are:
///
/// * AOT assets give to JIT/DBC mode VM's and vice-versa.
/// * AOT assets were given to JIT/DBC mode VM's and vice-versa.
/// * The assets could not be found in the asset manager. Callers must make
/// sure their run configuration asset managers have been correctly set
/// up.
@ -150,7 +150,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
/// platform task runner while the engine is running on the UI
/// task runner.
///
/// @see `SemanticsNode`, `SemticsNodeUpdates`,
/// @see `SemanticsNode`, `SemanticsNodeUpdates`,
/// `CustomAccessibilityActionUpdates`,
/// `PlatformView::UpdateSemantics`
///
@ -480,7 +480,8 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
/// The following (mis)behavior in the functioning of the method
/// will cause the jank in the Flutter application:
/// * The time taken by this method to create a layer-tree exceeds
/// on frame interval (for example, 16.66 ms on a 60Hz display).
/// one frame interval (for example, 16.66 ms on a 60Hz
/// display).
/// * The time take by this method to generate a new layer-tree
/// causes the current layer-tree pipeline depth to change. To
/// illustrate this point, note that maximum pipeline depth used
@ -591,7 +592,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate {
Dart_Port GetUIIsolateMainPort();
//----------------------------------------------------------------------------
/// @brief Gets the debug name of the root isolate. But default, the
/// @brief Gets the debug name of the root isolate. By default, the
/// debug name of the isolate is derived from its advisory script
/// URI, advisory main entrypoint and its main port name. For
/// example, "main.dart$main-1234" where the script URI is

View File

@ -629,8 +629,7 @@ class PlatformView {
//--------------------------------------------------------------------------
/// @brief Used by the embedder to notify the rasterizer that it will
/// no
/// longer attempt to composite the specified texture within
/// no longer attempt to composite the specified texture within
/// the layer tree. This allows the rasterizer to collect
/// associated resources.
///
@ -821,7 +820,7 @@ class PlatformView {
/// @details If this returns `null` that means PlatformMessages should be sent
/// to the PlatformView. That is to protect legacy behavior, any embedder
/// that wants to support executing Platform Channel handlers on background
/// threads should be returing a thread-safe PlatformMessageHandler instead.
/// threads should be returning a thread-safe PlatformMessageHandler instead.
virtual std::shared_ptr<PlatformMessageHandler> GetPlatformMessageHandler()
const;

View File

@ -108,7 +108,7 @@ class DefaultPointerDataDispatcher : public PointerDataDispatcher {
///
/// It works as follows:
///
/// When `DispatchPacket` is called while a preivous pointer data dispatch is
/// When `DispatchPacket` is called while a previous pointer data dispatch is
/// still in progress (its frame isn't finished yet), it means that an input
/// event is delivered to us too fast. That potentially means a later event will
/// be too late which could cause the missing of a frame. Hence we'll cache it

View File

@ -327,7 +327,7 @@ class Shell final : public PlatformView::Delegate,
//----------------------------------------------------------------------------
/// @brief Used by embedders to reload the system fonts in
/// FontCollection.
/// FontCollection.
/// It also clears the cached font families and send system
/// channel message to framework to rebuild affected widgets.
///