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
+1 -1
View File
@@ -1 +1 @@
cdbeda788a293fa29665dc3fa3d6e63bd221cb0d 1ac611c64eadbd93c5f5aba5494b8fc3b35ee952
+1 -1
View File
@@ -1 +1 @@
f468f3366c26a5092eb964a230ce7892fda8f2f8 efbf63d9c66b9f6ec30e9ad4611189aa80003d31
+1 -1
View File
@@ -149,6 +149,6 @@ class BuildPackageCommand extends BuildSubCommand
String _getCurrentHostPlatformArchName() { String _getCurrentHostPlatformArchName() {
final HostPlatform hostPlatform = getCurrentHostPlatform(); final HostPlatform hostPlatform = getCurrentHostPlatform();
return getNameForHostPlatformArch(hostPlatform); return hostPlatform.platformName;
} }
} }
+1 -1
View File
@@ -29,6 +29,6 @@ class ELinuxRunCommand extends RunCommand
String _getCurrentHostPlatformArchName() { String _getCurrentHostPlatformArchName() {
final HostPlatform hostPlatform = getCurrentHostPlatform(); final HostPlatform hostPlatform = getCurrentHostPlatform();
return getNameForHostPlatformArch(hostPlatform); return hostPlatform.platformName;
} }
} }
+3 -3
View File
@@ -64,7 +64,7 @@ abstract class ELinuxAssetBundle extends Target {
throw MissingDefineException(kBuildMode, name); throw MissingDefineException(kBuildMode, name);
} }
final BuildMode buildMode = final BuildMode buildMode =
getBuildModeForName(environment.defines[kBuildMode]!); BuildMode.fromCliName(environment.defines[kBuildMode]!);
final Directory outputDirectory = environment.outputDir final Directory outputDirectory = environment.outputDir
.childDirectory('flutter_assets') .childDirectory('flutter_assets')
..createSync(recursive: true); ..createSync(recursive: true);
@@ -275,7 +275,7 @@ class NativeBundle {
// libflutter_elinux_*.so in profile mode is under the debug mode's directory. // libflutter_elinux_*.so in profile mode is under the debug mode's directory.
final Directory embedderDir = _getEngineArtifactsDirectory( final Directory embedderDir = _getEngineArtifactsDirectory(
buildInfo!.targetArch, buildInfo!.targetArch,
buildMode.isRelease ? buildMode : BuildMode.fromName('debug')); buildMode.isRelease ? buildMode : BuildMode.fromCliName('debug'));
final File embedder = final File embedder =
embedderDir.childFile(buildInfo!.targetBackendType == 'gbm' embedderDir.childFile(buildInfo!.targetBackendType == 'gbm'
? 'libflutter_elinux_gbm.so' ? 'libflutter_elinux_gbm.so'
@@ -433,7 +433,7 @@ class NativeBundle {
String _getCurrentHostPlatformArchName() { String _getCurrentHostPlatformArchName() {
final HostPlatform hostPlatform = getCurrentHostPlatform(); final HostPlatform hostPlatform = getCurrentHostPlatform();
return getNameForHostPlatformArch(hostPlatform); return hostPlatform.platformName;
} }
/// Converts [targetArch] to an arch name that corresponds to the `BUILD_ARCH` /// Converts [targetArch] to an arch name that corresponds to the `BUILD_ARCH`
+2 -2
View File
@@ -76,7 +76,7 @@ class ELinuxBuilder {
final Directory outputDir = final Directory outputDir =
project.directory.childDirectory('build').childDirectory('elinux'); project.directory.childDirectory('build').childDirectory('elinux');
final BuildInfo buildInfo = eLinuxBuildInfo.buildInfo; final BuildInfo buildInfo = eLinuxBuildInfo.buildInfo;
final String buildModeName = getNameForBuildMode(buildInfo.mode); final String buildModeName = buildInfo.mode.cliName;
// Used by AotElfBase to generate an AOT snapshot. // Used by AotElfBase to generate an AOT snapshot.
final String targetPlatformName = getNameForTargetPlatform( final String targetPlatformName = getNameForTargetPlatform(
_getTargetPlatformForArch(eLinuxBuildInfo.targetArch)); _getTargetPlatformForArch(eLinuxBuildInfo.targetArch));
@@ -214,5 +214,5 @@ String _getTargetPlatformPlatformName(TargetPlatform targetPlatform) {
String _getCurrentHostPlatformArchName() { String _getCurrentHostPlatformArchName() {
final HostPlatform hostPlatform = getCurrentHostPlatform(); final HostPlatform hostPlatform = getCurrentHostPlatform();
return getNameForHostPlatformArch(hostPlatform); return hostPlatform.platformName;
} }
+1 -1
View File
@@ -187,7 +187,7 @@ class ELinuxDeviceDiscovery extends PollingDeviceDiscovery {
String _getCurrentHostPlatformArchName() { String _getCurrentHostPlatformArchName() {
final HostPlatform hostPlatform = getCurrentHostPlatform(); final HostPlatform hostPlatform = getCurrentHostPlatform();
return getNameForHostPlatformArch(hostPlatform); return hostPlatform.platformName;
} }
@override @override
+2 -2
View File
@@ -98,7 +98,7 @@ class BuildableELinuxApp extends ELinuxApp {
return globals.fs.path.join( return globals.fs.path.join(
'build/elinux/', 'build/elinux/',
targetArch, targetArch,
getNameForBuildMode(buildMode), buildMode.cliName,
'bundle', 'bundle',
binaryName, binaryName,
); );
@@ -109,7 +109,7 @@ class BuildableELinuxApp extends ELinuxApp {
return globals.fs.path.join( return globals.fs.path.join(
'build/elinux/', 'build/elinux/',
targetArch, targetArch,
getNameForBuildMode(buildMode), buildMode.cliName,
'bundle', 'bundle',
); );
} }
-2
View File
@@ -18,7 +18,6 @@ import 'package:flutter_tools/src/commands/config.dart';
import 'package:flutter_tools/src/commands/devices.dart'; import 'package:flutter_tools/src/commands/devices.dart';
import 'package:flutter_tools/src/commands/doctor.dart'; import 'package:flutter_tools/src/commands/doctor.dart';
import 'package:flutter_tools/src/commands/emulators.dart'; import 'package:flutter_tools/src/commands/emulators.dart';
import 'package:flutter_tools/src/commands/format.dart';
import 'package:flutter_tools/src/commands/generate_localizations.dart'; import 'package:flutter_tools/src/commands/generate_localizations.dart';
import 'package:flutter_tools/src/commands/install.dart'; import 'package:flutter_tools/src/commands/install.dart';
import 'package:flutter_tools/src/commands/logs.dart'; import 'package:flutter_tools/src/commands/logs.dart';
@@ -86,7 +85,6 @@ Future<void> main(List<String> args) async {
DevicesCommand(verboseHelp: verboseHelp), DevicesCommand(verboseHelp: verboseHelp),
DoctorCommand(verbose: verbose), DoctorCommand(verbose: verbose),
EmulatorsCommand(), EmulatorsCommand(),
FormatCommand(),
GenerateLocalizationsCommand( GenerateLocalizationsCommand(
fileSystem: globals.fs, fileSystem: globals.fs,
logger: globals.logger, logger: globals.logger,
+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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
@@ -21,9 +21,18 @@ class FlutterEmbedderOptions {
options_.AddInt("rotation", "r", options_.AddInt("rotation", "r",
"Window rotation(degree) [0(default)|90|180|270]", 0, "Window rotation(degree) [0(default)|90|180|270]", 0,
false); 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", options_.AddDouble("force-scale-factor", "s",
"Force a scale factor instead using default value", 1.0, "Force a scale factor instead using default value", 1.0,
false); false);
options_.AddWithoutValue(
"async-vblank", "v",
"Don't sync to compositor redraw/vblank (eglSwapInterval 0)", false);
#if defined(FLUTTER_TARGET_BACKEND_GBM) || \ #if defined(FLUTTER_TARGET_BACKEND_GBM) || \
defined(FLUTTER_TARGET_BACKEND_EGLSTREAM) defined(FLUTTER_TARGET_BACKEND_EGLSTREAM)
// no more options. // 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")) { if (options_.Exist("force-scale-factor")) {
is_force_scale_factor_ = true; is_force_scale_factor_ = true;
scale_factor_ = options_.GetValue<double>("force-scale-factor"); scale_factor_ = options_.GetValue<double>("force-scale-factor");
@@ -87,6 +99,8 @@ class FlutterEmbedderOptions {
scale_factor_ = 1.0; scale_factor_ = 1.0;
} }
enable_vsync_ = !options_.Exist("async-vblank");
#if defined(FLUTTER_TARGET_BACKEND_GBM) || \ #if defined(FLUTTER_TARGET_BACKEND_GBM) || \
defined(FLUTTER_TARGET_BACKEND_EGLSTREAM) defined(FLUTTER_TARGET_BACKEND_EGLSTREAM)
use_onscreen_keyboard_ = false; use_onscreen_keyboard_ = false;
@@ -118,22 +132,51 @@ class FlutterEmbedderOptions {
return true; return true;
} }
std::string BundlePath() const { return bundle_path_; } std::string BundlePath() const {
std::string WindowTitle() const { return window_title_; } return bundle_path_;
std::string WindowAppID() const { return window_app_id_; } }
bool IsUseMouseCursor() const { return use_mouse_cursor_; } std::string WindowTitle() const {
bool IsUseOnscreenKeyboard() const { return use_onscreen_keyboard_; } return window_title_;
bool IsUseWindowDecoraation() const { return use_window_decoration_; } }
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 { flutter::FlutterViewController::ViewMode WindowViewMode() const {
return window_view_mode_; return window_view_mode_;
} }
int WindowWidth() const { return window_width_; } int WindowWidth() const {
int WindowHeight() const { return window_height_; } return window_width_;
}
int WindowHeight() const {
return window_height_;
}
flutter::FlutterViewController::ViewRotation WindowRotation() const { flutter::FlutterViewController::ViewRotation WindowRotation() const {
return window_view_rotation_; return window_view_rotation_;
} }
bool IsForceScaleFactor() const { return is_force_scale_factor_; } double TextScaleFactor() const {
double ScaleFactor() const { return scale_factor_; } 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: private:
commandline::CommandOptions options_; commandline::CommandOptions options_;
@@ -152,6 +195,9 @@ class FlutterEmbedderOptions {
flutter::FlutterViewController::ViewRotation::kRotation_0; flutter::FlutterViewController::ViewRotation::kRotation_0;
bool is_force_scale_factor_; bool is_force_scale_factor_;
double scale_factor_; double scale_factor_;
double text_scale_factor_;
bool enable_high_contrast_;
bool enable_vsync_;
}; };
#endif // FLUTTER_EMBEDDER_OPTIONS_ #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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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_mouse_cursor = options.IsUseMouseCursor();
view_properties.use_onscreen_keyboard = options.IsUseOnscreenKeyboard(); view_properties.use_onscreen_keyboard = options.IsUseOnscreenKeyboard();
view_properties.use_window_decoration = options.IsUseWindowDecoraation(); 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.force_scale_factor = options.IsForceScaleFactor();
view_properties.scale_factor = options.ScaleFactor(); view_properties.scale_factor = options.ScaleFactor();
view_properties.enable_vsync = options.EnableVsync();
// The Flutter instance hosted by this window. // The Flutter instance hosted by this window.
FlutterWindow window(view_properties, project); FlutterWindow window(view_properties, project);