Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 615844a

Browse files
committed
dart format
1 parent a347504 commit 615844a

File tree

8 files changed

+21
-14
lines changed

8 files changed

+21
-14
lines changed

shell/common/shell.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ class Shell final : public PlatformView::Delegate,
286286
fml::Status WaitForFirstFrame(fml::TimeDelta timeout);
287287

288288
//----------------------------------------------------------------------------
289-
/// @brief Used by embedders to reload the system fonts in FontCollection.
289+
/// @brief Used by embedders to reload the system fonts in
290+
/// FontCollection.
290291
/// It will also clear the cached font families.
291292
///
292293
/// @return Returns if shell reloads system fonts successfully.

shell/common/shell_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ bool ShellTest::GetNeedsReportTimings(Shell* shell) {
154154
return shell->needs_report_timings_;
155155
}
156156

157-
std::shared_ptr<txt::FontCollection> ShellTest::GetFontCollection(Shell* shell) {
157+
std::shared_ptr<txt::FontCollection> ShellTest::GetFontCollection(
158+
Shell* shell) {
158159
return shell->weak_engine_->GetFontCollection().GetFontCollection();
159160
}
160161

shell/common/shell_unittests.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,15 +529,17 @@ TEST_F(ShellTest, ReloadSystemFonts) {
529529
auto shell = CreateShell(std::move(settings), std::move(task_runners));
530530

531531
auto fontCollection = GetFontCollection(shell.get());
532-
std::vector<std::string> families(1 , "Robotofake");
533-
auto font = fontCollection->GetMinikinFontCollectionForFamilies(families, "en");
532+
std::vector<std::string> families(1, "Robotofake");
533+
auto font =
534+
fontCollection->GetMinikinFontCollectionForFamilies(families, "en");
534535
ASSERT_EQ(font->getId(), (unsigned int)0);
535536
// Result should be cached.
536537
font = fontCollection->GetMinikinFontCollectionForFamilies(families, "en");
537538
ASSERT_EQ(font->getId(), (unsigned int)0);
538539
bool result = shell->ReloadSystemFonts();
539540

540-
// Cache is cleared, and FontCollection will be assigned a new id in incremental order.
541+
// Cache is cleared, and FontCollection will be assigned a new id in
542+
// incremental order.
541543
font = fontCollection->GetMinikinFontCollectionForFamilies(families, "en");
542544
ASSERT_EQ(font->getId(), (unsigned int)1);
543545
ASSERT_TRUE(result);

shell/platform/embedder/embedder.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,8 @@ FlutterEngineResult FlutterEngineReloadSystemFonts(
12801280

12811281
TRACE_EVENT0("flutter", "FlutterEngineReloadSystemFonts");
12821282

1283-
if (!reinterpret_cast<flutter::EmbedderEngine*>(engine)->ReloadSystemFonts()) {
1283+
if (!reinterpret_cast<flutter::EmbedderEngine*>(engine)
1284+
->ReloadSystemFonts()) {
12841285
return LOG_EMBEDDER_ERROR(kInternalInconsistency);
12851286
}
12861287

shell/platform/windows/client_wrapper/testing/stub_flutter_windows_api.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class StubFlutterWindowsApi {
4747
virtual void FlutterDesktopProcessMessages() {}
4848

4949
// Called for FlutterOnFontChange
50-
virtual void FlutterOnFontChange(FlutterDesktopViewControllerRef controller) {}
50+
virtual void FlutterOnFontChange(FlutterDesktopViewControllerRef controller) {
51+
}
5152

5253
// Called for FlutterDesktopProcessMessages
5354
virtual HWND FlutterDesktopGetHWND() { return reinterpret_cast<HWND>(1); }

shell/platform/windows/public/flutter_windows.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ FlutterDesktopGetHWND(FlutterDesktopViewControllerRef controller);
7070
FLUTTER_EXPORT void FlutterDesktopProcessMessages();
7171

7272
// Invokes OnFontChange callback in flutter windows view.
73-
FLUTTER_EXPORT void FlutterOnFontChange(FlutterDesktopViewControllerRef controller);
73+
FLUTTER_EXPORT void FlutterOnFontChange(
74+
FlutterDesktopViewControllerRef controller);
7475

7576
// Runs an instance of a headless Flutter engine.
7677
//

shell/platform/windows/win32_flutter_window.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "flutter/shell/platform/windows/win32_flutter_window.h"
2-
#include "flutter/shell/platform/common/cpp/client_wrapper/include/flutter/json_message_codec.h"
32
#include <chrono>
3+
#include "flutter/shell/platform/common/cpp/client_wrapper/include/flutter/json_message_codec.h"
44

55
static constexpr char kSystemChannelName[] = "flutter/system";
66
static constexpr char kTypeKey[] = "type";
@@ -157,10 +157,10 @@ void Win32FlutterWindow::OnFontChange() {
157157
}
158158
FlutterEngineReloadSystemFonts(engine_);
159159
auto internal_plugin_messenger = internal_plugin_registrar_->messenger();
160-
auto channel = std::make_unique<flutter::BasicMessageChannel<rapidjson::Document>>(
161-
internal_plugin_messenger,
162-
kSystemChannelName,
163-
&flutter::JsonMessageCodec::GetInstance());
160+
auto channel =
161+
std::make_unique<flutter::BasicMessageChannel<rapidjson::Document>>(
162+
internal_plugin_messenger, kSystemChannelName,
163+
&flutter::JsonMessageCodec::GetInstance());
164164
rapidjson::Document event(rapidjson::kObjectType);
165165
auto& allocator = event.GetAllocator();
166166
event.AddMember(kTypeKey, kFontChange, allocator);

third_party/txt/src/txt/platform_windows.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#include "txt/platform.h"
65
#include "third_party/skia/include/ports/SkTypeface_win.h"
6+
#include "txt/platform.h"
77

88
namespace txt {
99

0 commit comments

Comments
 (0)