* Clarify TextAffinity docs
* Clarify TextPosition and the definition of upstream/downstream
* Docs fixes from code review, less redundant with 'string in code'
This PR replaces the unused `PrerollContext::child_paint_bounds` with `PrerollContext::cull_rect` so we can prune unnecessary preroll tasks (especially cache) based on clips. This PR fixes https://github.com/flutter/flutter/issues/24712
Performance test has been added (https://github.com/flutter/flutter/pull/25381) to make sure that we won't regress again in the future.
Note that the cull_rect here is very similar to those removed in https://github.com/flutter/engine/pull/6352 . We can't compute cull rects in SceneBuilder because of retained layers. But we can still compute and use them to optimize performance in Preroll.
The service protocol's ListViews method needs to return description data for
each engine in the process. Previously ListViews would queue a task to each
UI thread to gather this data. However, the UI thread might be blocked from
executing tasks (e.g. if the Dart isolate is paused), resulting in a deadlock.
This change provides a copy of the engine's description data to the
ServiceProtocol's global list of engines, allowing ListViews to run without
accessing any UI threads.
Fixes https://github.com/flutter/flutter/issues/24400
Most changes are trivial except pushTransform. In pushTransform, matrix4 is an Dart object and it has to be released before we can return a new Dart object (EngineLayer).
* - Roll engine to version f9ebf2129732fd2b606286fdf58e500384b8a0bc
- Update @pragma directive for some classes in semantics.dart
* Update license file.
* Add Locale.fromComponents.
* Change toString from underscores to dashes. Expand the unit tests.
* Rename 'fromComponents' to 'create'. Change variants from String to List<String>.
* Use default for language parameter. Use hashCode/hashList.
* Have toString() stick with old (underscore) behaviour.
* Demonstrate empty-list bug in assert code.
* Fix empty-list assert bug.
* Add ignores for lint issues. Unsure about 71340 though.
* Fix operator== via _listEquals.
* Remove length-checking asserts: we're anyway not checking characters in fields.
* Documentation update.
* Change reasoning for ignore:prefer_initializing_formals.
* Try 'fromSubtags' as new constructor name.
* Documentation improvements based on Pull Request review.
* Assert-fail for invalid-length subtags and drop bad subtags in production code.
* Revert "Assert-fail for invalid-length subtags and drop bad subtags in production code."
This reverts commit d6f06f5e7b3537d60000c47641580475ef16abbe.
* Re-fix Locale.toString() for variants=[].
* Tear out variants, in case we want to have one fewer pointer in the future.
* Make named parameters' names consistent with member names.
* Also remove _listEquals: no longer in use.
* Lint fix.
* Fix code review nits.
* Lint fix for assert, and a couple more not-zero-length-string asserts.
* Code Review: two of three nits addressed...
* Review fix: change 'should' to 'must' for subtag prescriptions.
* Assert-check that countryCode is never ''.
TL;DR: Offscreen surface is created on the render thread and device to host
transfer performed there before task completion on the UI thread.
While attempting to snapshot layer trees, the engine was attempting to use the
IO thread context. The reasoning was that this would be safe to do because any
textures uploaded to the GPU as a result of async texture upload would have
originated from this context and hence the handles would be valid in either
context. As it turns out, while the handles are valid, Skia does not support
this use-case because cross-context images transfer ownership of the image from
one context to another. So, when we made the hop from the UI thread to the IO
thread (for snapshotting), if either the UI or GPU threads released the last
reference to the texture backed image, the image would be invalid. This led to
such images being absent from the layer tree snapshot.
Simply referencing the images as they are being used on the IO thread is not
sufficient because accessing images on one context after their ownership has
already been transferred to another is not safe behavior (from Skia's
perspective, the handles are still valid in the sharegroup).
To work around these issues, it was decided that an offscreen render target
would be created on the render thread. The color attachment of this render
target could then be transferred as a cross context image to the IO thread for
the device to host tranfer.
Again, this is currently not quite possible because the only way to create
cross context images is from encoded data. Till Skia exposes the functionality
to create cross-context images from textures in one context, we do a device to
host transfer on the GPU thread. The side effect of this is that this is now
part of the frame workload (image compression, which dominate the wall time,
is still done of the IO thread).
A minor side effect of this patch is that the GPU latch needs to be waited on
before the UI thread tasks can be completed before shell initialization.
* Revert "Revert "Roll buildtools to 759274dd801b2f78ae0c4066101d0beca27ffc9a" (#6621)"
This reverts commit 9de880cc909c6a687aabb9fbe98fd2e7476fd7e8.
* Revert "Properly gate android API < 21 and remove extraneous data array. (#6619)"
This reverts commit 8cb3965a3ebf1c65d03a78fc6c0b84a8adc3024f.
* Revert "Update Dart version in Dockerfile (#6618)"
This reverts commit 2091c0db69d7ba7772b05564f60c25612e0aaaf4.
* Revert "Don't attempt to build any platform target on Fuchsia. (#6617)"
This reverts commit 739d66eeb3f8777f3e28d3e635a5f691a0f1a16b.
* Revert "Roll Dart to 45f9462398ae7d2e80acd79d3f9c32c7ca6f6f97 (#6616)"
This reverts commit 7d49036d8b14f679509e64bff6f91644cbe11151.
* Revert "Pass null instead of 'none' locale (#6613)"
This reverts commit 6c84c5f6aea84797d9cdc787b342c6a5994524f1.
This reverts commit 74662ab695238af0e7402f41c4bf9ad862bd37d2.
This should land after https://github.com/flutter/engine/pull/6442
* Add pragma vm:entry-point
Otherwise, an object may be both null and an instance of EnginieLayer at
the same time in Dart.
* [dart] Roll dart to b99bcfd3099f0d32e39287160a9539e878cb0b68
Changes since last roll:
```
b99bcfd309 [vm] Add a library and class cache to KernelProgramInfo
5deb1c6e81 [vm] Remove strong mode and sync-async flags from pkg/vm
9a6f811466 Report null error as a NoSuchMethodError
2da0b9f4f1 fix some typos
34f6aea008 [release] Prepare changelog for 2.1.0-dev.7.0
f320477ff9 [dartdevc] add module-name option to kernel backend
b8760fed67 [vm, compiler] Remove ASTs and AST flow graph builder.
340e74629f Clean up OverrideVerifier.
f11e746c2e Initial implementation of fixes for type arguments on named constructor invocations
08e485c43f Update dartdoc to 0.23.1.
ac4b8a7306 Hook up FixProcessor to fix errors in dartfix
0aa99cca99 Ignore JSON exceptions when reading (empty) test results file
6d9cc6fa03 Add skeleton for parsing LSP spec from Markdown/TypeScript to generate Dart data classes
bc4d2f5d1b Switch InheritanceManager2Test to DriverResolutionTest.
e221a6288b Move reporting MISMATCHED_GETTER_AND_SETTER_TYPES for classes to using new interfaces.
be39eacf00 Rename convertPathForImport -> convertAbsolutePathToUri
a539d2ef5f Revert "[fasta] Report errors for bounds violations"
c8b709d95b Update status files after aa6fb2d3
051108c004 [tools] Re-enable core-dump archiving on Linux.
aa5b1b1f2f Make test results in json format end with a newline
4db2bbe94d Pass SharedOptions to Fasta
f1d902f4a0 Ignore --supermixin and -D options
a9b47bd0b1 Integrated nosuchmethod-forwarding.md into dartLangSpec.tex
327a1a9a00 [Gardening] Mark more co19_2 test as always flaky, filed co19 issues
f1b6d81404 Remove Target.strongMode
7072d3b17e [infra] Upgrade d8 to 6.9.427.23 (#34698)
16ddfc1565 [VM] Use assert assignable implementation for explicit downcasts
17ac151f44 [Gardening] Increase timeout on release-hotreload configuration as well (not just debug), skip streamed_conversion_json_utf8_decode in hot-reload-simdbc64
8c872e0e3a Remove TargetFlags.strongMode
ee97806084 Replace strongMode with legacyMode in CompilerOptions
aa6fb2d3a4 [fasta] Report errors for bounds violations
8247fb7eec Stop stripping d8 for benchmarking.
da48c1d960 [Gardening] Mark more tests as flaky and filed co19 issues
41866e87da [Gardening] Mark co19_2 test as always flaky, filed co19 issue (and co19 PR)
ecd13de9da [Gardening] Mark slow_path_shared_stub_test as slow (reaches 1 minute on windows)
f942af451b Remove kernel interpreter
7007567685 Fix issue with --unsafe-package-serialization
2695f36016 [Gardening] Status update (co19_2, optcounter/ia32)
ba5e14b195 Store return type and parameters separately in GenericFunctionTypeElementForLink.
ba1b30af37 Add AST support for type arguments on named constructors
ed6c557d1a Add cli parameters to kernel_sdk.dart to get all paths explicitly
71395df7dd [vm/interpreter] Fix flaky errors when running with interpreter
b3af151325 Rework detection of uninstantiated bound errors.
34651d204e [gardening] Update status
f35465dafd Remove DynamicElementImpl.library property.
daa13ad0aa Fix preamble/d8.js currentScript for v8 6.9
9cde31ba1d Try interface candidates in reverse order.
5561e69f4e Replace dartfix confirm apply changes with --force
619a06370e Update dartfix to only allow target directories
751cf1974a [dart/fuzzer] Add DBC as execution mode.
70317473f0 [gardening] Update status
8fc80031ae Fix cast exception in OpTypeAstVisitor
2cf6ba2996 Generate the right error message for type arguments on a named constructor
5976fe373f Fix up InferredTypeTest_Driver to use InferredTypeMixin directly.
32c484bb71 [VM] Fix typo in BitTestImmediate unit test.
a8e0db1077 [gardening] Mark remaining ASAN failures.
7f55e52888 [vm, x64] Use short forms for object pool loads.
a66cae48fc [vm/aot] Dynamic invocation forwarders in AOT.
4400df4190 Convert strong_mode_test.dart to triple-slash comment style.
c1361963aa Update status files for tests failing due to #34724 and #34724
0039aff1e3 [test] Remove use of --error_on_bad_type and --error_on_bad_override.
ce08911515 [vm/compiler] Minor improvements to loop detection
a2cf88bee6 [vm] Fix sync-async stack navigation to handle inlined functions.
920d75f2ea Cleanup dartfix driver context
746034785d Update dartfix to separate targets from analysis roots
3d06427075 Fix MOVE_FILE test paths for Windows
```
* Remove use of await_is_keyword flag.
* Update license
Provide a relative, per-image limit to the amount of memory
that's used to cache decoded image frames. Adds an overridable default
that developers can set to control how much memory images are allowed
to use decoded vs undecoded. The cap is set in flutter/flutter#22452.
Note that required frames are always cached regardless of the ratio cap,
because they're currently necessary for the GIF to animate. Previously
cached unessential frames are not cleared in response to the cache
hitting or exceeding the cap.
Addresses #20998 and #14344.
This reverts commit 5340f422481a69b4234b2a61f39c486f158b6eed, relands single root filesystem that is needed for reusable platform kernel files, that is safe to land now since dart roll c048bec5d23d0c1bfc0afb980d64940442aa93e1 has the fix for previously broken dependency file generation.