518 Commits

Author SHA1 Message Date
Matt Carroll
194608290e
Move Brightness definition to dart:ui (#27479) (#7678) 2019-02-04 13:29:53 -08:00
Kaushik Iska
b94e759b25
Expose the Flutter engine, Dart and Skia versions to Dart. (#7634)
- Moved versions from shell to common
- versions singleton contains all the required versions.
2019-01-30 16:22:45 -08:00
Gary Qian
2c610bfec6
Fix dynamic array -> vector (#7645) 2019-01-30 13:03:27 -08:00
Gary Qian
c92df428ef
Strut implementation (#7414)
Engine half of flutter/flutter#26332
2019-01-30 10:16:37 -08:00
Dan Field
78e145d056
Improve PathMetrics (#7621)
* Improve PathMetrics

* Use index instead of dirty

* revert unintended change

* space
2019-01-29 12:40:48 -08:00
Chinmay Garde
23b7e29f04
Re-land "Wrap the user entrypoint function in a zone with native exception callback. (#7512)" (#7551)
This reverts commit 4c135c298a8173bb9affafc1f92120a0158c1e6e and applies relevant fixes.
2019-01-24 13:42:51 -08:00
Vyacheslav Egorov
4c135c298a
Revert "Wrap the user entrypoint function in a zone with native exception callback. (#7512)" (#7522)
This reverts commit 25559ed0779604d56c47c5d2341ffd16b137cd10.

Reason for revert: broken in AOT mode.

@pragma('vm:entry-point') placed on a function only instructs
the compiler to retain the function itself, but does not tell
compiler to generate and retain tear-off for this function.

In this PR _runMainZoned was marked as an entry-point but C++
code was trying to tear it off and use a closure, instead of
invoking it directly, which is not supported.
2019-01-17 11:49:20 +01:00
Chinmay Garde
25559ed077
Wrap the user entrypoint function in a zone with native exception callback. (#7512) 2019-01-16 16:08:51 -08:00
Michael Goderbauer
6c68bf3caf
Revert "Revert "Add elevation and thickness to SemanticsNode (#7282)" (#7483)" (#7484)
This reverts commit 24cf93e2555da5f0b464b55c43fe4b1a7dd06eed.
2019-01-15 18:56:21 -08:00
Jason Simmons
3b13c4a9c1
Execute Picture.toImage on the current thread in the test environment (#7485) 2019-01-15 12:02:29 -08:00
Michael Goderbauer
24cf93e255
Revert "Add elevation and thickness to SemanticsNode (#7282)" (#7483)
This reverts commit 6c29fb4d5eeeba8aee7c484de185bf1d3679042a.
2019-01-15 10:45:49 -08:00
Michael Goderbauer
6c29fb4d5e
Add elevation and thickness to SemanticsNode (#7282) 2019-01-15 09:59:44 -08:00
Dan Field
43fa420b04
Make IOManager own resource context (#7272)
* Make IOManager own resource context
2019-01-14 13:46:38 -08:00
Ian Hickson
3996efb22b
[HR] Documentation cleanup (#7370)
* Documentation cleanup

* Typo fix
2019-01-14 12:46:32 -08:00
Razvan Lung
2820157751 add ColorFilter matrix support (#7459)
* add ColorFilter matrix support
2019-01-14 10:45:06 -08:00
Jason Simmons
82097a4268
Move Picture.toImage rasterization to the GPU thread (#7442)
Reuses the implementation that was previously done for Scene.toImage
(see 20c805c973)

This introduces a breaking API change:
Picture.toImage is now asynchronous and returns a Future<Image>

Fixes https://github.com/flutter/flutter/issues/23621
2019-01-14 09:39:03 -08:00
Dan Field
6179ac6377
fix up analysis for Dart in Engine (#7404)
* fix up analysis for Dart in Engine, particularly for tests
2019-01-11 13:50:58 -08:00
Jason Simmons
cd98f6bdb5
Clear the font collection's cache when a font is dynamically loaded (#7436)
Fixes https://github.com/flutter/flutter/issues/26293
2019-01-10 11:26:49 -08:00
liyuqian
dea6a08499
Remove legacy and deprecated defaultClipBehavior (#7439)
The defaultClipBehavior is no longer used anywhere in the Flutter framework and Google3.
2019-01-11 02:31:15 +08:00
Justin McCandless
39a99b0050
Docs improvements per @Hixie's comments (#7387) 2019-01-10 07:46:50 +08:00
Jonah Williams
42f449fa47
remove deprecated updateNode argument (#7413) 2019-01-08 16:39:38 -08:00
Dan Field
937ee8bf9d
Cleanup dead code (#7409)
* Remove unused files
2019-01-08 12:21:25 -08:00
Dan Field
5965f9084b
Make ParagraphConstraints have const constructor (#7346) 2019-01-07 08:51:47 -08:00
Ben Konyi
b35f021a8e
Update GetCallbackHandle to use Dart_IsTearOff instead of a string comparison (#7324)
* Update GetCallbackHandle to use Dart_IsTearOff instead of a string
comparison to determine whether or not a closure was provided as an
argument to PluginUtilities.GetCallbackHandle.

Fixes #24394
2019-01-04 14:41:56 -08:00
liyuqian
e52287a1b5
Fix typo clas -> class (#7360) 2019-01-03 10:06:17 -08:00
Michael Klimushyn
770536ab6c
Only overflow the cache for one required frame (#7048)
Previously codec.cc needed all required frames to already be decoded
before it could decode any of their dependent frames. To accomplish this
it would always cache required frames, regardless of cache limit.

However both GIF and WEBP (the only currently supported animated image
formats) only allow the image to depend on one decoded frame at a time.
This means that there's no reason to cache all the required frames since
it's only valid for the image formats to require one previously decoded
frame at a time. (For example, frame 10 and frame 11 in a hypothetical
animated image could all depend on frame 9. But no subsequent frame
after frame 9 could depend on frames 0-8.)

Frames are always added to the cache as long as they're under the limit,
and never removed. Required frames are always stored as a separate
member on `MultiFrameCodec`.

Warning: this logic will break if we decide to support more animated
formats in the future.

Fixes flutter/flutter#24835.
2018-12-21 16:55:54 -08:00
Gary Qian
215ca15600
Support user-provided font-fallback. (#7241)
* Support user-provided font-fallback.

* Use tonic to pass to native

* Handle font families as a fallback vector in LibTxt

* Fix docs

* Concatentate fontFamily lists in dart before passing to engine

* Fix formatting

* Reworked font family matching to search all managers

* Fix formatting

* Proper toString null checking to keep format consistent

* Formatting

* Move _listEquals out of textstyle as it is not specific to TextStyle and will later be used for paragraphStyle too
2018-12-21 15:07:47 -08:00
Justin McCandless
8532868d8b
Address some comments on previous doc improvement PR (#7274) 2018-12-21 10:46:11 -08:00
Stanislav Baranov
ead76a4db8
Remove unused native function dumpCopmpilationTrace(). (#7276)
Framework has stopped using it as of https://github.com/flutter/flutter/pull/25594.
2018-12-20 16:32:40 -08:00
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