727 Commits

Author SHA1 Message Date
Yegor
94bb7a7ff2
Adds API for retaining intermediate engine layers (#9461)
Add new optional named oldLayer arguments to all push* methods of the SceneBuilder class.

When not null oldLayer signals to the engine that the intent is to update a layer rendered in a previous frame. The engine may optionally use that signal to reuse the resources allocated for that layer in the previous frame. For example, on the Web we can reuse existing DOM nodes and some of their properties and move fewer nodes around the tree.

The return type of each push method has been tightened up. Instead of having all methods return the same EngineLayer type, each method has its own unique layer type, e.g. OffsetEngineLayer. oldLayer parameters match the returned type. This prevents the framework (and other developers using dart:ui directly) from accidentally supplying an engine layer of the wrong type.
2019-06-28 12:56:03 -07:00
Dan Field
0f9e297ad6
Support image filter on paint (#9508) 2019-06-26 23:02:36 -07:00
Shi-Hao Hong
f76d664e5c
Test cleanup geometry_test.dart (#9458)
* Refactor and clean up geometry_tests.dart

* Refactor and clean up stub_ui geometry_tests.dart
2019-06-24 21:52:09 -07:00
liyuqian
a184037971
Send timings of the first frame without batching (#9424)
For https://github.com/flutter/flutter/issues/34867

Test added:
* ReportTimingsIsCalledImmediatelyAfterTheFirstFrame
2019-06-24 12:40:38 -07:00
Shi-Hao Hong
297cbd4b15
Convert RRect.scaleRadii to public method (#9452)
* convert RRect.scaleRadii to public method

* Add scaleRadii tests
2019-06-24 11:20:25 -07:00
chunhtai
9ab6550b45
Introduce read only text field semantics (#9281) 2019-06-19 09:42:23 -07:00
Chinmay Garde
96a1a843cb
Replace lock_guard with scoped_lock and use class template argument deduction. (#9338) 2019-06-17 10:08:45 -07:00
Jason Simmons
70ebfc3610
Fix the name of the channel parameter in PlatformMessage constructors (#9334) 2019-06-14 14:56:51 -07:00
David Worsham
0df44e9e07
[scene_host] Expose Opacity and remove ExportNode (#9297)
SCN-947 #comment
SCN-1291 #comment
2019-06-13 10:16:21 -07:00
Zachary Anderson
0a2e28d797
Revert tracing changes (#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit f80ac5f571479053b134e60bca77603269b2ce2a.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 78265484623037c6544dfd5380367bca29fa27b0.
2019-06-12 10:25:49 -07:00
Dan Field
9baf589d19
[iOS] [a11y] Don't allow scroll views to grab a11y focus (#9282) 2019-06-11 18:02:47 -07:00
liyuqian
de350c4cbb
Report timings faster (100ms) in profile/debug (#9287)
This should satisfy the low-latency need of DevTools.

Test added:
* ReportTimingsIsCalledSoonerInNonReleaseMode
* ReportTimingsIsCalledLaterInReleaseMode
2019-06-11 16:51:20 -07:00
liyuqian
b622d43c39
Make flow layers' attributes immutable (#9176)
For https://github.com/flutter/flutter/issues/33807

We still need to make layers' children immutable for full immutability.
That will require us to change the SceneBuilder API to build the layer
bottom up instead of top down (post-order traversal instead of pre-order
traversal).
2019-06-10 13:09:37 -07:00
Dan Field
afed5c5476
Mark semantics functions const (#9243) 2019-06-08 15:11:04 -07:00
Jonah Williams
c5b55e9a67
add stub implementation (#9242) 2019-06-08 12:51:59 -07:00
Kaushik Iska
06dbe28e33
Fix instantiateImageCodec api diff with web (stub) (#9234)
Also filed: https://github.com/flutter/flutter/issues/34075
to potentially support on web.

addresses:
https://cirrus-ci.com/task/5192675427352576
2019-06-07 15:04:52 -07:00
Jonah Williams
086b5a48d6
move webOnlyScheduleFrameCallback off of window (#9222) 2019-06-07 10:36:50 -07:00
Jason Simmons
74975a4d17 Copy TimingsCallback declaration into the stub_ui package (#9216) 2019-06-06 14:15:12 -07:00
liyuqian
9f088c65ee
Add onReportTimings and FrameRasterizedCallback API (#8983)
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.

Related issues:
https://github.com/flutter/flutter/issues/26154
https://github.com/flutter/flutter/issues/31444
https://github.com/flutter/flutter/issues/32447

Need review as soon as possible so we can merge this before the end of May to catch the milestone.

Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format

This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
2019-06-06 10:42:48 -07:00
Dan Field
7826548462
Align fuchsia and non-fuchsia tracing (#9199) 2019-06-05 15:14:27 -07:00
David Worsham
b304dabc30
[scene_host] Cleanup scene_host closures (#9061)
Fix null closure warnings, and a possible race condition where the
handle for the view_holder_token is destroyed on the gpu thread.  The
handle's destructor enters the isolate, so it must be destroyed on the
UI thread.

FL-257 #done
FL-269 #done
2019-06-04 12:56:03 -07:00
Gary Qian
a4abfb2333
Text inline widget LibTxt/dart:ui implementation (#8207) 2019-06-03 10:32:46 -07:00
Dan Field
79c6ce19a1
Preserve safe area (#8848)
Preserve safe area on Window regardless of insets.
2019-05-31 09:24:38 -07:00
Jonah Williams
e07fc692bd
Roll web sdk (#9146) 2019-05-30 14:04:07 -07:00
Jonah Williams
fa2e2d9fcb
Add checks to constructors and add missing constructor members (#9106) 2019-05-28 13:37:15 -07:00
Chinmay Garde
7e1788acda
Fix unopt variants of profile and release builds. (#9107)
This fixes a regression I introduced in https://github.com/flutter/engine/pull/8869 while preparing the buildroot for Fuchsia.
2019-05-28 12:42:53 -07:00
Chris Bracken
0f1ff3bdb3
Correct typos, adopt US spellings (#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Jason Simmons
82ccba3030
libtxt: have GetRectsForRange(strut) fall back to tight bounds if layout isn't forcing use of the strut (#9058) 2019-05-22 13:57:59 -07:00
Jonah Williams
8dc3a4cde2
Add missing top level to stub_ui (#9060) 2019-05-22 13:10:50 -07:00
Jonah Williams
6299af30ab
remove over-optimistic assert (#9045) 2019-05-22 12:23:48 -07:00
Jason Simmons
135a140591
Add font features (such as tabular numbers) as an option in text styles (#8823)
Fixes https://github.com/flutter/flutter/issues/31691
2019-05-21 16:47:57 -07:00
liyuqian
3d2e9b24aa
Correct the return type of addRetained (#9025)
It should return void as SceneBuilder::addRetained is returning void.
Thanks yjbanov@ for finding this typo!
2019-05-20 15:58:35 -07:00
Dan Field
065fe5b210
remove unnecessary [new from docs (#8986) 2019-05-16 19:14:10 -07:00
Dan Field
34a524837f
Add matrix4 param to Linear gradients (#8985)
* Add matrix4 param to Linear gradients
2019-05-16 13:10:58 -07:00
Jason Simmons
aa63f090fd
libtxt: add a BoxHeightStyle option based on the height of the strut (#8927)
See https://github.com/flutter/flutter/issues/32332
2019-05-16 11:17:20 -07:00
Matthew Dempsky
66087301cd Roll tonic and update #includes (#8950) 2019-05-14 11:57:09 -07:00
Dan Field
1b649a57d1
update docs (#8928) 2019-05-13 11:44:45 -07:00
Michael Klimushyn
14c82d9969
Only cache required frames (#8837)
Remove the extra `decodedCacheRatioCap` parameter, and the
`_frameBitmaps` member from `Codec`. This means that small looped images
will consume more CPU but prevents us from hitting OOM exceptions based
on trying to render multiple larger images.

Also switch to fDisposalMethod for caching frames.

Previously we looped over every single SkCodec::FrameInfo, tracked its
`fRequiredFrame`, and then saved any frames matching those indeces.
Doing this instead avoids that initialization loop and extra data
structure.
2019-05-13 11:18:20 -07:00
Tong Mu
6e3c043141
Synthesize buttons for embedders (#8873)
* Synthesize a buttons = kPrimaryButton for events of down and move
* Add PointerEventButtons
2019-05-10 12:12:51 -07:00
Jonah Williams
1c8e31b4fd
Make sure Window.dpr still has a setter (#8912) 2019-05-09 06:57:01 -07:00
Jonah Williams
78adbf78db
Add web sdk implementation. (#8891) 2019-05-08 18:16:20 -07:00
Kaushik Iska
e7e6689b7f
Expose API to decode images to specified dimensions (#8596)
* Dart side resize primitives exposed

* Write the codec side changes

* return un-scaled image if we can not allocate bitmap

* Format _instantiateImageCodec calls to be single lined

Move null check for size to be inner

* Address CR comments and make image resize dimensions container

* Round not trunc, also format

* Add tests, remove ImageResizeDims from api surface

* Make placeholder value public

* Make the api side changes

* Add a feature to resize pixels and also add tests

* Fix grammar and add more info
2019-05-08 13:57:35 -07:00
Dan Field
2b1f9925e4
new lints (#8849)
Dart lints added:
* Avoid optional new
* Avoid optional const
* Prefer single quotes
* Prefer default assignment `=`
2019-05-07 16:10:21 -07:00
Chinmay Garde
f6e6d39860
Wire up Fuchsia SDK related updated for shell dependencies. #8869
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
2019-05-06 18:01:59 -07:00
Dan Field
09fae08271
fix assert (#8851) 2019-05-04 14:08:23 -07:00
Dan Field
bf89afdf6d
Add asserts to semantics.dart (#8846) 2019-05-04 07:47:22 -07:00
Jonah Williams
1d062db4db
remove unecessary usage of runtimeType in dart:ui (#8844) 2019-05-04 00:24:41 -07:00
Michael Klimushyn
88113925e3
Default the animated frame cache to 0 when unset (#8833)
This default is already set in the framework, but this also needs to be
set in the binding layer to preserve the same behavior when the
deprecated framework parameter is removed.
2019-05-03 11:30:57 -07:00
Jonah Williams
c0be4e2776
Fix api conformance check (#8817) 2019-05-02 14:11:37 -07:00
reed-at-google
ae724f1320
colormatrix is now 0...1 (#8772)
* colormatrix is now 0...1

* reformat
2019-04-29 09:03:10 -04:00