55 Commits

Author SHA1 Message Date
Jonah Williams
50d6228579
fix Picture.toImage return type check and api conform test. (#9685) 2019-07-06 00:45:07 -07:00
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
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
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
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
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
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
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
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
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
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
Todd Volkert
0c9c293b56
Add Rect.fromCenter() constructor (#8716) 2019-04-25 14:40:29 -07:00
Zachary Anderson
3a29e6a7a7
Plumb arguments from Settings to Dart main() (#8710) 2019-04-25 07:57:54 -07:00
Dan Field
3e47b4bb39
Reland const Rect/RRect (#8695) 2019-04-23 11:21:03 -07:00
Dan Field
4f2fd84cbc
Revert Rect/RRect 64 bit (#8690)
* Revert "fix toString (#8688)"

This reverts commit 9fa7336784b56ef70fd3580ac54d2939d1faa5a0.

* Revert "Make Rect and RRect use 64 bit doubles, and make them const-able (#8565)"

This reverts commit c12315273f6344175dae748ec1f23e15b4e7d59e.
2019-04-22 15:45:59 -07:00
Dan Field
c12315273f
Make Rect and RRect use 64 bit doubles, and make them const-able (#8565)
* Make Rect and RRect 64bit and const-able
2019-04-22 12:58:48 -07:00
David Worsham
ff1bcdc009
Add Views V2 support for Fuchsia (#8115) 2019-04-07 01:18:59 -07:00
Jonah Williams
e633b26c5c
Introduce unit tests and refactor web dart:ui into "package" (#8346) 2019-03-29 14:54:53 -07:00
Jonah Williams
adc6685468
Add platformViewId to stub_ui (#8253) 2019-03-21 18:01:53 -07:00
Jonah Williams
146646d1b9
Correct greater than or equal logic in offset base (#8210) 2019-03-19 13:41:47 -07:00
David Worsham
f7a092262c [fuchsia] Remove deprecated libraries from snapshot (#8085) 2019-03-14 16:05:21 -07:00
Gary Qian
2daebebf4b
Fix text.dart height docs (#8079) 2019-03-13 11:13:53 -07:00
Gary Qian
52b67fdd5a
Expose decorationThickness to dart:ui (#8008) 2019-03-11 16:43:11 -07:00
Jonah Williams
de90dbff7d
Refactor web configuration/ Add dartdevc (#7978) 2019-03-07 11:03:39 -08:00
Gary Qian
3661d5e43b
Re-land "Buffer lifecycle in WindowData" (#8032) 2019-03-06 15:38:34 -08:00
stuartmorgan
dd80fc9ff6
Add engine support for scrollwheel events (#7494)
Adds support for pointer signals, in a way that will support both discrete events (e.g., scroll wheels, flutter/flutter#22762) and continuous gestures (e.g., trackpad scroll, flutter/flutter#21953).

Also exposes these new event options to the embedder. Does not include code to send the
new events from the platform shells.
2019-03-05 14:12:07 -08:00
Greg Spencer
a1d84996dd
Fix spelling errors in dartdocs (#7997)
Fix the spelling errors in the dartdocs for the engine.

There are no functionality changes here, just documentation fixes.
2019-02-28 14:42:55 -08:00
Chris Bracken
5db4b37724
Revert dart rolls (#7913)
* Roll back three Dart SDK rolls

Revert "Roll src/third_party/dart 75ee523f91..4cff5a4fd6 (6 commits)"
Revert "Roll src/third_party/dart 5ddd157809..75ee523f91 (19 commits)"
Revert "Roll src/third_party/dart c92d5ca288..5ddd157809 (153 commits)"

`pub upgrade` appears to fail 100% reproducibly on broken on Windows.
This rollback rolls back both what appears to be the breaking roll (61fc178)
and the following roll.

This reverts commit 0053c1d5064931d7a690b3d8888d15d72785a079.
This reverts commit 1cf6b8b64d42aefcbc6e7d78a2e6df706962751a.
This reverts commit 61fc1786fd98f48ee355f800cf5d7aef0fff985b.

* Revert "Revert "Revert "Remove unnecessary entry-point closurization. (#7827)" (#7876)" (#7904)"

This reverts commit 93eeb48baee5c24047a4a3cf5b1db234ecc48683.
2019-02-21 16:53:20 -08:00
Dan Field
93eeb48bae
Revert "Revert "Remove unnecessary entry-point closurization. (#7827)" (#7876)" (#7904)
This reverts commit f45572e95f93edb89b6750a4f36ad8ed7c0a2560.
2019-02-21 10:57:31 -08:00
Chris Bracken
dad6ec01c3
Correct onAccessibilityFeaturesChanged docs (#7883)
Reference to `accessibilityFlags` corrected to `accessibilityFeatures`.
2019-02-20 08:53:12 -08:00
Chris Bracken
a150cc125a
Fix minor typos in accessibility action docs (#7882)
Fixes a minor pluralisation error in docs for didGainAccessibilityFocus,
didLoseAccessibilityFocus.
2019-02-19 23:27:37 -08:00