release: update for flutter 3.13.0 (#203)

Signed-off-by: Hidenori Matsubayashi <Hidenori.Matsubayashi@gmail.com>
This commit is contained in:
Hidenori Matsubayashi
2023-08-17 00:20:27 +00:00
committed by GitHub
parent a957327203
commit 4d747457cd
11 changed files with 73 additions and 26 deletions
+57 -11
View File
@@ -1,4 +1,4 @@
// Copyright 2023 Sony Corporation. All rights reserved.
// Copyright 2021 Sony Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,9 +21,18 @@ class FlutterEmbedderOptions {
options_.AddInt("rotation", "r",
"Window rotation(degree) [0(default)|90|180|270]", 0,
false);
options_.AddDouble("text-scaling-factor", "x", "Text scaling factor", 1.0,
false);
options_.AddWithoutValue("enable-high-contrast", "i",
"Request that UI be rendered with darker colors.",
false);
options_.AddDouble("force-scale-factor", "s",
"Force a scale factor instead using default value", 1.0,
false);
options_.AddWithoutValue(
"async-vblank", "v",
"Don't sync to compositor redraw/vblank (eglSwapInterval 0)", false);
#if defined(FLUTTER_TARGET_BACKEND_GBM) || \
defined(FLUTTER_TARGET_BACKEND_EGLSTREAM)
// no more options.
@@ -79,6 +88,9 @@ class FlutterEmbedderOptions {
}
}
text_scale_factor_ = options_.GetValue<double>("text-scaling-factor");
enable_high_contrast_ = options_.Exist("enable-high-contrast");
if (options_.Exist("force-scale-factor")) {
is_force_scale_factor_ = true;
scale_factor_ = options_.GetValue<double>("force-scale-factor");
@@ -87,6 +99,8 @@ class FlutterEmbedderOptions {
scale_factor_ = 1.0;
}
enable_vsync_ = !options_.Exist("async-vblank");
#if defined(FLUTTER_TARGET_BACKEND_GBM) || \
defined(FLUTTER_TARGET_BACKEND_EGLSTREAM)
use_onscreen_keyboard_ = false;
@@ -118,22 +132,51 @@ class FlutterEmbedderOptions {
return true;
}
std::string BundlePath() const { return bundle_path_; }
std::string WindowTitle() const { return window_title_; }
std::string WindowAppID() const { return window_app_id_; }
bool IsUseMouseCursor() const { return use_mouse_cursor_; }
bool IsUseOnscreenKeyboard() const { return use_onscreen_keyboard_; }
bool IsUseWindowDecoraation() const { return use_window_decoration_; }
std::string BundlePath() const {
return bundle_path_;
}
std::string WindowTitle() const {
return window_title_;
}
std::string WindowAppID() const {
return window_app_id_;
}
bool IsUseMouseCursor() const {
return use_mouse_cursor_;
}
bool IsUseOnscreenKeyboard() const {
return use_onscreen_keyboard_;
}
bool IsUseWindowDecoraation() const {
return use_window_decoration_;
}
flutter::FlutterViewController::ViewMode WindowViewMode() const {
return window_view_mode_;
}
int WindowWidth() const { return window_width_; }
int WindowHeight() const { return window_height_; }
int WindowWidth() const {
return window_width_;
}
int WindowHeight() const {
return window_height_;
}
flutter::FlutterViewController::ViewRotation WindowRotation() const {
return window_view_rotation_;
}
bool IsForceScaleFactor() const { return is_force_scale_factor_; }
double ScaleFactor() const { return scale_factor_; }
double TextScaleFactor() const {
return text_scale_factor_;
}
bool EnableHighContrast() const {
return enable_high_contrast_;
}
bool IsForceScaleFactor() const {
return is_force_scale_factor_;
}
double ScaleFactor() const {
return scale_factor_;
}
bool EnableVsync() const {
return enable_vsync_;
}
private:
commandline::CommandOptions options_;
@@ -152,6 +195,9 @@ class FlutterEmbedderOptions {
flutter::FlutterViewController::ViewRotation::kRotation_0;
bool is_force_scale_factor_;
double scale_factor_;
double text_scale_factor_;
bool enable_high_contrast_;
bool enable_vsync_;
};
#endif // FLUTTER_EMBEDDER_OPTIONS_
+4 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2023 Sony Corporation. All rights reserved.
// Copyright 2021 Sony Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -35,8 +35,11 @@ int main(int argc, char** argv) {
view_properties.use_mouse_cursor = options.IsUseMouseCursor();
view_properties.use_onscreen_keyboard = options.IsUseOnscreenKeyboard();
view_properties.use_window_decoration = options.IsUseWindowDecoraation();
view_properties.text_scale_factor = options.TextScaleFactor();
view_properties.enable_high_contrast = options.EnableHighContrast();
view_properties.force_scale_factor = options.IsForceScaleFactor();
view_properties.scale_factor = options.ScaleFactor();
view_properties.enable_vsync = options.EnableVsync();
// The Flutter instance hosted by this window.
FlutterWindow window(view_properties, project);