Remove the extra `decodedCacheRatioCap` parameter, and the
`_frameBitmaps` member from `Codec`. This means that small looped images
will consume more CPU but prevents us from hitting OOM exceptions based
on trying to render multiple larger images.
Also switch to fDisposalMethod for caching frames.
Previously we looped over every single SkCodec::FrameInfo, tracked its
`fRequiredFrame`, and then saved any frames matching those indeces.
Doing this instead avoids that initialization loop and extra data
structure.
* Dart side resize primitives exposed
* Write the codec side changes
* return un-scaled image if we can not allocate bitmap
* Format _instantiateImageCodec calls to be single lined
Move null check for size to be inner
* Address CR comments and make image resize dimensions container
* Round not trunc, also format
* Add tests, remove ImageResizeDims from api surface
* Make placeholder value public
* Make the api side changes
* Add a feature to resize pixels and also add tests
* Fix grammar and add more info
* Revert "fix toString (#8688)"
This reverts commit c9a0f50ecc62899952ff693ed67d022d510d9453.
* Revert "Make Rect and RRect use 64 bit doubles, and make them const-able (#8565)"
This reverts commit d98c2e2df0427aad3bd824f41d804ccc56eee367.
`//flutter/runtime: runtime_lifecycle_unittests` was added because the these assumed that there was no VM already running in the process. Running other tests in the base target would mess up that assumption. Now that all test targets have been updated to make sure the VM instance does not leak, the tests in this target can be merged.
LUCI bots don’t need to be patched as these tests were only ever run on the trybots.
When flutter/synchronization was first authored, we did not own fml (it was called fxl then). Now we do, so use a single spot for such utilities. The pipeline was meant to be a general purpose utility that was only ever used by the animator (it even has animator specific tracing), so move that to shell instead (where the animator resides).
Bugfix:
* Use the `pub` from within the built Dart SDK (not whatever's on
`$PATH`, if anything).
A few minor improvements:
* Allow running from below the src/ buildroot dir, as it's often
convenient to work from within the flutter/engine git dir.
* Echo test name before running, for slightly better debuggability.
* Minor line-wrapping for readability.
This reverts commit c416fe99ee0ddb464ca85c0b336d679ea626a03c.
Now we shouldn't break the engine build as https://chromium-review.googlesource.com/c/chromium/tools/build/+/1480746 is landed. The golden test is disabled by default and we'll enable it later in our recipe and test it in presubmit tests.
This breaks the Linux build with:
```
[ RUN ] PerformanceOverlayLayer.Gold
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
Actual: false
Expected: true
Golden file not found: "/b/s/w/ir/k/src/flutter/testing/resources"/performance_overlay_gold.png.
Please either set --golden-dir, or make sure that the unit test is run from the right directory (e.g., flutter/engine/src).
```
This reverts commit 3534a2c4cdfa35f921e99466013c7c8b3f03a8c3.
Reverting this broke the flow tests for the performance overlay:
```
../../flutter/flow/layers/performance_overlay_layer_unittests.cc:70: Failure
Value of: golden_data != nullptr
Actual: false
Expected: true
```
This reverts commit ad96de250ecc47a7c26134ad434150199539b00b.
* Revert "Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)"
This reverts commit 284016b1e1d6e8badec99cbff907ddb900cd27c4.
* Add command line args for golden dir and font file
The shell was already designed to cleanly shut down the VM but it couldnt
earlier as |Dart_Initialize| could never be called after a |Dart_Cleanup|. This
meant that shutting down an engine instance could not shut down the VM to save
memory because newly created engines in the process after that point couldn't
restart the VM. There can only be one VM running in a process at a time.
This patch separate the previous DartVM object into one that references a
running instance of the DartVM and a set of immutable dependencies that
components can reference even as the VM is shutting down.
Unit tests have been added to assert that non-overlapping engine launches use
difference VM instances.
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().