553 Commits

Author SHA1 Message Date
Justin McCandless
cc51731d82
Clarify TextAffinity docs (#7238)
* Clarify TextAffinity docs

* Clarify TextPosition and the definition of upstream/downstream

* Docs fixes from code review, less redundant with 'string in code'
2018-12-20 14:14:04 -08:00
Stanislav Baranov
e859296b71
Document native functions for compilation trace (#7256) 2018-12-20 11:48:59 -08:00
Chris Bracken
8939e2abeb
Fix a misspelling (#7234)
Change funciton to function in a doc comment.
2018-12-18 20:08:46 -08:00
liyuqian
ba117366ef
Compute cull_rect and optimize in Layer::Preroll (#6923)
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.
2018-12-18 09:54:52 -08:00
Jimmy Casey
f986a12e20 Correct spelling in doc comments (#7179)
Applies spelling corrections to accessibility-related doc comments and in the
license tool.
2018-12-16 12:51:00 -08:00
Ian Hickson
17789249d7
Offset.fromDirection and Size.aspectRatio (#6805) 2018-12-15 08:31:59 -08:00
Gary Qian
25b58c0c67
Revert "Support overriding font leading in TextStyle and LibTxt (#6927)" (#7187)
This reverts commit 4b233f033b8ba7b7e5e84f1607dbdf2e4dcdc5d8.
2018-12-11 10:43:03 -08:00
Stanislav Baranov
9e64d79dbb
Add native for fetching compilation trace as a memory buffer (#7152) 2018-12-10 17:23:23 -08:00
Gary Qian
9434bb6488
Return null when locale has not been set in loocale closure. (#6936) 2018-12-10 16:04:23 -08:00
Gary Qian
4b233f033b
Support overriding font leading in TextStyle and LibTxt (#6927) 2018-12-10 15:35:44 -08:00
Amir Hardon
5bf4deb435
Update Dartdoc for SceneBuilder#addPlatformView (#6957) 2018-11-27 10:03:16 -08:00
Jason Simmons
3978f07530
Keep a copy of each engine's description that can be accessed outside the engine's UI thread (#6885)
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
2018-11-16 14:47:40 -08:00
Ben Konyi
6461f4650e
Don't allow for creation of CallbackHandle objects for anonymous closures (#6864)
* Don't allow for creation of CallbackHandle objects for anonymous closures. Fixes issue #22310
2018-11-15 10:00:51 -08:00
liyuqian
289de46d3e
Return EngineLayer for all SceneBuilder pushXXX (#6814)
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).
2018-11-14 10:37:17 -08:00
Dan Field
396402f5bd
Flush UserSettings to window (#6850) 2018-11-13 23:41:56 -08:00
Siva
97b62938bd
Add missing pragma directive. (#6847) 2018-11-13 16:18:17 -08:00
Siva
e6d6f18eb6
- Roll engine to version f9ebf2129732fd2b606286fdf58e500384b8a0bc (#6839)
* - Roll engine to version f9ebf2129732fd2b606286fdf58e500384b8a0bc
- Update @pragma directive for some classes in semantics.dart

* Update license file.
2018-11-13 09:03:58 -08:00
Michael Goderbauer
09ef73ff6e
Fix code smells reported by chrome's clang plugin (#6833) 2018-11-12 19:59:29 -08:00
Gary Qian
06377b1076
Document not passing empty-strings into Locale (#6818) 2018-11-11 03:42:28 -08:00
Mehmet Fidanboylu
94dd7165ef
Skia Cleanup (#6786) 2018-11-07 15:29:52 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
Gary Qian
6fa5c0a828
Pass scriptCode into Locale on initialization. (#6711) 2018-11-06 16:16:54 -08:00
Stanislav Baranov
b5758d0d38
Propagate positions of secondary pointers in UP events on Android (#6716) 2018-11-02 10:51:35 -07:00
Gary Qian
7be0217d67
Roll back _countryCode assert - breaking change (#6693)
* Roll back _countryCode assert - breaking change

* Add tests back in
2018-10-29 17:27:12 -07:00
hugovdm
2b2fbf0f64 Add Locale.fromSubtags and support for scriptCode. (#6518)
* 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 ''.
2018-10-29 14:48:59 -07:00
Chinmay Garde
ba8f6aa71c
Handle Windows headers defining ERROR to 0 in log levels. (#6677) 2018-10-26 16:47:14 -07:00
Mehmet Fidanboylu
3236b49cea
Add missing includes (#6670) 2018-10-26 10:16:56 -07:00
Stanislav Baranov
dd791f36ac
Propagate pointer size from Android MotionEvent (#6662) 2018-10-26 09:39:10 -07:00
sjindel-google
ff0525f594
Add missing entry-points. (#6634)
* Add missing entry-points.

* Fix lint
2018-10-25 13:12:05 +02:00
Gary Qian
9f2e2ba7b9
Add/expose API for Paragraph.getBoxesForRange BoxHeightStyle and BoxWidthStyle. (#6644) 2018-10-24 15:22:32 -07:00
Chinmay Garde
e1e60933b2
Realize kernel asset mappings on a worker thread if one is available. (#6648) 2018-10-24 11:33:46 -07:00
Gary Qian
2586e94122
Support all combinations of GetRectsForRange styles (#6591) 2018-10-23 11:06:21 -07:00
Chinmay Garde
20c805c973
Ensure that Scene::toImage renders texture backed images. (#6636)
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.
2018-10-22 17:40:24 -07:00
Gary Qian
cdd592f5be
Reland 'Pass null instead of 'none' locale' (#6632) 2018-10-22 15:21:04 -07:00
Gary Qian
ce36d85d60 Revert "Pass null instead of 'none' locale" (#6622)
* 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.
2018-10-19 23:44:40 -07:00
Gary Qian
6c84c5f6ae
Pass null instead of 'none' locale (#6613) 2018-10-19 14:19:11 -07:00
liyuqian
e79d77f6e6
Add offset to engine OpacityLayer (#6594)
See https://github.com/flutter/flutter/pull/22566#discussion_r226082171
for why we add this.
2018-10-19 11:46:12 -07:00
Michael Klimushyn
abd04b459c
Programmatically set the root isolate's debug name (#6596)
An integration test will be added to the framework's repo as a followup.

Addresses flutter/flutter#22009
2018-10-18 14:47:24 -07:00
Jason Simmons
c176244790
Provide an estimate of EngineLayer memory usage to the Dart GC (#6589)
See https://github.com/flutter/flutter/issues/23171
2018-10-18 12:24:10 -07:00
Gary Qian
35340ceaf0
Pass full locale list with script and variant codes to framework (#6557)
* Locale Passing

* Pass full locale list and script and variant codes to framework

* Working Android locale list passing and fallback
2018-10-17 10:53:01 -07:00
Greg Spencer
6697d9dded
Update @animation dartdoc directives to current api (#6552) 2018-10-16 15:50:28 -07:00
Amir Hardon
a1bbea77cf
Add a no-op platform view layer. (#6505)
This will be used for embedding UIViews on iOS.

Landing a no-op layer as a first incremental step to keep PRs small.
2018-10-12 19:40:21 -07:00
Jason Simmons
32841dd89b
Case-insensitive matching of family names for custom fonts (#6519) 2018-10-12 14:32:32 -07:00
Jason Simmons
f2e7441b55
An API for loading fonts from a buffer provided by the application (#6508) 2018-10-12 10:27:22 -07:00
Gary Qian
5f529566c9
Add support for text shadows (#6385)
Text shadows can now be added to a TextStyle by providing a List<Shadow>. The dart:ui Shadow class is now the base class to flutter BoxShadow.
2018-10-12 09:09:18 -07:00
liyuqian
e44c10c962
Reland "Share engine layers with the framework" (#6412) (#6468)
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.
2018-10-12 07:45:42 -07:00
Gary Qian
61cf4c01fd
Pass scriptcode and variantcode to dart:ui Window. (#6493) 2018-10-10 17:22:59 -07:00
Alexander Aprelev
daed2b7d61
[dart] Roll dart to b99bcfd3099f0d32e39287160a9539e878cb0b68 (#6491)
* [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
2018-10-10 15:27:54 -07:00
Michael Klimushyn
7afbcd974c
Add a ratio cap to decoded animated image frames (#6310)
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.
2018-10-09 17:07:46 -07:00
Alexander Aprelev
289c6b1a1c
Revert "Revert "Use single_root_scheme when compiling platform (#6402)" (#6431)" (#6473)
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.
2018-10-09 08:00:00 -07:00