For consistency with the rest of dart:ui, check required parameters with
assert(param != null) rather than throwing ArgumentError. ArgumentError
is typically reserved for checking the validity of non-null args -- e.g.
that a list has the required number of elements.
* Reland "Added IsolateNameServer functionality (#5410)"
This reverts commit c3976b3c7183f479717bffed3f640fb92afbd3dc.
* Fixed issue with isolate_name_server_test which caused test to timeout
* Disabled thread_annotations on Android as they aren't supported in the
NDK headers for std::mutex. Readded thread annotations to
IsolateNameServer.
* Added IsolateNameServer functionality, which allows for the association
of string names with isolate SendPort ids that can be used to establish
inter-isolate communications.
This is helpful for some Material Design widgets, which are specified as a semi-transparent color over top of a "material". In some cases, the resulting alpha-blended color can be used instead of compositing an additional shape with an opacity.
This new Color.alphaBlend function mimics the alpha blending function, and creates the resulting combined color. The optimization only works for solid color shapes that have the same geometry, of course.
* add path measure
* fix typo
* getBound and addPathWithMatrix
* Add myself to Authors, add PathOps
* fix linting issues
* update licenses_flutter to add new files
* Use matrix4 instead of matrix3 for consistency/interop
* put pubspec back
* fix bug in getSegment
* fix typo
* Add return value for PathOp
* refactoring from review
* refactoring from review - still TBD on computeMetrics()
* add doc
* lint issue
* fix computeMetrics, add Path.from
* add missing wireup for clone
* change PathMetrics to iterable, fix bug with angle on Tangent
* prefer std::make_unique
* cleanup docs
* add path measure
* fix typo
* getBound and addPathWithMatrix
* Add myself to Authors, add PathOps
* fix linting issues
* update licenses_flutter to add new files
* Use matrix4 instead of matrix3 for consistency/interop
* put pubspec back
* fix bug in getSegment
* fix typo
* Add return value for PathOp
* refactoring from review
* refactoring from review - still TBD on computeMetrics()
* add doc
* lint issue
* fix computeMetrics, add Path.from
* add missing wireup for clone
* change PathMetrics to iterable, fix bug with angle on Tangent
* prefer std::make_unique
* cleanup docs
* fix iterator bug
* remove unnecessary clone for computeMetrics
* fix some doc issues
* fix PathMeasure iterator, extendWithPath, isClosed, and pubspec.lock
* get rid of orElse; use StateException
* StateError, not StateException
* doc improvements and nits
* add unit tests, fix bugs found during testing
* fix two uncommited doc changes
* one more
* change sign of tangent angle, update docs
* update unit tests for inverted angle
* update tangent to include vector
* Doc fixes
* Fix MSVC compilation and unit test
After we write the pixels in the correct format,
the color type of the SkPixmap is still set to
its previous value, so the existing assertion was
failing.
Building image encoding into the engine bloated the
binary size. This change will return raw bytes, and
callers who use this functionality can take on the
dependency on image encoding in their apps (via a
Dart package or a platform plugin).
Fixes https://github.com/flutter/flutter/issues/16537
* Revert "Add support for measuring, combining, and getting bounds of Path objects (#4799)"
This reverts commit 8c00101a59cd16c30d51663b58c6f2ee9ee2e2b9, as it broke engine build bots on Linux and Windows.
* add path measure
* fix typo
* getBound and addPathWithMatrix
* Add myself to Authors, add PathOps
* fix linting issues
* update licenses_flutter to add new files
* Use matrix4 instead of matrix3 for consistency/interop
* put pubspec back
* fix bug in getSegment
* fix typo
* Add return value for PathOp
* refactoring from review
* refactoring from review - still TBD on computeMetrics()
* add doc
* lint issue
* fix computeMetrics, add Path.from
* add missing wireup for clone
* change PathMetrics to iterable, fix bug with angle on Tangent
* prefer std::make_unique
* cleanup docs
* add path measure
* fix typo
* getBound and addPathWithMatrix
* Add myself to Authors, add PathOps
* fix linting issues
* update licenses_flutter to add new files
* Use matrix4 instead of matrix3 for consistency/interop
* put pubspec back
* fix bug in getSegment
* fix typo
* Add return value for PathOp
* refactoring from review
* refactoring from review - still TBD on computeMetrics()
* add doc
* lint issue
* fix computeMetrics, add Path.from
* add missing wireup for clone
* change PathMetrics to iterable, fix bug with angle on Tangent
* prefer std::make_unique
* cleanup docs
* fix iterator bug
* remove unnecessary clone for computeMetrics
* fix some doc issues
* fix PathMeasure iterator, extendWithPath, isClosed, and pubspec.lock
* get rid of orElse; use StateException
* StateError, not StateException
* doc improvements and nits
* add unit tests, fix bugs found during testing
* fix two uncommited doc changes
* one more
* change sign of tangent angle, update docs
* update unit tests for inverted angle
* update tangent to include vector
* Doc fixes
Window.viewInsets is the set of window-relative insets that describe the
area of the window that an application may want to treat as effectively
reducing the size of the content. Typically this is due to system UI
that fully obscures underlying content, such as the keyboard.
This area differs from padding in that padding is the set of insets that
describe the area of the window that may be partially (or fully)
obscured by system UI or physical intrusions into the view area (e.g.
iPhone X sensor housing, status bar, or the iPhone X home indicator
widget).
This patch does not yet enable the iOS bottom edge safe area. Once the
framework has been updated to use viewInsets for bottom-edge occlusions
(today, the keyboard), the bottom safe area will be enabled and
framework patches that depend on it, landed.
This is the first step to support animated GIFs: flutter/flutter#204
TBD in following CLs:
* Implement Codec.getNextFrame.
* Add Framework side support to run animations.
Previously, cases like:
```dart
Color.lerp(const Color(0xFF00FF7F), const Color(0xFF00FFFF), 1.1)
```
...would result in unexpected effects (in this instance, lerping
between these colors with a curve that overshoots would take what
should be a simple animation from pale green to blue and add some
flickering bright green whenever it overshoots).
* preserve Window callback zones
Run Window callbacks in the zone they are registered in. This is consistent with how other native API work, such as `scheduleMicrotask`, `Timer`, and `dart:io`. This also enables the developers to use the `Zone` API to capture and log unhandled Dart errors.
* refactor wrapping
* new line
* fewer if checks; group getters/setters/fields
* inline _invokeOnPointerDataPacket
This attempts to make the Canvas API and some related features more
likely to throw a Dart exception than crash when exposed to bad input.
Depends on rolling tonic to
https://fuchsia-review.googlesource.com/c/35742/ which this patch does
not yet do, but I wanted to put it up for review to see if it was even
a reasonable approach.