Skip to content

Commit 679d361

Browse files
linux_embedded: fix github actions' failure (#431)
This change fixes the CI failure due to code format warnings. Signed-off-by: Hidenori Matsubayashi <[email protected]>
1 parent a938f2b commit 679d361

File tree

6 files changed

+26
-37
lines changed

6 files changed

+26
-37
lines changed

src/flutter/shell/platform/linux_embedded/flutter_elinux_engine.cc

+4-6
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,7 @@ void FlutterELinuxEngine::HandlePlatformMessage(
371371

372372
auto message = ConvertToDesktopMessage(*engine_message);
373373

374-
message_dispatcher_->HandleMessage(
375-
message, [this] {}, [this] {});
374+
message_dispatcher_->HandleMessage(message, [this] {}, [this] {});
376375
}
377376

378377
void FlutterELinuxEngine::ReloadSystemFonts() {
@@ -398,10 +397,9 @@ void FlutterELinuxEngine::SendSystemLocales() {
398397
// Convert the locale list to the locale pointer list that must be provided.
399398
std::vector<const FlutterLocale*> flutter_locale_list;
400399
flutter_locale_list.reserve(flutter_locales.size());
401-
std::transform(
402-
flutter_locales.begin(), flutter_locales.end(),
403-
std::back_inserter(flutter_locale_list),
404-
[](const auto& arg) -> const auto* { return &arg; });
400+
std::transform(flutter_locales.begin(), flutter_locales.end(),
401+
std::back_inserter(flutter_locale_list),
402+
[](const auto& arg) -> const auto* { return &arg; });
405403
auto result = embedder_api_.UpdateLocales(engine_, flutter_locale_list.data(),
406404
flutter_locale_list.size());
407405
if (result != kSuccess) {

src/flutter/shell/platform/linux_embedded/plugins/platform_views_plugin.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,8 @@ void PlatformViewsPlugin::PlatformViewsOffset(
250250
auto view_id = LookupEncodableMap<int>(arguments, kIdKey);
251251
auto view_top = LookupEncodableMap<double>(arguments, kTopKey);
252252
auto view_left = LookupEncodableMap<double>(arguments, kLeftKey);
253-
ELINUX_LOG(DEBUG) << "Offset the platform view: "
254-
<< "id = " << view_id << ", top = " << view_top
255-
<< ", left = " << view_left;
253+
ELINUX_LOG(DEBUG) << "Offset the platform view: " << "id = " << view_id
254+
<< ", top = " << view_top << ", left = " << view_left;
256255
if (platform_views_.find(view_id) == platform_views_.end()) {
257256
result->Error("Couldn't find the view id in the arguments");
258257
return;

src/flutter/shell/platform/linux_embedded/surface/context_egl.cc

+10-10
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
1515
: environment_(std::move(environment)), config_(nullptr) {
1616
EGLint config_count = 0;
1717
const EGLint attribs[] = {
18-
// clang-format off
18+
// clang-format off
1919
EGL_SURFACE_TYPE, egl_surface_type,
2020
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
2121
EGL_RED_SIZE, 8,
@@ -27,10 +27,10 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
2727
EGL_DEPTH_SIZE, 0,
2828
EGL_STENCIL_SIZE, 0,
2929
EGL_NONE
30-
// clang-format on
30+
// clang-format on
3131
};
3232
const EGLint impeller_config_attributes[] = {
33-
// clang-format off
33+
// clang-format off
3434
EGL_RED_SIZE, 8,
3535
EGL_GREEN_SIZE, 8,
3636
EGL_BLUE_SIZE, 8,
@@ -42,10 +42,10 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
4242
EGL_SAMPLE_BUFFERS, 1,
4343
EGL_SAMPLES, 4,
4444
EGL_NONE
45-
// clang-format on
45+
// clang-format on
4646
};
4747
const EGLint impeller_config_attributes_no_msaa[] = {
48-
// clang-format off
48+
// clang-format off
4949
EGL_RED_SIZE, 8,
5050
EGL_GREEN_SIZE, 8,
5151
EGL_BLUE_SIZE, 8,
@@ -55,7 +55,7 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
5555
EGL_DEPTH_SIZE, 0,
5656
EGL_STENCIL_SIZE, 8,
5757
EGL_NONE
58-
// clang-format on
58+
// clang-format on
5959
};
6060

6161
if (enable_impeller) {
@@ -136,8 +136,8 @@ std::unique_ptr<ELinuxEGLSurface> ContextEgl::CreateOffscreenSurface(
136136
EGLSurface surface =
137137
eglCreatePbufferSurface(environment_->Display(), config_, attribs);
138138
if (surface == EGL_NO_SURFACE) {
139-
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface."
140-
<< "(" << get_egl_error_cause() << ")";
139+
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface." << "("
140+
<< get_egl_error_cause() << ")";
141141
}
142142
#else
143143
// eglCreatePbufferSurface isn't supported on both Wayland and GBM.
@@ -146,8 +146,8 @@ std::unique_ptr<ELinuxEGLSurface> ContextEgl::CreateOffscreenSurface(
146146
EGLSurface surface = eglCreateWindowSurface(
147147
environment_->Display(), config_, window->WindowOffscreen(), attribs);
148148
if (surface == EGL_NO_SURFACE) {
149-
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface."
150-
<< "(" << get_egl_error_cause() << ")";
149+
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface." << "("
150+
<< get_egl_error_cause() << ")";
151151
}
152152
#endif
153153
return std::make_unique<ELinuxEGLSurface>(surface, environment_->Display(),

src/flutter/shell/platform/linux_embedded/window/elinux_window_drm.h

+4-12
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,18 @@ class ELinuxWindowDrm : public ELinuxWindow, public WindowBindingHandler {
228228
}
229229

230230
// |FlutterWindowBindingHandler|
231-
uint16_t GetRotationDegree() const override {
232-
return current_rotation_;
233-
}
231+
uint16_t GetRotationDegree() const override { return current_rotation_; }
234232

235233
// |FlutterWindowBindingHandler|
236-
double GetDpiScale() override {
237-
return current_scale_;
238-
}
234+
double GetDpiScale() override { return current_scale_; }
239235

240236
// |FlutterWindowBindingHandler|
241237
PhysicalWindowBounds GetPhysicalWindowBounds() override {
242238
return {GetCurrentWidth(), GetCurrentHeight()};
243239
}
244240

245241
// |FlutterWindowBindingHandler|
246-
int32_t GetFrameRate() override {
247-
return 60000;
248-
}
242+
int32_t GetFrameRate() override { return 60000; }
249243

250244
// |FlutterWindowBindingHandler|
251245
void UpdateFlutterCursor(const std::string& cursor_name) override {
@@ -260,9 +254,7 @@ class ELinuxWindowDrm : public ELinuxWindow, public WindowBindingHandler {
260254
}
261255

262256
// |FlutterWindowBindingHandler|
263-
std::string GetClipboardData() override {
264-
return clipboard_data_;
265-
}
257+
std::string GetClipboardData() override { return clipboard_data_; }
266258

267259
// |FlutterWindowBindingHandler|
268260
void SetClipboardData(const std::string& data) override {

src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -697,11 +697,11 @@ const wl_output_listener ELinuxWindowWayland::kWlOutputListener = {
697697
self->request_redraw_ = true;
698698
}
699699
if (self->view_properties_.height > height) {
700-
ELINUX_LOG(WARNING) << "Requested height size("
701-
<< self->view_properties_.height << ") "
702-
<< "is larger than display size(" << height
703-
<< ")"
704-
", clipping";
700+
ELINUX_LOG(WARNING)
701+
<< "Requested height size(" << self->view_properties_.height
702+
<< ") " << "is larger than display size(" << height
703+
<< ")"
704+
", clipping";
705705
self->view_properties_.height = height;
706706
self->request_redraw_ = true;
707707
}

src/flutter/shell/platform/linux_embedded/window/native_window.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class NativeWindow {
5656

5757
// Swaps frame buffers. This API performs processing only for the DRM-GBM
5858
// backend. It is prepared to make the interface common.
59-
virtual void SwapBuffers(){/* do nothing. */};
59+
virtual void SwapBuffers() { /* do nothing. */ };
6060

6161
protected:
6262
EGLNativeWindowType window_;

0 commit comments

Comments
 (0)