Skip to content

Commit

Permalink
Merge branch 'sony:master' into update-embedder
Browse files Browse the repository at this point in the history
  • Loading branch information
HidenoriMatsubayashi authored Dec 13, 2024
2 parents 14c08bf + 679d361 commit f4e52f3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ void FlutterELinuxEngine::HandlePlatformMessage(

auto message = ConvertToDesktopMessage(*engine_message);

message_dispatcher_->HandleMessage(
message, [this] {}, [this] {});
message_dispatcher_->HandleMessage(message, [this] {}, [this] {});
}

void FlutterELinuxEngine::ReloadSystemFonts() {
Expand All @@ -398,10 +397,9 @@ void FlutterELinuxEngine::SendSystemLocales() {
// Convert the locale list to the locale pointer list that must be provided.
std::vector<const FlutterLocale*> flutter_locale_list;
flutter_locale_list.reserve(flutter_locales.size());
std::transform(
flutter_locales.begin(), flutter_locales.end(),
std::back_inserter(flutter_locale_list),
[](const auto& arg) -> const auto* { return &arg; });
std::transform(flutter_locales.begin(), flutter_locales.end(),
std::back_inserter(flutter_locale_list),
[](const auto& arg) -> const auto* { return &arg; });
auto result = embedder_api_.UpdateLocales(engine_, flutter_locale_list.data(),
flutter_locale_list.size());
if (result != kSuccess) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ void PlatformViewsPlugin::PlatformViewsOffset(
auto view_id = LookupEncodableMap<int>(arguments, kIdKey);
auto view_top = LookupEncodableMap<double>(arguments, kTopKey);
auto view_left = LookupEncodableMap<double>(arguments, kLeftKey);
ELINUX_LOG(DEBUG) << "Offset the platform view: "
<< "id = " << view_id << ", top = " << view_top
<< ", left = " << view_left;
ELINUX_LOG(DEBUG) << "Offset the platform view: " << "id = " << view_id
<< ", top = " << view_top << ", left = " << view_left;
if (platform_views_.find(view_id) == platform_views_.end()) {
result->Error("Couldn't find the view id in the arguments");
return;
Expand Down
20 changes: 10 additions & 10 deletions src/flutter/shell/platform/linux_embedded/surface/context_egl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
: environment_(std::move(environment)), config_(nullptr) {
EGLint config_count = 0;
const EGLint attribs[] = {
// clang-format off
// clang-format off
EGL_SURFACE_TYPE, egl_surface_type,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_RED_SIZE, 8,
Expand All @@ -27,10 +27,10 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
EGL_DEPTH_SIZE, 0,
EGL_STENCIL_SIZE, 0,
EGL_NONE
// clang-format on
// clang-format on
};
const EGLint impeller_config_attributes[] = {
// clang-format off
// clang-format off
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
Expand All @@ -42,10 +42,10 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
EGL_SAMPLE_BUFFERS, 1,
EGL_SAMPLES, 4,
EGL_NONE
// clang-format on
// clang-format on
};
const EGLint impeller_config_attributes_no_msaa[] = {
// clang-format off
// clang-format off
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
Expand All @@ -55,7 +55,7 @@ ContextEgl::ContextEgl(std::unique_ptr<EnvironmentEgl> environment,
EGL_DEPTH_SIZE, 0,
EGL_STENCIL_SIZE, 8,
EGL_NONE
// clang-format on
// clang-format on
};

if (enable_impeller) {
Expand Down Expand Up @@ -136,8 +136,8 @@ std::unique_ptr<ELinuxEGLSurface> ContextEgl::CreateOffscreenSurface(
EGLSurface surface =
eglCreatePbufferSurface(environment_->Display(), config_, attribs);
if (surface == EGL_NO_SURFACE) {
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface."
<< "(" << get_egl_error_cause() << ")";
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface." << "("
<< get_egl_error_cause() << ")";
}
#else
// eglCreatePbufferSurface isn't supported on both Wayland and GBM.
Expand All @@ -146,8 +146,8 @@ std::unique_ptr<ELinuxEGLSurface> ContextEgl::CreateOffscreenSurface(
EGLSurface surface = eglCreateWindowSurface(
environment_->Display(), config_, window->WindowOffscreen(), attribs);
if (surface == EGL_NO_SURFACE) {
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface."
<< "(" << get_egl_error_cause() << ")";
ELINUX_LOG(WARNING) << "Failed to create EGL off-screen surface." << "("
<< get_egl_error_cause() << ")";
}
#endif
return std::make_unique<ELinuxEGLSurface>(surface, environment_->Display(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,18 @@ class ELinuxWindowDrm : public ELinuxWindow, public WindowBindingHandler {
}

// |FlutterWindowBindingHandler|
uint16_t GetRotationDegree() const override {
return current_rotation_;
}
uint16_t GetRotationDegree() const override { return current_rotation_; }

// |FlutterWindowBindingHandler|
double GetDpiScale() override {
return current_scale_;
}
double GetDpiScale() override { return current_scale_; }

// |FlutterWindowBindingHandler|
PhysicalWindowBounds GetPhysicalWindowBounds() override {
return {GetCurrentWidth(), GetCurrentHeight()};
}

// |FlutterWindowBindingHandler|
int32_t GetFrameRate() override {
return 60000;
}
int32_t GetFrameRate() override { return 60000; }

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

// |FlutterWindowBindingHandler|
std::string GetClipboardData() override {
return clipboard_data_;
}
std::string GetClipboardData() override { return clipboard_data_; }

// |FlutterWindowBindingHandler|
void SetClipboardData(const std::string& data) override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,11 @@ const wl_output_listener ELinuxWindowWayland::kWlOutputListener = {
self->request_redraw_ = true;
}
if (self->view_properties_.height > height) {
ELINUX_LOG(WARNING) << "Requested height size("
<< self->view_properties_.height << ") "
<< "is larger than display size(" << height
<< ")"
", clipping";
ELINUX_LOG(WARNING)
<< "Requested height size(" << self->view_properties_.height
<< ") " << "is larger than display size(" << height
<< ")"
", clipping";
self->view_properties_.height = height;
self->request_redraw_ = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class NativeWindow {

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

protected:
EGLNativeWindowType window_;
Expand Down

0 comments on commit f4e52f3

Please sign in to comment.