Commit graph

34 commits

Author SHA1 Message Date
Alexandre Ardhuin 4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Ian Hickson 449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Alexandre Ardhuin c3ddfb924f
add missing trailing commas (in examples/) (#40701) 2019-09-18 20:48:07 +02:00
gaaclarke 9b150f134b
Sped up shader warmup by only drawing on a 100x100 surface (#36482)
Sped up shader warmup by only drawing on a 100x100 surface and doing
the draw calls on top of each other.
2019-07-26 10:05:40 -07:00
Dan Field fe9512fa72
Re-enable const (#31600)
* Re-enable const
2019-04-29 16:02:42 -07:00
Shi-Hao Hong cbfa4e5483
Improve canvas example in sample dart ui app (#31634) 2019-04-26 20:25:02 -07:00
Alexandre Ardhuin 387f885481
Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters

* add trailing commas on Invocation with nb of arg>1

* add commas for widget containing widgets

* add trailing commas if instantiation contains trailing comma

* revert bad change
2019-03-01 08:17:55 +01:00
liyuqian c63dcf3bcd
Make shader warm-up async so it can handle image (#28687)
## Description

This moves another 15-20ms from the animation jank of one of our important client to the startup latency. Unfortunately, this is probably not captured in our current benchmarks (presumably some other bottlenecks overshadow this shader compilation in the worst_frame benchmark). Considering that drawing images is such a common operation, maybe we should add one in the future to benchmark this.

We need this PR to land soon for our client because this changes the API to return Future.

## Related Issues

https://github.com/flutter/flutter/issues/813
2019-02-28 20:07:55 -08:00
liyuqian 19a6a6f431
Reland "Shader warm up (#27660)" (#28537)
This reverts commit adc8e159a5.

This should be safe to land once https://github.com/flutter/flutter/pull/28530 gets merged

Merge on yellow doc test because the doc test is actually green.
2019-02-27 09:33:08 -08:00
liyuqian adc8e159a5
Revert "Shader warm up (#27660)" (#28376)
This reverts commit a44f174efc.

Reason: start_up tests become flaky.

See https://github.com/flutter/flutter/issues/28374

TBR: xster

Merge on red to fix the tree
2019-02-22 17:32:37 -08:00
liyuqian a44f174efc
Shader warm up (#27660)
This patch adds a default shader warm up process which moves shader compilation from the animation time to the startup time. This also provides an extension for `runApp` so developers can customize the warm up process.

This should reduce our worst_frame_rasterizer_time_millis from ~100ms to ~20-30ms for both flutter_gallery and complex_layout benchmarks. Besides, this should also have a significant improvement on 90th and 99th percentile time (50%-100% speedup in some cases, but I haven't tested them thoroughly; I'll let our device lab collect the data afterwards).

The tradeoff the is the startup time (time to first frame). Our `flutter run --profile --trace-startup` seems to be a little noisy and I see about 100ms-200ms increase in that measurement for complex_layout and flutter_gallery. Note that this only happens on the first run after install or data wipe. Later the Skia persistent cache will remove the overhead.

This also adds a cubic_bezier benchmark to test the custom shader warm up process.

This should fix https://github.com/flutter/flutter/issues/813 (either by `defaultShaderWarmUp`, or a `customShaderWarmUp`).
2019-02-22 15:37:02 -08:00
Chris Bracken 65a70bc7d3
Re-enable use of ParagraphConstrains const ctor (#26990)
All embedders of Flutter within Google have all been updated to an
engine version that includes the const constructor added in
flutter/engine#7346 and rolled into the framework in
flutter/flutter#26252.

This reverts commit 88b77a7d0f.

This fixes https://github.com/flutter/flutter/issues/26390.
2019-01-23 16:32:23 -08:00
Chris Bracken 88b77a7d0f
Avoid use of ParagraphConstrains const ctor (#26392)
Usages of ParagraphConstraints (from dart:ui) whose constructor could be
const as of flutter/engine#7346 are currently marked //
ignore:prefer_const_constructors in the framework until all
Google-internal embedders have been updated to an engine version that
includes the above change. These were initially updated in engine roll
flutter/flutter#26252, but broke internal embedders.

We should re-enable use of the const constructor in those cases once
internal embedders are updated.

See: https://github.com/flutter/flutter/issues/26390
2019-01-10 17:25:24 -08:00
Ben Konyi 6412f35c5e
Manual engine roll with fixes: (#26252)
7112b72cc2...e5ec3cf3ea

git log
7112b72cc229e05d36716c3d7739885d3ffa72e6..e5ec3cf3ea5ce78c6c3116271601f60d30a799d4
--no-merges --oneline
e5ec3cf3e Dart SDK roll for 2019-01-08
08c95d27a Roll src/third_party/skia 55ff5d3ba881..1337f5b85978 (10
commits) (flutter/engine#7407)
e385f5cbb Roll src/third_party/skia 26d173fee72b..55ff5d3ba881 (12
commits) (flutter/engine#7406)
0f8273b0c Dart SDK roll for 2019-01-07
4036b260a Reset ParagraphBuilder after build() (flutter/engine#7401)
4820cbec4 Dart SDK roll for 2019-01-07
8eccb860d Add onStart hook to FlutterFragmentActivity
(flutter/engine#6719)
f2ea838b3 Roll src/third_party/skia b2fdcbf3033f..26d173fee72b (10
commits) (flutter/engine#7400)
5ca8aadaa Announce in/out of list (flutter/engine#6918)
4487d392d Replace Java code with equivalent, more concise code.
(flutter/engine#7398)
395b7852d Roll src/third_party/skia 46ee3f7a8ff5..b2fdcbf3033f (11
commits) (flutter/engine#7394)
5965f9084 Make `ParagraphConstraints` have const constructor
(flutter/engine#7346)
e02dd416a Roll src/third_party/skia a47eb455360f..46ee3f7a8ff5 (2
commits) (flutter/engine#7390)
f0038b3cc Roll src/third_party/skia 3ac3a4053f86..a47eb455360f (2
commits) (flutter/engine#7389)
2019-01-08 17:59:16 -08:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Jason Simmons 466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Ian Hickson e1174eb0f2
TextPainter RTL (#12791) 2017-10-31 10:39:34 -07:00
Ian Hickson ca7d2d23cf TextPainter RTL (#11888) 2017-09-07 16:57:38 -07:00
Ian Hickson bf017b79b3 Move Point to Offset (#9277)
* Manually fix every use of Point.x and Point.y

Some of these were moved to dx/dy, but not all.

* Manually convert uses of the old gradient API

* Remove old reference to Point.

* Mechanical changes

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\bPoint[.]origin\b/Offset.zero/g'
git ls-files -z | xargs -0 sed -i 's/\bPoint[.]lerp\b/Offset.lerp/g'
git ls-files -z | xargs -0 sed -i 's/\bnew Point\b/new Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bconst Point\b/const Offset/g'
git ls-files -z | xargs -0 sed -i 's/\bstatic Point /static Offset /g'
git ls-files -z | xargs -0 sed -i 's/\bfinal Point /final Offset /g'
git ls-files -z | xargs -0 sed -i 's/^\( *\)Point /\1Offset /g'
git ls-files -z | xargs -0 sed -i 's/ui[.]Point\b/ui.Offset/g'
git ls-files -z | xargs -0 sed -i 's/(Point\b/(Offset/g'
git ls-files -z | xargs -0 sed -i 's/\([[{,]\) Point\b/\1 Offset/g'
git ls-files -z | xargs -0 sed -i 's/@required Point\b/@required Offset/g'
git ls-files -z | xargs -0 sed -i 's/<Point>/<Offset>/g'
git ls-files -z | xargs -0 sed -i 's/[.]toOffset()//g'
git ls-files -z | xargs -0 sed -i 's/[.]toPoint()//g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point, /show /g'
git ls-files -z | xargs -0 sed -i 's/\bshow Point;/show Offset;/g'

* Mechanical changes - dartdocs

I applied the following at the root of the Flutter repository:

git ls-files -z | xargs -0 sed -i 's/\ba \[Point\]/an [Offset]/g'
git ls-files -z | xargs -0 sed -i 's/\[Point\]/[Offset]/g'

* Further improvements and a test

* Fix minor errors from rebasing...

* Roll engine
2017-04-12 15:06:12 -07:00
Chris Bracken 4c8c420e0b Declare locals final where not reassigned (layers) (#8572) 2017-03-03 18:04:27 -08:00
Alexandre Ardhuin 8c043d06de fix lints for directives_ordering rule (#8382) 2017-02-23 13:37:26 -08:00
Alexandre Ardhuin e9a775bf38 prefer const constructors (#8316) 2017-02-21 14:54:29 -08:00
Adam Barth a4a783b64f Add support for pointer hover (#6884) 2016-11-15 21:13:37 -08:00
Jason Simmons 617fa8c3a9 Engine roll with updates to the ParagraphBuilder constructor (#6528) 2016-10-25 12:20:02 -07:00
Adam Barth c9eda86b0e Switch to PointerData API (#6131)
Now dart:ui does the decoding of the pointer data itself, which means we don't
need to do it in the framework.
2016-09-29 21:25:20 -07:00
James Robinson a95c9fdb58 Isolate imports of generated Dart code from generated path (#5960)
This rewrites imports of various mojom.dart files from the Flutter
engine repo to instead import normal-looking dart files from the
(new) flutter_services package. This package handles exporting the
correct symbols from generated code wherever that may live.

Includes an engine roll to 3551e7a48e2e336777b15c7637af92fd7605b6c5
which contains the new flutter_services package.
2016-09-21 14:00:29 -07:00
Adam Barth 179ea4a0a6 Update framework to account from engine API changes (#5887)
The engine now reports coordinates in physical pixels.
2016-09-15 13:13:42 -07:00
Adam Barth 5497ba182f Update engine (#3637)
Turns out there were more clients of the old paragraph API than I expected.
This patch migrates them to the new API.
2016-04-29 11:19:35 -07:00
Adam Barth c9d3217c3b Use Canvas#drawParagraph
We'll eventually remove Paragraph#paint.

Fixes #2694
2016-03-17 13:45:35 -07:00
Hixie a16f07d945 Drop the argument to SceneBuilder's constructor 2016-03-08 14:17:01 -08:00
Adam Barth 245c5ae2b8 Remove the one use of DrawLooper
We're going to remove DrawLooper from the canvas API soon.
2016-03-03 17:32:34 -08:00
Adam Barth 1ab3d3a71c Add a raw hello_world that shows "Hello, world"
Previously, hello_world.dart was an interactive circle. I've moved that
to touch_input.dart. We should eventually harmonize the touch input
examples at all the layers.
2016-02-13 16:51:00 -08:00
Adam Barth 025c43de1c Adds documentation to the layering examples 2016-02-13 16:14:42 -08:00
Adam Barth 948ae15ca5 Clean up the standalone examples
Our examples have been growing organically over time. This patch cleans
them up to illustrate specific aspects of Flutter.
2016-02-13 11:00:58 -08:00