* Make test Dart2 compliant
* Use service and debug events instead of polling to wait for isolate to start, run and resume.
* Refactor into _onServiceEvent. Wait for 'paused' event instead of 'isolate runnable'.
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
The old code called getBackendRenderTargetHandle() with a Read access to trigger the surface to flush, however the returned GrVkImageInfo was never used. This how process is equivalent to just calling flush on the surface so do that instead.
https://skia.googlesource.com/skia.git/+log/3462eb0346de..e669bdfad6d5
$ git log 3462eb034..e669bdfad --date=short --no-merges --format='%ad %ae %s'
2018-04-14 angle-skia-autoroll Roll third_party/externals/angle2/ 983c429fa..152152618 (7 commits)
2018-04-13 ethannicholas fix sksl standalone build error
2018-04-13 borenet Blacklist check_small_sigma_offset on Chromecast
2018-04-13 reed remove unused virtual onNotifyPixelsChanged
2018-04-13 reed rewrite iterator to make msvc happy
2018-04-13 brianosman Support downscaling to max texture size when making cross-context images
2018-04-13 borenet Add a MSVS bot to the CQ
2018-04-13 liyuqian Clone the xpos array in drawPosText
2018-04-13 ethannicholas added sk_LastFragColor
2018-04-13 reed Revert "add test for degenerate canvas dimension"
2018-04-13 reed add test for degenerate canvas dimension
2018-04-13 robertphillips Don't try to readback from the GPU for small blur sigmas
2017-12-20 herb Make a GM for checking blur bounds.
2018-04-13 angle-skia-autoroll Roll third_party/externals/angle2/ cc1293775..983c429fa (1 commit)
2018-04-13 fmalita [skottie] Harden json string parsing
2018-04-13 caryclark path is rect bug number nine
2018-04-13 hcm Update Skia milestone to 68
2018-04-13 angle-skia-autoroll Roll third_party/externals/angle2/ ed8d5ec73..cc1293775 (1 commit)
2018-04-12 liyuqian Limit our IsBadForDAA for stroke width > 0 and <= 2
2018-04-12 csmartdalton ccpr: Actually blacklist ANGLE
2018-04-12 angle-skia-autoroll Roll third_party/externals/angle2/ 14f4817c4..ed8d5ec73 (8 commits)
2018-04-12 reed can't abort looper loop, as saveCount won't be balanced
2018-04-12 egdaniel Don't create lazy proxys if their width/height is greater than max tex size
2018-04-12 robertphillips Actually generate the gm images on the DDL1 bot
2018-04-12 caryclark son of path is rect bug
2018-04-12 ethannicholas workaround for buggy macOS GLSL shader compiler
2018-04-12 egdaniel Delete getRenderTargetHandle call on SkSurface.
2018-04-12 reed check for non-finite values output by clipper
2018-04-12 brianosman Fail fast when trying to make a texture that's too large
2018-04-12 djsollen Include shadow ops in the debugger.
2018-04-11 liyuqian Reland "Add private fIsBadForDAA bit to SkPath"
2018-04-12 reed add conservative bounds to raster tiling
2018-04-12 reed always clear the looper when we're unrolling it, to not confused devices
2018-04-11 robertphillips Disable CCPR and the small path renderer on DDL1 bot
2018-04-12 caryclark another rect is path fix
2018-04-11 robertphillips Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS
2018-04-11 csmartdalton Implement Sk2f Load2
2018-04-11 csmartdalton ccpr: Blacklist ANGLE again
2018-04-11 robertphillips Allow SkImage_Gpu to fail some requests in DDL mode
2018-04-11 cwallez update_meta_config: Use new LUCI optional GPU trybot on Windows
2018-04-11 csmartdalton Implement Sk4f min/max
2018-04-11 liyuqian Remove obsolete comment
2018-04-11 benjaminwagner Upgrade PixelC and NexusPlayer OS.
2018-04-12 angle-skia-autoroll Roll third_party/externals/angle2/ 2dadd1d08..14f4817c4 (2 commits)
2018-04-11 caryclark fix bm gm
2018-04-12 mtklein skcms→1654786 concat gamut transform matrices together
2018-04-11 fmalita Reland "Fix handling of MaskFilter matrices"
2018-04-11 angle-skia-autoroll Roll third_party/externals/angle2/ 785b20b7a..2dadd1d08 (11 commits)
2018-04-11 benjaminwagner Upgrade Windows Skolo bots.
2018-04-11 reed remove unused/dumb methods from SkRect
2018-04-11 reed Clean-up paints for drawImage (etc.) to enforce that we always ignore stroking and patheffects.
2018-04-11 caryclark more path is rect bugs
2018-04-11 mtklein skcms→9334796 reject non-XYZ/Lab PCS profiles
2018-04-11 liyuqian Revert "Add private fIsBadForDAA bit to SkPath"
Created with:
roll-dep src/third_party/skia
* Update vulkan_swampchain.cc to use getBackendRenderTarget.
The use of getRenderTargetHandle on SkSurface is being removed so switch over to the new API of getBackendRenderTarget.
* Update vulkan_swapchain.cc
* Update vulkan_surface_producer.cc
* Extend Minikin to record the cluster identifier corresponding to each glyph
* Use the cluster values to determine the range of input code units that map
to a glyph
* Use Minikin's libraries to find boundaries between graphemes within a
ligature
Fixes https://github.com/flutter/flutter/issues/16151
This syntax fails in conjunction with the new 6-argument constructor
that's been added. Fields were already initialized in the correct
order, so simply omit the field names. Once the constructor lands,
this will switch to calling that.
* Roll dart sdk again. Previous roll required 23ae4fa098 revert.
Changes since last roll:
```
23ae4fa098 Revert "[VM] Reduce Smi size to 32 bit on 64 bit platforms"
6ab6d1eda9 Suppress fromRect its only available in DOMRect and not in ClientRect - will open bug to fix this issue.
f4621b1898 [tests hot-reload] Remove obsolete crash entry in status file (issue #31660).
f3cec061eb Capture type variables in global NSM stubs
2247843f48 Update checked-in SDKs to 2.0.0-dev.47.0
34be5de0c7 Fixed _DomRect class to map to both ClientRect and DOMRect for browser backward compat.
5c508ff785 Update more IdentifierContext type reference recovery
8054721512 Move DeclaredVariables to a better location
3851591642 [infra] Keep comments intact when updating status files.
7764e6962e Initial API to build analysis contexts (replaces ContextLocator.locateContexts)
5ea271bb01 Clean up documentation of implicit new/const insertions tests.
cf93009caf Removed the magic const feature from implicit-creation.md
bd39320b3b Recover from error on undefined continue label.
5d89a1ac32 Add tests for mixin application constructor forwarding.
e6962790a1 Use import URIs when invalidating files
23c59bd819 Fix compare_failures
290cc58e71 Use actual receiver when error-wrapping a null-aware property get.
34763bc4c9 Reland "[VM] Introduction of type testing stubs - Part 1-4"
a86b864fa9 Handle updated .packages in incremental compiler
f555ae505a Trust type annotations in strong mode
0a4a3bed68 When cloning YieldStatement, copy the flags
91bbc798fa Skip abstract forwarding stubs
7689dc9e06 Bring in the latest pub_semver
f71d204185 Fix expected type in substByContext
5e99872770 Improve missing/invalid type reference recovery
899dbe4dae Forward type arguments in one-shot interceptors.
1fd3011f47 dart2js: Add more whole-program information to dump-info
5e23c2843d Revert "[infra] Temporarily disable Windows SDK builder on CQ"
2471888d4a Serialize any MethodInvocation as possible const.
b430570364 dart2js: handle constant casts with type variable substitutions
3575b810b3 Only add const in a constant context (issue 32819)
09f7d2aee5 dart2js: naive support for instantiations in constants - ignore the actual instantiation
4dd5e6e6ad js_runtime: fix _JsonMap keys list type
71ffe976a9 Correctly handle constant fields when computing constness (take 2)
d58b0e2d44 [VM] Mark bigint test slow after small Smi change
1e997ee6b7 Revert "Reland "[VM] Introduction of type testing stubs - Part 1-4""
00097adce0 Remove reference to deprecated setter
cb065a116f [infra] Update checked-in SDK version to 2.0.0-dev.46.0
0e9a77a360 [VM] Reduce Smi size to 32 bit on 64 bit platforms
34bfefd508 [gardening] Update status file
969c0de335 Avoid crash on EOF error in file with Windows line encoding
8054409a02 Reland "[VM] Introduction of type testing stubs - Part 1-4"
```
* Update license hash
* Support multiple shells in a single process.
The Flutter Engine currently works by initializing a singleton shell
instance. This shell has to be created on the platform thread. The shell
is responsible for creating the 3 main threads used by Flutter (UI, IO,
GPU) as well as initializing the Dart VM. The shell, references to task
runners of the main threads as well as all snapshots used for VM
initialization are stored in singleton objects. The Flutter shell only
creates the threads, rasterizers, contexts, etc. to fully support a
single Flutter application. Current support for multiple Flutter
applications is achieved by making multiple applications share the same
resources (via the platform views mechanism).
This scheme has the following limitations:
* The shell is a singleton and there is no way to tear it down. Once you
run a Flutter application in a process, all resources managed by it
will remain referenced till process termination.
* The threads on which the shell performs its operations are all
singletons. These threads are never torn down and multiple Flutter
applications (if present) have to compete with one another on these
threads.
* Resources referenced by the Dart VM are leaked because the VM isn't
shutdown even when there are no more Flutter views.
* The shell as a target does not compile on Fuchsia. The Fuchsia content
handler uses specific dependencies of the shell to rebuild all the
shell dependencies on its own. This leads to differences in frame
scheduling, VM setup, service protocol endpoint setup, tracing, etc..
Fuchsia is very much a second class citizen in this world.
* Since threads and message loops are managed by the engine, the engine
has to know about threading and platform message loop interop on each
supported platform.
Specific updates in this patch:
* The shell is no longer a singleton and the embedder holds the unique
reference to the shell.
* Shell setup and teardown is deterministic.
* Threads are no longer managed by the shell. Instead, the shell is
given a task runner configuration by the embedder.
* Since the shell does not own its threads, the embedder can control
threads and the message loops operating on these threads. The shell is
only given references to the task runners that execute tasks on these
threads.
* The shell only needs task runner references. These references can be
to the same task runner. So, if the embedder thinks that a particular
Flutter application would not need all the threads, it can pass
references to the same task runner. This effectively makes Flutter
application run in single threaded mode. There are some places in the
shell that make synchronous calls, these sites have been updated to
ensure that they don’t deadlock.
* The test runner and the headless Dart code runner are now Flutter
applications that are effectively single threaded (since they don’t
have rendering concerns of big-boy Flutter application).
* The embedder has to guarantee that the threads and outlive the shell.
It is easy for the embedder to make that guarantee because shell
termination is deterministic.
* The embedder can create as many shell as it wants. Typically it
creates a shell per Flutter application with its own task runner
configuration. Most embedders obtain these task runners from threads
dedicated to the shell. But, it is entirely possible that the embedder
can obtain these task runners from a thread pool.
* There can only be one Dart VM in the process. The numerous shell
interact with one another to manage the VM lifecycle. Once the last
shell goes away, the VM does as well and hence all resources
associated with the VM are collected.
* The shell as a target can now compile and run on Fuchsia. The current
content handler has been removed from the Flutter engine source tree
and a new implementation has been written that uses the new shell
target.
* Isolate management has been significantly overhauled. There are no
owning references to Dart isolates within the shell. The VM owns the
only strong reference to the Dart isolate. The isolate that has window
bindings is now called the root isolate. Child isolates can now be
created from the root isolate and their bindings and thread
configurations are now inherited from the root isolate.
* Terminating the shell terminates its root isolates as well as all the
isolates spawned by this isolate. This is necessary be shell shutdown
is deterministic and the embedder is free to collect the threads on
which the isolates execute their tasks (and listen for mircrotasks
flushes on).
* Launching the root isolate is now significantly overhauled. The shell
side (non-owning) reference to an isolate is now a little state
machine and illegal state transitions should be impossible (barring
construction issues). This is the only way to manage Dart isolates in
the shell (the shell does not use the C API is dart_api.h anymore).
* Once an isolate is launched, it must be prepared (and hence move to
the ready phase) by associating a snapshot with the same. This
snapshot can either be a precompiled snapshot, kernel snapshot, script
snapshot or source file. Depending on the kind of data specified as a
snapshot as well as the capabilities of the VM running in the process,
isolate preparation can fail preparation with the right message.
* Asset management has been significantly overhauled. All asset
resolution goes through an abstract asset resolver interface. An asset
manager implements this interface and manages one or more child asset
resolvers. These asset resolvers typically resolve assets from
directories, ZIP files (legacy FLX assets if provided), APK bundles,
FDIO namespaces, etc…
* Each launch of the shell requires a separate and fully configured
asset resolver. This is necessary because launching isolates for the
engine may require resolving snapshots as assets from the asset
resolver. Asset resolvers can be shared by multiple launch instances
in multiple shells and need to be thread safe.
* References to the command line object have been removed from the
shell. Instead, the shell only takes a settings object that may be
configured from the command line. This makes it easy for embedders and
platforms that don’t have a command line (Fuchsia) to configure the
shell. Consequently, there is only one spot where the various switches
are read from the command line (by the embedder and not the shell) to
form the settings object.
* All platform now respect the log tag (this was done only by Android
till now) and each shell instance have its own log tag. This makes
logs from multiple Flutter application in the same process (mainly
Fuchsia) more easily decipherable.
* The per shell IO task runner now has a new component that is
unfortunately named the IOManager. This component manages the IO
GrContext (used for asynchronous texture uploads) that cooperates with
the GrContext on the GPU task runner associated with the shell. The
IOManager is also responsible for flushing tasks that collect Skia
objects that reference GPU resources during deterministic shell
shutdown.
* The embedder now has to be careful to only enable Blink on a single
instance of the shell. Launching the legacy text layout and rendering
engine multiple times is will trip assertions. The entirety of this
runtime has been separated out into a separate object and can be
removed in one go when the migration to libtxt is complete.
* There is a new test target for the various C++ objects that the shell
uses to interact with the Dart VM (the shell no longer use the C API
in dart_api.h). This allows engine developers to test VM/Isolate
initialization and teardown without having the setup a full shell
instance.
* There is a new test target for the testing a single shell instances
without having to configure and launch an entire VM and associated
root isolate.
* Mac, Linux & Windows used to have different target that created the
flutter_tester referenced by the tool. This has now been converted
into a single target that compiles on all platforms.
* WeakPointers vended by the fml::WeakPtrFactory(notice the difference
between the same class in the fxl namespace) add threading checks on
each use. This is enabled by getting rid of the “re-origination”
feature of the WeakPtrFactory in the fxl namespace. The side effect of
this is that all non-thread safe components have to be created, used
and destroyed on the same thread. Numerous thread safety issues were
caught by this extra assertion and have now been fixed.
* Glossary of components that are only safe on a specific thread (and
have the fml variants of the WeakPtrFactory):
* Platform Thread: Shell
* UI Thread: Engine, RuntimeDelegate, DartIsolate, Animator
* GPU Thread: Rasterizer, Surface
* IO Thread: IOManager
This patch was reviewed in smaller chunks in the following pull
requests. All comments from the pulls requests has been incorporated
into this patch:
* flutter/assets: https://github.com/flutter/engine/pull/4829
* flutter/common: https://github.com/flutter/engine/pull/4830
* flutter/content_handler: https://github.com/flutter/engine/pull/4831
* flutter/flow: https://github.com/flutter/engine/pull/4832
* flutter/fml: https://github.com/flutter/engine/pull/4833
* flutter/lib/snapshot: https://github.com/flutter/engine/pull/4834
* flutter/lib/ui: https://github.com/flutter/engine/pull/4835
* flutter/runtime: https://github.com/flutter/engine/pull/4836
* flutter/shell: https://github.com/flutter/engine/pull/4837
* flutter/synchronization: https://github.com/flutter/engine/pull/4838
* flutter/testing: https://github.com/flutter/engine/pull/4839
* Roll dart to 7764e6962e22afcf4b58c4e3cef3147330f3c884.
Changes since last roll:
```
7764e6962e Initial API to build analysis contexts (replaces ContextLocator.locateContexts)
5ea271bb01 Clean up documentation of implicit new/const insertions tests.
cf93009caf Removed the magic const feature from implicit-creation.md
bd39320b3b Recover from error on undefined continue label.
5d89a1ac32 Add tests for mixin application constructor forwarding.
e6962790a1 Use import URIs when invalidating files
23c59bd819 Fix compare_failures
290cc58e71 Use actual receiver when error-wrapping a null-aware property get.
34763bc4c9 Reland "[VM] Introduction of type testing stubs - Part 1-4"
a86b864fa9 Handle updated .packages in incremental compiler
f555ae505a Trust type annotations in strong mode
0a4a3bed68 When cloning YieldStatement, copy the flags
91bbc798fa Skip abstract forwarding stubs
7689dc9e06 Bring in the latest pub_semver
f71d204185 Fix expected type in substByContext
5e99872770 Improve missing/invalid type reference recovery
899dbe4dae Forward type arguments in one-shot interceptors.
1fd3011f47 dart2js: Add more whole-program information to dump-info
5e23c2843d Revert "[infra] Temporarily disable Windows SDK builder on CQ"
2471888d4a Serialize any MethodInvocation as possible const.
b430570364 dart2js: handle constant casts with type variable substitutions
3575b810b3 Only add const in a constant context (issue 32819)
09f7d2aee5 dart2js: naive support for instantiations in constants - ignore the actual instantiation
4dd5e6e6ad js_runtime: fix _JsonMap keys list type
71ffe976a9 Correctly handle constant fields when computing constness (take 2)
d58b0e2d44 [VM] Mark bigint test slow after small Smi change
1e997ee6b7 Revert "Reland "[VM] Introduction of type testing stubs - Part 1-4""
00097adce0 Remove reference to deprecated setter
cb065a116f [infra] Update checked-in SDK version to 2.0.0-dev.46.0
0e9a77a360 [VM] Reduce Smi size to 32 bit on 64 bit platforms
34bfefd508 [gardening] Update status file
969c0de335 Avoid crash on EOF error in file with Windows line encoding
8054409a02 Reland "[VM] Introduction of type testing stubs - Part 1-4"
```
* Ignore freetype2 in skia since 'we use our own version'
* Update license hash
Assets are loaded via platform messages, and currently asset payloads are
being copied into Dart typed data buffers. This change uses external
typed data objects that wrap the existing buffer if copying would be
expensive.
See https://github.com/flutter/flutter/issues/16291
This moves to the new skia ctor for vulkan GrBackendRenderTarget which doesn't take a stencil count since vulkan doesn't bind stencil and render target together like GL does with framebuffer so it is not needed.
This is the same idea as pull, https://github.com/flutter/engine/pull/4962, but the github UI was only allowing me to change one file via the online edit :(
* Revert "Add support for measuring, combining, and getting bounds of Path objects (#4799)"
This reverts commit db8570675d, as it broke engine build bots on Linux and Windows.
Engine build is currently broken, so reverting Dart SDK roll for now.
* Revert "Roll Dart to ef926f98f525b085e1488be8c42b1c3f0a24c50d (#4951)"
This reverts commit 3835225235.
* 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
This adds create_macos_gen_snapshot.py, which can be used to generate a
multi-architecture (x86_64, i386) gen_snapshot fat binary. The resulting
binary can then be run in the desired mode using:
/usr/bin/arch -i386 path/to/gen_snapshot
/usr/bin/arch -x86_64 path/to/gen_snapshot
When creating AOT snapshots for iOS, running as an i386 binary will
generate armv7 code, whereas running as an x86_64 binary will generate
arm64 code.
The primary user of this script is the build bot.
This enforces that iOS Flutter.framework builds include arm64, armv7,
and x86_64 (simulator) architectures. This change also eliminates the
previous --device-out-dir option, which has been replaced by
--arm64-out-dir.
This adds support for --armv7-out-dir and renames --device-out-dir to
--arm64-out-dir for clarity. It preserves --device-out-dir as a fallback
until the bot recipe has been updated to use --arm64-out-dir.