-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use utf8.encode() instead of longer const Utf8Encoder.convert() #43675
Conversation
The change in [0] has propagated now everywhere, so we can use `utf8.encode()` instead of the longer `const Utf8Encoder.convert()`. Also it cleans up code like ``` Uint8List bytes; bytes.buffer.asByteData(); ``` as that is not guaranteed to be correct, the correct version would be ``` Uint8List bytes; bytes.buffer.asByteData(bytes.offsetInBytes, bytes.length); ``` a shorter hand for that is: ``` Uint8List bytes; ByteData.sublistView(bytes); ``` [0] dart-lang/sdk#52801
'wheel_y_physical_pixel': wheelYPhysicalPixel, | ||
})) | ||
.buffer | ||
.asByteData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this final message = ByteData.sublistView(utf8.encode(json.encode({...})));
like the change in parent_view.dart
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, missed that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL
'wheel_y_physical_pixel': wheelYPhysicalPixel, | ||
})) | ||
.buffer | ||
.asByteData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, missed that one.
…130577) flutter/engine@427ceaf...3a1b12a 2023-07-14 kustermann@google.com Use utf8.encode() instead of longer const Utf8Encoder.convert() (flutter/engine#43675) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ter#43675) The change in [0] has propagated now everywhere, so we can use `utf8.encode()` instead of the longer `const Utf8Encoder.convert()`. Also it cleans up code like ``` Uint8List bytes; bytes.buffer.asByteData(); ``` as that is not guaranteed to be correct, the correct version would be ``` Uint8List bytes; bytes.buffer.asByteData(bytes.offsetInBytes, bytes.length); ``` a shorter hand for that is: ``` Uint8List bytes; ByteData.sublistView(bytes); ``` [0] dart-lang/sdk#52801
…ter#43675) The change in [0] has propagated now everywhere, so we can use `utf8.encode()` instead of the longer `const Utf8Encoder.convert()`. Also it cleans up code like ``` Uint8List bytes; bytes.buffer.asByteData(); ``` as that is not guaranteed to be correct, the correct version would be ``` Uint8List bytes; bytes.buffer.asByteData(bytes.offsetInBytes, bytes.length); ``` a shorter hand for that is: ``` Uint8List bytes; ByteData.sublistView(bytes); ``` [0] dart-lang/sdk#52801
…lutter#130577) flutter/engine@427ceaf...3a1b12a 2023-07-14 kustermann@google.com Use utf8.encode() instead of longer const Utf8Encoder.convert() (flutter/engine#43675) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
The change in [0] has propagated now everywhere, so we can use
utf8.encode()
instead of the longerconst Utf8Encoder.convert()
.Also it cleans up code like
as that is not guaranteed to be correct, the correct version would be
a shorter hand for that is:
[0] dart-lang/sdk#52801