Skip to content

Commit

Permalink
Correct setup-related typos (#24846)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbracken committed Mar 9, 2021
1 parent 6527a68 commit 2441c47
Show file tree
Hide file tree
Showing 55 changed files with 106 additions and 104 deletions.
4 changes: 2 additions & 2 deletions ci/docker/build/README.md
@@ -1,8 +1,8 @@
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
Expand Down
2 changes: 1 addition & 1 deletion examples/glfw/README.md
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion fml/platform/win/mapping_win.cc
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/channel_buffers.dart
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/painting/image_decoder_unittests.cc
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/painting/image_encoding.cc
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/dev/integration_tests_manager.dart
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/dom_renderer.dart
Expand Up @@ -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.
//
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/navigation/history.dart
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/text/measurement.dart
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/text/ruler.dart
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/test/engine/history_test.dart
Expand Up @@ -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');
Expand Down
7 changes: 4 additions & 3 deletions runtime/dart_isolate.cc
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion runtime/dart_vm.cc
Expand Up @@ -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 {};
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime_controller.cc
Expand Up @@ -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.";
Expand Down
3 changes: 2 additions & 1 deletion shell/common/engine.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion shell/common/platform_view.cc
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion shell/common/platform_view.h
Expand Up @@ -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
///
Expand Down
6 changes: 3 additions & 3 deletions shell/common/rasterizer.h
Expand Up @@ -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();
Expand All @@ -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`
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion shell/common/shell.cc
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions shell/common/shell.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion shell/common/shell_benchmarks.cc
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions shell/common/shell_test_platform_view_vulkan.cc
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions shell/gpu/gpu_surface_gl.cc
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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 =
Expand Down
Expand Up @@ -357,8 +357,8 @@ private native FlutterJNI nativeSpawn(
*
* <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.
Expand Down
Expand Up @@ -106,8 +106,8 @@ public void setMessageHandler(@Nullable final MessageHandler<T> handler) {

/**
* 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);
Expand Down
Expand Up @@ -88,7 +88,7 @@ public void setStreamHandler(final StreamHandler handler) {
}

/**
* 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
Expand Down
Expand Up @@ -122,8 +122,8 @@ public void setMethodCallHandler(final @Nullable MethodCallHandler handler) {

/**
* 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);
Expand Down
Expand Up @@ -601,7 +601,7 @@ public void didChangeEditingState(
// -------- 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.
//
Expand Down
Expand Up @@ -430,7 +430,7 @@ public PlatformViewsController() {
* 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) {
Expand Down

0 comments on commit 2441c47

Please sign in to comment.