Behavior (visual) changes should be very minor. Things that are to be expected:
* A few things were not color managed correctly by the transform canvas (color emoji, some color filters). Those will be handled correctly with the tagged surfaces (although we're always transforming to sRGB, so nothing should change until we target a wider gamut).
* Image filtering will happen in the source color space, rather than the destination. Very minor.
* The transform canvas did caching of images in the destination color space. Now, the conversion happens at draw time. If there are performance issues, images can be pre-converted to the destination with makeColorSpace().
* Update GetCallbackHandle to use Dart_IsTearOff instead of a string
comparison to determine whether or not a closure was provided as an
argument to PluginUtilities.GetCallbackHandle.
Fixes#24394
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.
This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.
Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.
This also updates all existing sub-targets to be testonly.
This relands commit 4e4fb4608da95d198b0e796478462285ab974a3c, which was
reverted in commit 566db0ecb8f293bb9f7ff1fc39076b08336e0148. Rather than
running as prebuilt_dart_action, we use dart_action to ensure the
frontend snapshot it compatible with the VM on which it's executed.
This reverts commit 4e4fb4608da95d198b0e796478462285ab974a3c.
This broke dynamic release mode builds of
//flutter/runtime:runtime_fixtures_kernel (likely all product-mode
builds).
Compile embedder unit test Dart to kernel
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.
This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.
Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.
This also updates all existing sub-targets to be testonly.
* Add Locale.fromComponents.
* Change toString from underscores to dashes. Expand the unit tests.
* Rename 'fromComponents' to 'create'. Change variants from String to List<String>.
* Use default for language parameter. Use hashCode/hashList.
* Have toString() stick with old (underscore) behaviour.
* Demonstrate empty-list bug in assert code.
* Fix empty-list assert bug.
* Add ignores for lint issues. Unsure about 71340 though.
* Fix operator== via _listEquals.
* Remove length-checking asserts: we're anyway not checking characters in fields.
* Documentation update.
* Change reasoning for ignore:prefer_initializing_formals.
* Try 'fromSubtags' as new constructor name.
* Documentation improvements based on Pull Request review.
* Assert-fail for invalid-length subtags and drop bad subtags in production code.
* Revert "Assert-fail for invalid-length subtags and drop bad subtags in production code."
This reverts commit d6f06f5e7b3537d60000c47641580475ef16abbe.
* Re-fix Locale.toString() for variants=[].
* Tear out variants, in case we want to have one fewer pointer in the future.
* Make named parameters' names consistent with member names.
* Also remove _listEquals: no longer in use.
* Lint fix.
* Fix code review nits.
* Lint fix for assert, and a couple more not-zero-length-string asserts.
* Code Review: two of three nits addressed...
* Review fix: change 'should' to 'must' for subtag prescriptions.
* Assert-check that countryCode is never ''.
Provide a relative, per-image limit to the amount of memory
that's used to cache decoded image frames. Adds an overridable default
that developers can set to control how much memory images are allowed
to use decoded vs undecoded. The cap is set in flutter/flutter#22452.
Note that required frames are always cached regardless of the ratio cap,
because they're currently necessary for the GIF to animate. Previously
cached unessential frames are not cleared in response to the cache
hitting or exceeding the cap.
Addresses #20998 and #14344.
This replaces `ci/test.sh` with `run_tests.sh`. `run_tests.sh` includes
`ci/test.sh` and multiple other tests.
Partially addresses flutter/flutter#22682. Temporarily skipped tests
should be fixed and re-enabled in a follow-up commit.
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 1598c7ad7b830b298647c17a0c85f3648f6b737d.
* 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