* Allow specifying both Dart and non-Dart fixtures in engine unittests.
This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.
* Instead of only being able to specify Dart fixtures, unit-tests may specify
non-Dart fixtures as well. These are simply copied over to the fixtures
directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
has been addressed. It was anticipated that such a (legal) invocation to the
kernel snapshotter would produce a snapshot with the contents of all the Dart
files added to the root library. This is incorrect and the behavior in this
case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
arguments (`—strong`) and the use of the VM product mode argument has been
corrected to no longer depend on the Flutter product mode.
At a quick glance, one could easily think of the "engine_time" as the
GPU thread time and the "frame_time" as the UI thread time because the
GPU thread time is mainly spent on the engine while the UI thread time
is mainly spent on the Dart framework to generate the frame.
But it's actually the other way. The "engine_time" is UI thread time and
the "frame_time" is the GPU thread time.
To avoid the confusion, rename them to "ui_time" and "raster_time"
respectively. I avoided the "gpu_time" because the rasterization may be
purely on a CPU backed software Skia backend.
This mechanically replaces kXXX_SkTextEncoding with SkTextEncoding::kXXX
and kXXX_SkFontHinting with SkFontHinting::kXXX. This will allow Skia to
remove these old macro constants and get everyone on the new enums.
This does not actually import the runners into the engine. It only sets up the targets so they need no modifications are necessary when the migration is done. The engine has been verified to build in both buildroots.
The raw pointer isn't a reliable id as the allocator can reuse an
address that's just been released for another layer.
This will fix Fuchsia bug FL-216.
This problem was not affecting non-Fuchsia Flutter probably because
non-Fuchsia Flutter purges the raster cache key much more frequently so
we won't see a key collision. In Fuchsia, as the key has to wait for the
Vulkan surface to render asynchronously, this suddenly becomes an issue.
Reland "Add a unit test for PhysicalShapeLayer (#8616)"
This reverts commit 91b71070f55ffc38c432babc7d9bb68ac2720d8d.
The only change is the namespace.
An unnecessary PrerollContext copy is also removed. The added unit test will catch the error if we forget to subtract the elevation after the copy removal.
This change has been tested with the framework (`flutter test --local-engine=host_debug_unopt`).
This particular call doesn't do anything since the default is false
anyway. In addition Skia is looking to remove this flag since setting it
to true is now synonymous with setting the hinting to none.
This is the first step in making Flutter aware of and responsive to Z
bound overflow. On its own this patch shouldn't result in any changes in
behavior. This will need to be followed up with a patch in Fuchsia's
Flutter runner to set the Z bounds after this lands, and another patch
in the engine actually implementing the desired overflow behavior.
This Z bound info is routed through the engine itself to make sure the
bounds in flow are truly consistent from the Fuchsia runner. However
these values should eventually be exposed to the framework as well.
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).
Looks like someone added a new use of the method while I was waiting for flutter
to roll. nuking the last instance so i can move forward with deprecating and
removing it.
It ensures that every OpacityLayer can be optimized by retained
rendering.
Tested with `flutter test --local-engine=host_debug_unopt` in
flutter/flutter/packages/flutter.
Related issues: #21756#23535
Previously the engine was creating multiple `ShapeNode`s all underneath
the same root `EntityNode` at local space z=0. This caused frequent
z-fighting within Flutter layers.
This patch updates the engine to only create one ShapeNode per
EntityNode, which fixes the z-fighting independent of layer elevation.
Z-fighting is still possible from actually setting multiple layers to
the same z in world space using Flutter elevation.
flutter/flutter#25226
There can be cases where SubmitFrame gets called
before overlays are a part of the frame, in these
cases, we should not update the GRContext ahead of time.
This commit makes it so we will update it only when
the frame really shows the overlay.
This addresses: https://github.com/flutter/flutter/issues/28920
This reverts commit f1f19bba8f0089490962316867bd222727510ac5.
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 3f0ce769e296b977cd0bcd8f4f7390f207ef50a8.
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 8427d73c8340c9e51492689ee66261a4a72cac9e.
* Revert "Revert "Add mock capability to PerformanceOverlayLayer (#7537)" (#7765)"
This reverts commit 693645e4645001ae460d5794fa6f5c7066677955.
* Add command line args for golden dir and font file
This reverts commit 68d9ac44ec530a22beda85fcdf01871770a710d7.
https://github.com/flutter/engine/pull/7759 has landed without any
unexpected regressions. Hence we'll reland this as planned.
Note: the SetTranslationRH function is temporary and part of the smooth
transition plan for Scenics handedness inversion. See SCN-1054 for details.
We will follow this will a change to migrate back off SetTranslationRH
Submit after https://fuchsia-review.googlesource.com/c/fuchsia/+/255056
lands in fuchsia.git
Uses SetClipPlanesCmd in addition to the old clipping approach.
Flutter will use both clipping methods during a transition period
(Scenic will select internally which one to use).