未验证 提交 2441c476 编写于 作者: C Chris Bracken 提交者: GitHub

Correct setup-related typos (#24846)

Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
上级 6527a68c
This directory includes scripts to build the docker container image used for
building flutter/engine in our CI system (currently [Cirrus](cirrus-ci.org)).
In order to run the scripts, you have to setup `docker` and `gcloud`. Please
refer to internal doc go/installdocker for how to setup `docker` on gLinux.
In order to run the scripts, you have to set up `docker` and `gcloud`. Please
refer to internal doc go/installdocker for how to set up `docker` on gLinux.
Cirrus will build (and cache) a Docker image based on this `Dockerfile` for
Linux tasks using its
......
......@@ -24,6 +24,6 @@ In order to **build** and **run** the example you should be able to go into this
## Troubleshooting
There are a few things you might have to tweak in order to get your build working:
* Flutter Engine Location - Inside the `CMakeList.txt` file you will see that it is setup to search for the header and library for the Flutter Engine in specific locations, those might not be the location of your Flutter Engine.
* Flutter Engine Location - Inside the `CMakeList.txt` file you will see that it is set up to search for the header and library for the Flutter Engine in specific locations, those might not be the location of your Flutter Engine.
* Pixel Ratio - If the project runs but is drawing at the wrong scale you may have to tweak the `kPixelRatio` variable in `FlutterEmbedderGLFW.cc` file.
* GLFW Location - Inside the `CMakeLists.txt` we are searching for the GLFW library, if CMake can't find it you may have to edit that.
......@@ -88,7 +88,7 @@ FileMapping::FileMapping(const fml::UniqueFD& fd,
MapViewOfFile(mapping_handle_.get(), desired_access, 0, 0, mapping_size));
if (mapping == nullptr) {
FML_DLOG(ERROR) << "Could not setup file mapping. "
FML_DLOG(ERROR) << "Could not set up file mapping. "
<< GetLastErrorMessage();
return;
}
......
......@@ -236,7 +236,7 @@ class _Channel {
/// Messages for a channel are stored until a listener is provided for that channel,
/// using [setListener]. Only one listener may be configured per channel.
///
/// Typically these buffers are drained once a callback is setup on
/// Typically these buffers are drained once a callback is set up on
/// the [BinaryMessenger] in the Flutter framework. (See [setListener].)
///
/// ## Buffer capacity and overflow
......@@ -381,7 +381,7 @@ class ChannelBuffers {
/// Remove and process all stored messages for a given channel.
///
/// This should be called once a channel is prepared to handle messages
/// (i.e. when a message handler is setup in the framework).
/// (i.e. when a message handler is set up in the framework).
///
/// The messages are processed by calling the given `callback`. Each message
/// is processed in its own microtask.
......
......@@ -40,7 +40,7 @@ class TestIOManager final : public IOManager {
weak_factory_(this) {
FML_CHECK(task_runner->RunsTasksOnCurrentThread())
<< "The IO manager must be initialized its primary task runner. The "
"test harness may not be setup correctly/safely.";
"test harness may not be set up correctly/safely.";
weak_prototype_ = weak_factory_.GetWeakPtr();
}
......
......@@ -172,7 +172,7 @@ sk_sp<SkData> CopyImageByteData(sk_sp<SkImage> raster_image,
color_type, kPremul_SkAlphaType, nullptr));
if (!surface) {
FML_LOG(ERROR) << "Could not setup the surface for swizzle.";
FML_LOG(ERROR) << "Could not set up the surface for swizzle.";
return nullptr;
}
......
......@@ -351,7 +351,7 @@ class IntegrationTestsManager {
print('ERROR: Test driver file named has ${expectedDriverName} '
'not found under directory ${testDirectory.path}. Stopping the '
'integration tests. Please add ${expectedDriverName}. Check to '
'README file on more details on how to setup integration tests.');
'README file on more details on how to set up integration tests.');
}
throw StateError('Error in test files. Check the logs for '
'further instructions');
......
......@@ -454,7 +454,7 @@ flt-glass-pane * {
if (html.window.visualViewport == null && isWebKit) {
// Safari sometimes gives us bogus innerWidth/innerHeight values when the
// page loads. When it changes the values to correct ones it does not
// notify of the change via `onResize`. As a workaround, we setup a
// notify of the change via `onResize`. As a workaround, we set up a
// temporary periodic timer that polls innerWidth and triggers the
// resizeListener so that the framework can react to the change.
//
......@@ -464,7 +464,7 @@ flt-glass-pane * {
// VisualViewport API is not enabled in Firefox as well. On the other hand
// Firefox returns correct values for innerHeight, innerWidth.
// Firefox also triggers html.window.onResize therefore we don't need this
// timer setup for Firefox.
// timer to be set up for Firefox.
final int initialInnerWidth = html.window.innerWidth!;
// Counts how many times we checked screen size. We check up to 5 times.
int checkCount = 0;
......
......@@ -217,8 +217,8 @@ class SingleEntryBrowserHistory extends BrowserHistory {
if (!_isFlutterEntry(html.window.history.state)) {
// An entry may not have come from Flutter, for example, when the user
// refreshes the page. They land directly on the "flutter" entry, so
// there's no need to setup the "origin" and "flutter" entries, we can
// safely assume they are already setup.
// there's no need to set up the "origin" and "flutter" entries, we can
// safely assume they are already set up.
_setupOriginEntry(strategy);
_setupFlutterEntry(strategy, replace: false, path: path);
}
......
......@@ -70,7 +70,7 @@ class RulerManager extends RulerHost {
/// The cache of rulers used to measure text.
///
/// Each ruler is keyed by paragraph style. This allows us to setup the
/// Each ruler is keyed by paragraph style. This allows us to set up the
/// ruler's DOM structure once during the very first measurement of a given
/// paragraph style. Subsequent measurements could reuse the same ruler and
/// only swap the text contents. This minimizes the amount of work a browser
......
......@@ -361,7 +361,7 @@ class TextDimensions {
_invalidateBoundsCache();
}
/// Appends element and probe to hostElement that is setup for a specific
/// Appends element and probe to hostElement that is set up for a specific
/// TextStyle.
void appendToHost(html.HtmlElement hostElement) {
hostElement.append(_element);
......
......@@ -60,7 +60,7 @@ void testMain() {
// There should be two entries: origin and flutter.
expect(strategy.history, hasLength(2));
// The origin entry is setup but its path should remain unchanged.
// The origin entry is set up but its path should remain unchanged.
final TestHistoryEntry originEntry = strategy.history[0];
expect(originEntry.state, _wrapOriginState('initial state'));
expect(originEntry.url, '/initial');
......
......@@ -1076,9 +1076,10 @@ bool DartIsolate::InitializeIsolate(
return false;
}
// Root isolates will be setup by the engine and the service isolate (which is
// also a root isolate) by the utility routines in the VM. However, secondary
// isolates will be run by the VM if they are marked as runnable.
// Root isolates will be set up by the engine and the service isolate
// (which is also a root isolate) by the utility routines in the VM.
// However, secondary isolates will be run by the VM if they are
// marked as runnable.
if (!embedder_isolate->IsRootIsolate()) {
auto child_isolate_preparer =
embedder_isolate->GetIsolateGroupData().GetChildIsolatePreparer();
......
......@@ -254,7 +254,7 @@ std::shared_ptr<DartVM> DartVM::Create(
);
if (!vm_data) {
FML_LOG(ERROR) << "Could not setup VM data to bootstrap the VM from.";
FML_LOG(ERROR) << "Could not set up VM data to bootstrap the VM from.";
return {};
}
......
......@@ -429,7 +429,7 @@ bool RuntimeController::LaunchRootIsolate(
tonic::DartState::Scope scope(strong_root_isolate);
platform_configuration->DidCreateIsolate();
if (!FlushRuntimeStateToIsolate()) {
FML_DLOG(ERROR) << "Could not setup initial isolate state.";
FML_DLOG(ERROR) << "Could not set up initial isolate state.";
}
} else {
FML_DCHECK(false) << "RuntimeController created without window binding.";
......
......@@ -115,7 +115,8 @@ class Engine final : public RuntimeDelegate,
///
/// * AOT assets give 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 setup.
/// sure their run configuration asset managers have been correctly set
/// up.
/// * The assets themselves were corrupt or invalid. Callers must make sure
/// their asset delivery mechanisms are sound.
/// * The application entry-point or the root library of the entry-point
......
......@@ -95,7 +95,7 @@ void PlatformView::NotifyDestroyed() {
}
sk_sp<GrDirectContext> PlatformView::CreateResourceContext() const {
FML_DLOG(WARNING) << "This platform does not setup the resource "
FML_DLOG(WARNING) << "This platform does not set up the resource "
"context on the IO thread for async texture uploads.";
return nullptr;
}
......
......@@ -60,7 +60,7 @@ class PlatformView {
/// with the given render surface. This surface is platform
/// (iOS, Android) and client-rendering API (OpenGL, Software,
/// Metal, Vulkan) specific. This is usually a sign to the
/// rasterizer to setup and begin rendering to that surface.
/// rasterizer to set up and begin rendering to that surface.
///
/// @param[in] surface The surface
///
......
......@@ -119,7 +119,7 @@ class Rasterizer final : public SnapshotDelegate {
//----------------------------------------------------------------------------
/// @brief Destroys the rasterizer. This must happen on the raster task
/// runner. All GPU resources are collected before this call
/// returns. Any context setup by the embedder to hold these
/// returns. Any context set up by the embedder to hold these
/// resources can be immediately collected as well.
///
~Rasterizer();
......@@ -132,7 +132,7 @@ class Rasterizer final : public SnapshotDelegate {
/// call. No rendering may occur before this call. The surface is
/// held till the balancing call to `Rasterizer::Teardown` is
/// made. Calling a setup before tearing down the previous surface
/// (if this is not the first time the surface has been setup) is
/// (if this is not the first time the surface has been set up) is
/// user error.
///
/// @see `Rasterizer::Teardown`
......@@ -142,7 +142,7 @@ class Rasterizer final : public SnapshotDelegate {
void Setup(std::unique_ptr<Surface> surface);
//----------------------------------------------------------------------------
/// @brief Releases the previously setup on-screen render surface and
/// @brief Releases the previously set up on-screen render surface and
/// collects associated resources. No more rendering may occur
/// till the next call to `Rasterizer::Setup` with a new render
/// surface. Calling a teardown without a setup is user error.
......
......@@ -79,7 +79,7 @@ void Tokenize(const std::string& input,
}
// Though there can be multiple shells, some settings apply to all components in
// the process. These have to be setup before the shell or any of its
// the process. These have to be set up before the shell or any of its
// sub-components can be initialized. In a perfect world, this would be empty.
// TODO(chinmaygarde): The unfortunate side effect of this call is that settings
// that cause shell initialization failures will still lead to some of their
......
......@@ -263,10 +263,10 @@ class Shell final : public PlatformView::Delegate,
/// @brief Used by embedders to check if all shell subcomponents are
/// initialized. It is the embedder's responsibility to make this
/// call before accessing any other shell method. A shell that is
/// not setup must be discarded and another one created with
/// not set up must be discarded and another one created with
/// updated settings.
///
/// @return Returns if the shell has been setup. Once set up, this does
/// @return Returns if the shell has been set up. Once set up, this does
/// not change for the life-cycle of the shell.
///
bool IsSetup() const;
......
......@@ -32,7 +32,7 @@ static void StartupAndShutdownShell(benchmark::State& state,
aot_symbols = testing::LoadELFSymbolFromFixturesIfNeccessary();
FML_CHECK(
testing::PrepareSettingsForAOTWithSymbols(settings, aot_symbols))
<< "Could not setup settings with AOT symbols.";
<< "Could not set up settings with AOT symbols.";
} else {
settings.application_kernels = [&]() {
std::vector<std::unique_ptr<const fml::Mapping>> kernel_mappings;
......
......@@ -78,9 +78,9 @@ ShellTestPlatformViewVulkan::OffScreenSurface::OffScreenSurface(
VK_MAKE_VERSION(1, 1, 0), true);
if (!application_->IsValid() || !vk_->AreInstanceProcsSetup()) {
// Make certain the application instance was created and it setup the
// Make certain the application instance was created and it set up the
// instance proc table entries.
FML_DLOG(ERROR) << "Instance proc addresses have not been setup.";
FML_DLOG(ERROR) << "Instance proc addresses have not been set up.";
return;
}
......@@ -90,9 +90,9 @@ ShellTestPlatformViewVulkan::OffScreenSurface::OffScreenSurface(
if (logical_device_ == nullptr || !logical_device_->IsValid() ||
!vk_->AreDeviceProcsSetup()) {
// Make certain the device was created and it setup the device proc table
// Make certain the device was created and it set up the device proc table
// entries.
FML_DLOG(ERROR) << "Device proc addresses have not been setup.";
FML_DLOG(ERROR) << "Device proc addresses have not been set up.";
return;
}
......
......@@ -39,7 +39,7 @@ sk_sp<GrDirectContext> GPUSurfaceGL::MakeGLContext(
auto context_switch = delegate->GLContextMakeCurrent();
if (!context_switch->GetResult()) {
FML_LOG(ERROR)
<< "Could not make the context current to setup the gr context.";
<< "Could not make the context current to set up the Gr context.";
return nullptr;
}
......@@ -64,7 +64,7 @@ sk_sp<GrDirectContext> GPUSurfaceGL::MakeGLContext(
auto context = GrDirectContext::MakeGL(delegate->GetGLInterface(), options);
if (!context) {
FML_LOG(ERROR) << "Failed to setup Skia Gr context.";
FML_LOG(ERROR) << "Failed to set up Skia Gr context.";
return nullptr;
}
......@@ -99,7 +99,7 @@ GPUSurfaceGL::GPUSurfaceGL(sk_sp<GrDirectContext> gr_context,
auto context_switch = delegate_->GLContextMakeCurrent();
if (!context_switch->GetResult()) {
FML_LOG(ERROR)
<< "Could not make the context current to setup the gr context.";
<< "Could not make the context current to set up the Gr context.";
return;
}
......@@ -168,7 +168,7 @@ static sk_sp<SkSurface> WrapOnscreenSurface(GrDirectContext* context,
SkSurfaceProps surface_props(0, kUnknown_SkPixelGeometry);
return SkSurface::MakeFromBackendRenderTarget(
context, // gr context
context, // Gr context
render_target, // render target
GrSurfaceOrigin::kBottomLeft_GrSurfaceOrigin, // origin
color_type, // color type
......
......@@ -36,7 +36,7 @@ std::shared_ptr<OverlayLayer> SurfacePool::GetLayer(
surface_factory->CreateSurface();
FML_CHECK(android_surface && android_surface->IsValid())
<< "Could not create an OpenGL, Vulkan or Software surface to setup "
<< "Could not create an OpenGL, Vulkan or Software surface to set up "
"rendering.";
std::unique_ptr<PlatformViewAndroidJNI::OverlayMetadata> java_metadata =
......
......@@ -357,8 +357,8 @@ public class FlutterJNI {
*
* <p>This method must not be invoked if {@code FlutterJNI} is not already attached to native.
*
* <p>Invoking this method will result in the release of all native-side resources that were setup
* during {@link #attachToNative(boolean)} or {@link #spawn(String, String)}, or accumulated
* <p>Invoking this method will result in the release of all native-side resources that were set
* up during {@link #attachToNative(boolean)} or {@link #spawn(String, String)}, or accumulated
* thereafter.
*
* <p>It is permissable to re-attach this instance to native after detaching it from native.
......
......@@ -106,8 +106,8 @@ public final class BasicMessageChannel<T> {
/**
* Adjusts the number of messages that will get buffered when sending messages to channels that
* aren't fully setup yet. For example, the engine isn't running yet or the channel's message
* handler isn't setup on the Dart side yet.
* aren't fully set up yet. For example, the engine isn't running yet or the channel's message
* handler isn't set up on the Dart side yet.
*/
public void resizeChannelBuffer(int newSize) {
resizeChannelBuffer(messenger, name, newSize);
......
......@@ -88,7 +88,7 @@ public final class EventChannel {
}
/**
* Handler of stream setup and tear-down requests.
* Handler of stream setup and teardown requests.
*
* <p>Implementations must be prepared to accept sequences of alternating calls to {@link
* #onListen(Object, EventSink)} and {@link #onCancel(Object)}. Implementations should ideally
......
......@@ -122,8 +122,8 @@ public class MethodChannel {
/**
* Adjusts the number of messages that will get buffered when sending messages to channels that
* aren't fully setup yet. For example, the engine isn't running yet or the channel's message
* handler isn't setup on the Dart side yet.
* aren't fully set up yet. For example, the engine isn't running yet or the channel's message
* handler isn't set up on the Dart side yet.
*/
public void resizeChannelBuffer(int newSize) {
BasicMessageChannel.resizeChannelBuffer(messenger, name, newSize);
......
......@@ -601,7 +601,7 @@ public class TextInputPlugin implements ListenableEditingState.EditingStateWatch
// -------- Start: Autofill -------
// ### Setup and provide the initial text values and hints.
//
// The TextInputConfiguration used to setup the current client is also used for populating
// The TextInputConfiguration used to set up the current client is also used for populating
// "AutofillVirtualStructure" when requested by the autofill manager (AFM), See
// #onProvideAutofillVirtualStructure.
//
......
......@@ -430,7 +430,7 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
* controller. This should be the context of the Activity hosting the Flutter application.
* @param textureRegistry The texture registry which provides the output textures into which the
* embedded views will be rendered.
* @param dartExecutor The dart execution context, which is used to setup a system channel.
* @param dartExecutor The dart execution context, which is used to set up a system channel.
*/
public void attach(
Context context, TextureRegistry textureRegistry, @NonNull DartExecutor dartExecutor) {
......
......@@ -214,7 +214,7 @@ public class FlutterView extends SurfaceView
systemChannel = new SystemChannel(dartExecutor);
settingsChannel = new SettingsChannel(dartExecutor);
// Create and setup plugins
// Create and set up plugins
PlatformPlugin platformPlugin = new PlatformPlugin(activity, platformChannel);
addActivityLifecycleListener(
new ActivityLifecycleListener() {
......
......@@ -117,7 +117,7 @@ std::unique_ptr<AndroidSurface> PlatformViewAndroid::MakeSurface(
auto surface = surface_factory->CreateSurface();
FML_CHECK(surface && surface->IsValid())
<< "Could not create an OpenGL, Vulkan or Software surface to setup "
<< "Could not create an OpenGL, Vulkan or Software surface to set up "
"rendering.";
return surface;
}
......
......@@ -402,7 +402,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and inform our delegate that the back button was pressed.
......@@ -418,7 +418,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and call the method that we expect to be forwarded.
......@@ -446,7 +446,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate app start.
delegate.onStart();
......@@ -473,7 +473,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate app start.
delegate.onStart();
......@@ -498,7 +498,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate app start.
delegate.onStart();
......@@ -514,7 +514,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
Intent mockIntent = mock(Intent.class);
......@@ -534,7 +534,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
Intent mockIntent = mock(Intent.class);
......@@ -552,7 +552,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and call the method that we expect to be forwarded.
......@@ -568,7 +568,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and call the method that we expect to be forwarded.
......@@ -585,7 +585,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and call the method that we expect to be forwarded.
......@@ -601,7 +601,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and call the method that we expect to be forwarded.
......@@ -624,7 +624,7 @@ public class FlutterActivityAndFragmentDelegateTest {
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
// --- Execute the behavior under test ---
// The FlutterEngine is setup in onAttach().
// The FlutterEngine is set up in onAttach().
delegate.onAttach(RuntimeEnvironment.application);
// Emulate the host and call the method that we expect to be forwarded.
......
......@@ -79,7 +79,7 @@ public class FlutterEngineConnectionRegistryTest {
Intent intent = mock(Intent.class);
AtomicBoolean isFirstCall = new AtomicBoolean(true);
// setup the environment to get the required internal data
// Set up the environment to get the required internal data
FlutterEngineConnectionRegistry registry =
new FlutterEngineConnectionRegistry(context, flutterEngine, flutterLoader);
FakeActivityAwareFlutterPlugin fakePlugin = new FakeActivityAwareFlutterPlugin();
......
......@@ -25,7 +25,7 @@ struct StreamHandlerError {
error_details(error_details) {}
};
// Handler of stream setup and tear-down requests.
// Handler for stream setup and teardown requests.
// Implementations must be prepared to accept sequences of alternating calls to
// OnListen() and OnCancel(). Implementations should ideally consume no
// resources when the last such call is not OnListen(). In typical situations,
......
......@@ -14,7 +14,7 @@ namespace flutter {
class EncodableValue;
// Handler types for each of the StreamHandler setup and tear-down
// Handler types for each of the StreamHandler setup and teardown
// requests.
template <typename T>
using StreamHandlerListen =
......
......@@ -117,8 +117,8 @@ FLUTTER_DARWIN_EXPORT
/**
* Adjusts the number of messages that will get buffered when sending messages to
* channels that aren't fully setup yet. For example, the engine isn't running
* yet or the channel's message handler isn't setup on the Dart side yet.
* channels that aren't fully set up yet. For example, the engine isn't running
* yet or the channel's message handler isn't set up on the Dart side yet.
*/
- (void)resizeChannelBuffer:(NSInteger)newSize;
......@@ -255,8 +255,8 @@ FLUTTER_DARWIN_EXPORT
/**
* Adjusts the number of messages that will get buffered when sending messages to
* channels that aren't fully setup yet. For example, the engine isn't running
* yet or the channel's message handler isn't setup on the Dart side yet.
* channels that aren't fully set up yet. For example, the engine isn't running
* yet or the channel's message handler isn't set up on the Dart side yet.
*/
- (void)resizeChannelBuffer:(NSInteger)newSize;
......
......@@ -824,7 +824,7 @@ static void SetEntryPoint(flutter::Settings* settings, NSString* entrypoint, NSS
return _connections->AquireConnection(channel.UTF8String);
} else {
NSAssert(!handler, @"Setting a message handler before the FlutterEngine has been run.");
// Setting a handler to nil for a not setup channel is a noop.
// Setting a handler to nil for a channel that has not yet been set up is a no-op.
return flutter::ConnectionCollection::MakeErrorConnection(-1);
}
}
......
......@@ -84,7 +84,7 @@ typedef enum UIAccessibilityContrast : NSInteger {
fml::scoped_nsobject<FlutterEngine> _engine;
// We keep a separate reference to this and create it ahead of time because we want to be able to
// setup a shell along with its platform view before the view has to appear.
// set up a shell along with its platform view before the view has to appear.
fml::scoped_nsobject<FlutterView> _flutterView;
fml::scoped_nsobject<UIView> _splashScreenView;
fml::ScopedBlock<void (^)(void)> _flutterViewRenderedCallback;
......
......@@ -21,19 +21,19 @@
namespace flutter::testing {
TEST(FlutterEmbedderExternalTextureUnittests, TestTextureResolution) {
// constants.
// Constants.
const size_t width = 100;
const size_t height = 100;
const int64_t texture_id = 1;
// setup the surface.
// Set up the surface.
FlutterDarwinContextMetal* darwinContextMetal =
[[FlutterDarwinContextMetal alloc] initWithDefaultMTLDevice];
SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
GrDirectContext* grContext = darwinContextMetal.mainContext.get();
sk_sp<SkSurface> gpuSurface(SkSurface::MakeRenderTarget(grContext, SkBudgeted::kNo, info));
// create a texture.
// Create a texture.
MTLTextureDescriptor* textureDescriptor = [[MTLTextureDescriptor alloc] init];
textureDescriptor.pixelFormat = MTLPixelFormatBGRA8Unorm;
textureDescriptor.width = width;
......@@ -45,7 +45,7 @@ TEST(FlutterEmbedderExternalTextureUnittests, TestTextureResolution) {
(__bridge FlutterMetalTextureHandle)mtlTexture,
};
// callback to resolve the texture.
// Callback to resolve the texture.
EmbedderExternalTextureMetal::ExternalTextureCallback callback = [&](int64_t texture_id, size_t w,
size_t h) {
EXPECT_TRUE(w == width);
......@@ -62,7 +62,7 @@ TEST(FlutterEmbedderExternalTextureUnittests, TestTextureResolution) {
return std::unique_ptr<FlutterMetalExternalTexture>(texture);
};
// render the texture.
// Render the texture.
std::unique_ptr<flutter::Texture> texture =
std::make_unique<EmbedderExternalTextureMetal>(texture_id, callback);
SkRect bounds = SkRect::MakeWH(info.width(), info.height());
......
......@@ -1193,7 +1193,7 @@ FlutterEngineResult FlutterEngineInitialize(size_t version,
if (!thread_host || !thread_host->IsValid()) {
return LOG_EMBEDDER_ERROR(kInvalidArguments,
"Could not setup or infer thread configuration "
"Could not set up or infer thread configuration "
"to run the Flutter engine on.");
}
......
......@@ -174,8 +174,8 @@ FlutterTransformation EmbedderTestContext::GetRootSurfaceTransformation() {
EmbedderTestCompositor& EmbedderTestContext::GetCompositor() {
FML_CHECK(compositor_)
<< "Accessed the compositor on a context where one was not setup. Use "
"the config builder to setup a context with a custom compositor.";
<< "Accessed the compositor on a context where one was not set up. Use "
"the config builder to set up a context with a custom compositor.";
return *compositor_;
}
......
......@@ -110,9 +110,9 @@ uint32_t EmbedderTestContextGL::GetWindowFBOId() const {
}
void EmbedderTestContextGL::SetupCompositor() {
FML_CHECK(!compositor_) << "Already ssetup a compositor in this context.";
FML_CHECK(!compositor_) << "Already set up a compositor in this context.";
FML_CHECK(gl_surface_)
<< "Setup the GL surface before setting up a compositor.";
<< "Set up the GL surface before setting up a compositor.";
compositor_ = std::make_unique<EmbedderTestCompositorGL>(
gl_surface_->GetSurfaceSize(), gl_surface_->GetGrContext());
}
......
......@@ -43,7 +43,7 @@ void EmbedderTestContextSoftware::SetupSurface(SkISize surface_size) {
}
void EmbedderTestContextSoftware::SetupCompositor() {
FML_CHECK(!compositor_) << "Already setup a compositor in this context.";
FML_CHECK(!compositor_) << "Already set up a compositor in this context.";
compositor_ = std::make_unique<EmbedderTestCompositorSoftware>(surface_size_);
}
......
......@@ -2493,7 +2493,7 @@ TEST_F(EmbedderTest, ClipsAreCorrectlyCalculated) {
[&](const auto& mutation) {
FlutterRect clip = mutation.clip_rect;
// The test is only setup to supply one clip. Make sure it is
// The test is only set up to supply one clip. Make sure it is
// the one we expect.
const auto rect_to_compare =
SkRect::MakeLTRB(10.0, 10.0, 390, 290);
......
......@@ -151,7 +151,7 @@ void InitBuiltinLibrariesForIsolate(
// AOT: These steps already happened at compile time in gen_snapshot.
// We need to ensure that all the scripts loaded so far are finalized
// as we are about to invoke some Dart code below to setup closures.
// as we are about to invoke some Dart code below to set up closures.
result = Dart_FinalizeLoading(false);
FML_CHECK(!tonic::LogIfError(result));
#endif
......
......@@ -129,7 +129,7 @@ Engine::Engine(Delegate& delegate,
};
// Set up the session connection and other Scenic helpers on the raster
// thread. We also need to wait for the external view embedder to be setup
// thread. We also need to wait for the external view embedder to be set up
// before creating the shell.
fml::AutoResetWaitableEvent view_embedder_latch;
task_runners.GetRasterTaskRunner()->PostTask(fml::MakeCopyable(
......@@ -353,7 +353,7 @@ Engine::Engine(Delegate& delegate,
return;
}
// Shell has been created. Before we run the engine, setup the isolate
// Shell has been created. Before we run the engine, set up the isolate
// configurator.
{
fuchsia::sys::EnvironmentPtr environment;
......
......@@ -73,9 +73,9 @@ bool VulkanSurfaceProducer::Initialize(scenic::Session* scenic_session) {
VK_MAKE_VERSION(1, 1, 0), true /* enable_validation_layers */);
if (!application_->IsValid() || !vk_->AreInstanceProcsSetup()) {
// Make certain the application instance was created and it setup the
// Make certain the application instance was created and it set up the
// instance proc table entries.
FML_LOG(ERROR) << "Instance proc addresses have not been setup.";
FML_LOG(ERROR) << "Instance proc addresses have not been set up.";
return false;
}
......@@ -85,9 +85,9 @@ bool VulkanSurfaceProducer::Initialize(scenic::Session* scenic_session) {
if (logical_device_ == nullptr || !logical_device_->IsValid() ||
!vk_->AreDeviceProcsSetup()) {
// Make certain the device was created and it setup the device proc table
// Make certain the device was created and it set up the device proc table
// entries.
FML_LOG(ERROR) << "Device proc addresses have not been setup.";
FML_LOG(ERROR) << "Device proc addresses have not been set up.";
return false;
}
......
......@@ -152,7 +152,7 @@ int RunTester(const flutter::Settings& settings,
);
if (!shell || !shell->IsSetup()) {
FML_LOG(ERROR) << "Could not setup the shell.";
FML_LOG(ERROR) << "Could not set up the shell.";
return EXIT_FAILURE;
}
......
......@@ -94,7 +94,7 @@ std::unique_ptr<AutoIsolateShutdown> RunDartCodeInIsolateOnUITaskRunner(
auto kernel_mapping = std::make_unique<fml::FileMapping>(kernel_file);
if (kernel_mapping->GetMapping() == nullptr) {
FML_LOG(ERROR) << "Could not setup kernel mapping.";
FML_LOG(ERROR) << "Could not set up kernel mapping.";
return nullptr;
}
......
......@@ -1564,7 +1564,7 @@ TEST_F(AXPositionTest, AtStartAndEndOfLineInsideTextField) {
// This test ensures that "AtStart/EndOfLine" methods work properly when at
// the start or end of a text field.
//
// We setup a test tree with two text fields. The first one has one line of
// We set up a test tree with two text fields. The first one has one line of
// text, and the second one three. There are inline text boxes containing only
// white space at the start and end of both text fields, which is a valid
// AXTree that might be generated by our renderer.
......
......@@ -100,9 +100,9 @@ VulkanApplication::VulkanApplication(
return;
}
// Now that we have an instance, setup instance proc table entries.
// Now that we have an instance, set up instance proc table entries.
if (!vk.SetupInstanceProcAddresses(instance)) {
FML_DLOG(INFO) << "Could not setup instance proc addresses.";
FML_DLOG(INFO) << "Could not set up instance proc addresses.";
return;
}
......@@ -114,7 +114,7 @@ VulkanApplication::VulkanApplication(
if (enable_instance_debugging) {
auto debug_report = std::make_unique<VulkanDebugReport>(vk, instance_);
if (!debug_report->IsValid()) {
FML_DLOG(INFO) << "Vulkan debugging was enabled but could not be setup "
FML_DLOG(INFO) << "Vulkan debugging was enabled but could not be set up "
"for this instance.";
} else {
debug_report_ = std::move(debug_report);
......
......@@ -107,7 +107,7 @@ VulkanDevice::VulkanDevice(VulkanProcTable& p_vk,
[this](VkDevice device) { vk.DestroyDevice(device, nullptr); }};
if (!vk.SetupDeviceProcAddresses(device_)) {
FML_DLOG(INFO) << "Could not setup device proc addresses.";
FML_DLOG(INFO) << "Could not set up device proc addresses.";
return;
}
......@@ -326,7 +326,7 @@ bool VulkanDevice::ChoosePresentMode(const VulkanSurface& surface,
// mentioned in the ticket w.r.t the application being faster that the refresh
// rate of the screen should not be faced by any Flutter platforms as they are
// powered by Vsync pulses instead of depending the submit to block.
// However, for platforms that don't have VSync providers setup, it is better
// However, for platforms that don't have VSync providers set up, it is better
// to fall back to FIFO. For platforms that do have VSync providers, there
// should be little difference. In case there is a need for a mode other than
// FIFO, availability checks must be performed here before returning the
......
......@@ -52,9 +52,9 @@ VulkanWindow::VulkanWindow(const sk_sp<GrDirectContext>& context,
std::move(extensions));
if (!application_->IsValid() || !vk->AreInstanceProcsSetup()) {
// Make certain the application instance was created and it setup the
// Make certain the application instance was created and it set up the
// instance proc table entries.
FML_DLOG(INFO) << "Instance proc addresses have not been setup.";
FML_DLOG(INFO) << "Instance proc addresses have not been set up.";
return;
}
......@@ -64,9 +64,9 @@ VulkanWindow::VulkanWindow(const sk_sp<GrDirectContext>& context,
if (logical_device_ == nullptr || !logical_device_->IsValid() ||
!vk->AreDeviceProcsSetup()) {
// Make certain the device was created and it setup the device proc table
// Make certain the device was created and it set up the device proc table
// entries.
FML_DLOG(INFO) << "Device proc addresses have not been setup.";
FML_DLOG(INFO) << "Device proc addresses have not been set up.";
return;
}
......@@ -95,7 +95,7 @@ VulkanWindow::VulkanWindow(const sk_sp<GrDirectContext>& context,
// Create the swapchain.
if (!RecreateSwapchain()) {
FML_DLOG(INFO) << "Could not setup the swapchain initially.";
FML_DLOG(INFO) << "Could not set up the swapchain initially.";
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册