39 Commits

Author SHA1 Message Date
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Michael Goderbauer
8bed1cbe42
Switch to FilterQuality.medium for images (#148799)
https://github.com/flutter/flutter/issues/148253
2024-05-31 03:50:30 +00:00
Michael Goderbauer
60a87d0798
Sync Lints (#127976)
Syncs our lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml:
* removed the deprecated `iterable_contains_unrelated_type` and `list_remove_unrelated_type` lints (their replacement `collection_methods_unrelated_type` was already enabled for us)
* enabled the new `no_self_assignments` and fixed one issue triggered by the lint.
2023-06-02 04:27:17 +00:00
Ian Hickson
ab89ce285f
Clean up the bindings APIs. (#89451) 2022-02-03 14:55:15 -08:00
Darren Austin
225a43d941
Updated skipped tests for rendering directory. (#87700) 2021-08-05 11:32:48 -07:00
Dan Field
c1fe2bd1e0
Reland "Dispose render objects when owning element is unmounted. (#82883)" (#83790) (#83920) 2021-06-07 18:39:02 -07:00
Dan Field
5547bfdb5d
Delete obsolete TODO and skip (#83968) 2021-06-04 10:59:03 -07:00
Ren You
63c49c3d83
Revert "Dispose render objects when owning element is unmounted. (#82883)" (#83790)
This reverts commit c75edc268ca336c66a103f1c0d82c4dff140fca0.
2021-06-02 07:54:19 -07:00
Dan Field
c75edc268c
Dispose render objects when owning element is unmounted. (#82883) 2021-06-01 22:29:02 -07:00
Alexandre Ardhuin
59fc92168a
add missing trailing commas (#81065) 2021-04-23 22:47:40 +02:00
HeavenOSK
66cf8d47a3
[Improvement] Add prefix Alignment. for toString of Alignment (#67860)
* modify: add prefix `Alignment.` for toString of Alignment
2020-10-14 13:47:28 +08:00
Kate Lovett
019e90f7df
[NNBD] Migrates some rendering tests (#67449) 2020-10-07 16:27:06 -07:00
Dan Field
2cdec25877
Reland dispose images when done (#67100) (#67177)
* Reland dispose images when done (#67100)

Changes since last time:

- Test for CanvasKit image rendering
  (https://github.com/flutter/flutter/pull/67176)
- Fix CanvasKit dispose impl
  (https://github.com/flutter/engine/pull/21555)
- Update internal google3 customer with a problematic ImageStream
  Listener impl (cl/335091311, cl/335459002)

This reverts commit 473358d93dd9522970afa82512a4d05685345b3b.
2020-10-05 12:03:27 -07:00
Dan Field
473358d93d
Revert dispose images when done (#67100)
* Revert "docs for image disposal (#67066)"

This reverts commit bcb2ac5a55b90b2ccfd50de4684c0cbb8aca9290.

* Revert "Dispose of images after using them (#66688)"

This reverts commit a7954691dad4788f985cf17e81ce6c474a72e84e.
2020-10-01 16:53:50 -07:00
Dan Field
a7954691da
Dispose of images after using them (#66688)
* Dispose of images after using them
Adds ImageInfo.clone, ImageInfo.dispose, and ImageInfo.isCloneOf.
Makes all stateful holders of ui.Image objects properly clone and dispose of them.
Behavior change for ImageStreamCompleter: Removing the last listener after registering at least one listener results in the object being disposed, and new listeners cannot be added, unless a keepAlive handle is created.
Makes all non-stateful holders of ui.Image (i.e. paintImage and RawImage) assert that whoever gave the image to them has not disposed it on them.
2020-10-01 09:48:54 -07:00
Dan Field
7eb8447485
Allow new methods to be added to ui.Image for tests (#65876)
Remove fake image implementations, add createTestImage to flutter_test
2020-09-22 11:55:39 -07:00
Michael R Fairhurst
7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02: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
5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
Konstantin Scheglov
4fe41abfcc
Add default values for optional parameters. (#27197) 2019-01-29 11:49:57 -08:00
namanix
7aeb539da9 Added a filterQuality parameter to images. (#23329)
* Added a filterQuality parameter to images.

* Removed this break by accident.

* Modified the test case to check the filterQuality

* Update packages/flutter/lib/src/rendering/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Update packages/flutter/lib/src/rendering/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Update packages/flutter/lib/src/rendering/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Update packages/flutter/lib/src/widgets/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Update packages/flutter/lib/src/widgets/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Update packages/flutter/lib/src/rendering/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Update packages/flutter/lib/src/rendering/image.dart

Co-Authored-By: namanix <namanix@gmail.com>

* Added documentation for the new parameter and corrected some space issue's
2018-10-20 20:47:10 -07:00
Jonah Williams
23499f4004
Fix typo in MediaQuery.fromWindow and add invertColors flag to images for smart invert. (#21457) 2018-09-12 14:50:49 -07: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
Todd Volkert
a742b11a50
Roll engine to cb3376c5dedb71cec7a88b8a8904acc5dd6c6ba1 (#16841)
This contains the following commit:

flutter/engine@cb3376c Support different encodings in Image.toByteData() (#16635)
2018-04-21 16:10:39 -07:00
Chinmay Garde
e9177ba3d1 Roll engine to 0c09bf03d. (#16668)
This roll includes the following engine commits:

* flutter/engine@0c09bf03: In the service protocol, if no view is specified to flush tasks on, pick the first one. (#5028)
* flutter/engine@ecaefd7a: Roll src/third_party/skia/ 276886160..1cd6098d5 (50 commits) (#5026)
* flutter/engine@e6545573: Enable 'Speak Screen' and 'Switch Control' for iOS (#5016)
* flutter/engine@3393c179: Fix Android platform channels (#5025)
* flutter/engine@1bc0e1bb: On windows, refer to Dart snapshot directly executable. (#5024)
* flutter/engine@cf6ca32d: Revert "Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79" (#5023)
* flutter/engine@4b45a53e: Only make ERROR and FATAL log levels visible by default. (#5022)
* flutter/engine@98f6c2d5: Fix shell launcher test (dart2 compliant and stop polling) (#5009)
* flutter/engine@75851f08: Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79 (#5020)
* flutter/engine@9495a52d: On iOS, try to use ES3, then fall back to ES2. (#5006)
* flutter/engine@d6d4eec2: Fix broken Linux build (#5019)
* flutter/engine@d15dc76e: Fix broken Chromebot build (#5018)
* flutter/engine@c17a6290: Breadcrumbs to the wiki (#5017)
* flutter/engine@4eaf2c2f: Return raw (unencoded) bytes in Image.toByteData() (#5008)
* flutter/engine@d812a617: Roll src/third_party/skia/ e669bdfad..276886160 (9 commits) (#5014)
* flutter/engine@62aeab72: Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain. (#5012)
* flutter/engine@f4ebb180: Roll src/third_party/skia/ 3462eb034..e669bdfad (54 commits) (#5007)
* flutter/engine@0b7d6be9: Re-land "do not pause rendering when android view loses focus" (#5004)
* flutter/engine@91dee598: If the rasterizer has a valid surface context, use that to create a snapshotting render target. (#4979)
* flutter/engine@570231b7: Specify the packages file path when running engine dart tests. (#5005)
* flutter/engine@0b9cef5a: Minor update to README (#5003)
* flutter/engine@c386418f: Promote line height in text style created from paragraph style (#4995)
* flutter/engine@4e0fbb6f: If the test specifies a .dill file, dont make the engine interpret is as source. (#5002)
* flutter/engine@58e84c8b: Re-land "Support multiple shells in a single process. (#4932)" (#4998)
* flutter/engine@37e5df05: Remove only use of SkPaint::kGenA8FromLCD (#4994)
* flutter/engine@b7358b33: libtxt: cache font families that are remapped to the default font family (#4990)
* flutter/engine@a530035b: libtxt: fix leaks in Skia object reference counting (#4988)
* flutter/engine@0c74fc93: [fuchsia] Fix use-after-free (#4987)
* flutter/engine@b6d2dde9: [fuchsia] Fix build (#4986)
* flutter/engine@1dd12649: [async] Adapt to libasync API changes. (#4980)
2018-04-17 13:41:18 -07:00
Mikkel Nygaard Ravn
10cf0cedad
Revert "Roll engine to 1bc0e1bb9a8db882a21086096cc2b1e0854312b7 (#16643)" (#16661) 2018-04-17 12:40:02 +02:00
Todd Volkert
dd32d1b179 Roll engine to 1bc0e1bb9a8db882a21086096cc2b1e0854312b7 (#16643)
* Roll engine to d6d4eec24c38bb06a9b1aef4e70c321d447ba762

Contains the following engine commits:

flutter/engine@1bc0e1b On windows, refer to Dart snapshot directly executable.
flutter/engine@cf6ca32 Revert "Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79"
flutter/engine@4b45a53 Only make ERROR and FATAL log levels visible by default.
flutter/engine@98f6c2d Fix shell launcher test (dart2 compliant and stop polling)
flutter/engine@75851f0 Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79
flutter/engine@9495a52 On iOS, try to use ES3, then fall back to ES2.
flutter/engine@d6d4eec Fix broken Linux build
flutter/engine@d15dc76 Fix broken Chromebot build
flutter/engine@c17a629 Breadcrumbs to the wiki
flutter/engine@4eaf2c2 Return raw (unencoded) bytes in Image.toByteData()
flutter/engine@d812a61 Roll src/third_party/skia/ e669bdfad..276886160 (9 commits)
flutter/engine@62aeab7 Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain.
flutter/engine@f4ebb18 Roll src/third_party/skia/ 3462eb034..e669bdfad (54 commits)
flutter/engine@0b7d6be Re-land "do not pause rendering when android view loses focus"
flutter/engine@91dee59 If the rasterizer has a valid surface context, use that to create a snapshotting render target.
flutter/engine@570231b Specify the packages file path when running engine dart tests.
flutter/engine@0b9cef5 Minor update to README
flutter/engine@c386418 Promote line height in text style created from paragraph style
flutter/engine@4e0fbb6 If the test specifies a .dill file, dont make the engine interpret is as source.
flutter/engine@58e84c8 Re-land "Support multiple shells in a single process.
flutter/engine@37e5df0 Remove only use of SkPaint::kGenA8FromLCD
flutter/engine@b7358b3 libtxt: cache font families that are remapped to the default font family
flutter/engine@a530035 libtxt: fix leaks in Skia object reference counting
flutter/engine@0c74fc9 [fuchsia] Fix use-after-free
flutter/engine@b6d2dde [fuchsia] Fix build
flutter/engine@1dd1264 [async] Adapt to libasync API changes.

* Run test platform finalizers in reverse order to ensure that shell is shutdown before trying to delete any temporary files or directories. This fixes "Access Denied" error on Windows (see #16657).
2018-04-17 11:52:00 +02:00
Todd Volkert
06ed3622a3
Roll engine to d2b69fec751d6d11f62019c863b2cba4ce575bfe (#16307) 2018-04-06 10:09:16 -07:00
Jacob Richman
ed54868c22
Change enum properties to use camel case instead of dash separated names
Make regular Alignment values look more like enumProperties while
leaving more complex AlignmentDirectional values unchanged.
2017-12-07 10:32:56 -08:00
Adam Barth
2b126bcd0d Add Alignment, which will replace FractionalOffset (#12342)
Unlike FractionalOffset, Alignment uses the center as the zero of the
coordinate system, which makes the RTL math work out much cleaner.

Also, make FractionalOffset into a subclass of Alignment so that clients
can continue to use FractionalOffset.
2017-10-01 23:06:18 -07:00
Ian Hickson
e04bf3285d Image RTL (#12230) 2017-09-24 16:14:55 -07:00
Alexandre Ardhuin
cde6b669b3 unnecessary statements (#12189) 2017-09-21 08:33:56 +02:00
Jacob Richman
f2ab841ac4 Add DiagnosticLevel used to filter how verbose toStringDeep output for (#11995)
Diagnostics object is.
2017-09-11 19:01:05 -07:00
Jacob Richman
9dab22684a More toStringDeep and toString tests. (#11028) 2017-06-29 18:57:21 -07:00
Alexandre Ardhuin
c8447c91a9 prefer_const_constructor in packages/flutter/test (#7181) 2016-12-09 15:20:27 -08:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Ian Hickson
a94999ba50 Clean up imports and exports.
Each layer is supposed to reexport the parts of the previous layer
that are part of its API.

- In painting.dart, export from dart:ui all the Canvas-related APIs
  that make sense to be used at higher levels, e.g. PaintingStyle.

- Delete painting/shadows.dart. It was dead code.

- In rendering/object.dart, export all of painting.dart.

- In widgets/basic.dart, export all of painting.dart and
  animation.dart. Some classes in animation/ are renamed to make this
  less disruptive and confusing to the namespace.

- Split out Stocks back into an import model rather than a part model,
  so that it's easier to manage its dependencies on a per-file basis.

- Move Ticker to scheduler library.

- Remove as many redundant imports as possible now.

- Some minor nit picking cleanup in various files.
2016-02-11 00:06:23 -08:00
Ian Hickson
7151fdd054 Move flutter tests from packages/unit to packages/flutter/test 2015-12-16 08:00:57 -08:00