Unverified Commit e1fd2ace authored by LongCatIsLooong's avatar LongCatIsLooong Committed by GitHub

TextPainter migration cleanup (#132317)

Undo temporary changes made in #132094
parent f9a578dd
...@@ -102,7 +102,7 @@ final String flutterTester = path.join(flutterRoot, 'bin', 'cache', 'artifacts', ...@@ -102,7 +102,7 @@ final String flutterTester = path.join(flutterRoot, 'bin', 'cache', 'artifacts',
/// The arguments to pass to `flutter test` (typically the local engine /// The arguments to pass to `flutter test` (typically the local engine
/// configuration) -- prefilled with the arguments passed to test.dart. /// configuration) -- prefilled with the arguments passed to test.dart.
final List<String> flutterTestArgs = <String>['--dart-define=SKPARAGRAPH_REMOVE_ROUNDING_HACK=true']; final List<String> flutterTestArgs = <String>[];
/// Environment variables to override the local engine when running `pub test`, /// Environment variables to override the local engine when running `pub test`,
/// if such flags are provided to `test.dart`. /// if such flags are provided to `test.dart`.
...@@ -1309,8 +1309,8 @@ Future<void> _runFlutterDriverWebTest({ ...@@ -1309,8 +1309,8 @@ Future<void> _runFlutterDriverWebTest({
await runCommand( await runCommand(
flutter, flutter,
<String>[ <String>[
'drive',
...flutterTestArgs, ...flutterTestArgs,
'drive',
if (driver != null) '--driver=$driver', if (driver != null) '--driver=$driver',
'--target=$target', '--target=$target',
'--browser-name=chrome', '--browser-name=chrome',
...@@ -1584,8 +1584,8 @@ Future<void> _runGalleryE2eWebTest(String buildMode, { bool canvasKit = false }) ...@@ -1584,8 +1584,8 @@ Future<void> _runGalleryE2eWebTest(String buildMode, { bool canvasKit = false })
await runCommand( await runCommand(
flutter, flutter,
<String>[ <String>[
'drive',
...flutterTestArgs, ...flutterTestArgs,
'drive',
if (canvasKit) if (canvasKit)
'--dart-define=FLUTTER_WEB_USE_SKIA=true', '--dart-define=FLUTTER_WEB_USE_SKIA=true',
if (!canvasKit) if (!canvasKit)
...@@ -1665,10 +1665,10 @@ Future<void> _runWebReleaseTest(String target, { ...@@ -1665,10 +1665,10 @@ Future<void> _runWebReleaseTest(String target, {
await runCommand( await runCommand(
flutter, flutter,
<String>[ <String>[
...flutterTestArgs,
'build', 'build',
'web', 'web',
'--release', '--release',
...flutterTestArgs,
...additionalArguments, ...additionalArguments,
'-t', '-t',
target, target,
......
...@@ -515,13 +515,7 @@ class TextPainter { ...@@ -515,13 +515,7 @@ class TextPainter {
_locale = locale, _locale = locale,
_strutStyle = strutStyle, _strutStyle = strutStyle,
_textWidthBasis = textWidthBasis, _textWidthBasis = textWidthBasis,
_textHeightBehavior = textHeightBehavior, _textHeightBehavior = textHeightBehavior;
assert(() {
if (const bool.fromEnvironment('SKPARAGRAPH_REMOVE_ROUNDING_HACK')) {
ui.ParagraphBuilder.setDisableRoundingHack(true);
}
return true;
}());
/// Computes the width of a configured [TextPainter]. /// Computes the width of a configured [TextPainter].
/// ///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment