To reproduce:
$ touch foo.c foo.cc foo.cpp foo.h foo.m foo.mm
$ ./ci/format.sh
This will not check any file with clang, as the following command will do a
shell expansion and not find anything in git that matches:
$ git ls-files *.c *.cc *.cpp *.h *.m *.mm
This avoids the possible matrix mismatch between RasterCache::Get and
RasterCacheResult::draw. See
https://github.com/flutter/engine/pull/17790 for an example that tries
to fix an earlier mismatch.
This change converts it from an events that spans a time interval
to an event that occurs at an instant.
We also emit this trace event when there is no lag as opposed to
only when there was a lag to make it monotonous.
Co-authored-by: Kaushik Iska <kaushikiska@google.com>
* adding autofill hints map from flutter values to the browser values, which will be used by the web engine:
* removing unused reverse map
* addressing reviewer comments
* changing licences
This change converts all Float64List matrices to Float32List at the dart:ui interface boundary. Internally, it only uses Float32List. Float32List requires less memory and is orders of magnitude faster to allocate, and it has sufficient precision as Flutter mobile engine and Skia use 32-bit floats anyway.
This change speeds up frame preroll by 50% on the bench_card_infinite_scroll benchmark.
For more details on Float64Array allocation in JS (which backs Float64List in Dart) see the following:
https://bugs.chromium.org/p/v8/issues/detail?id=9199https://bugs.chromium.org/p/v8/issues/detail?id=2022
The C++ text input model used by Windows and Linux currently uses UTF-32. The intention was to facilitate handling of arrow keys, backspace/delete, etc., however since part of what is synchronized with the engine is cursor+selection offsets, and those offsets are defined in terms of UTF-16 code units, this causes very bad interactions with the framework-side model.
This converts to using UTF-16, rather than UTF-32, so that the offsets align with the framework. It also adds surrogate pair handling to the operations that adjust indexes, to avoid breaking surrogate pairs. (Arbitrary grapheme cluster handling is out of scope for this PR; while definitely desirable in the long term, surrogate pair handling is much more critical since improper handling yields invalid UTF-16, which breaks the text field).
This partially fixes https://github.com/flutter/flutter/issues/55014. A framework-side fix is also necessary (since currently both the engine and the framework attempt to handle arrow keys, which is another out-of-scope-for-this-PR issue), but even without the framework fix this dramatically improves the cursor behavior on Windows when there are surrogate pairs somewhere in the string since at least the two sides agree on what indexes mean.
Includes minor plumbing changes to the text input plumbing on Windows so that we're not pointlessly converting from UTF-16 to UTF-32 and then back to UTF-16.