* "Reland Clang 11, roll buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c, take 4 (#17467)" (#17482)"
This reverts commit d7bbf2e70c8cb86823f1ec7a310d6ab0b9a610db.
* format code
* Roll buildroot to 3a27de1c5bb0f50be7d3efe3e00de4f6068c9f30
* Reland Clang 11, Roll buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c (#17457)" (#17464)
This reverts commit 6083cda709c194ec81d2092c70a0151a10f0c922.
* Skip more image tests, use newer dsymutil, add missing symbols
* Reland "Roll Clang to v11, roll buildroot to fe13f79dce4ce9aab3209f11988d825dcf580b4a, allow newly exported symbols (#17440)" (#17451)"
This reverts commit d77d53688f77285966adeb2a24349ba490a7e6ce.
* skip golden that is different on macos
* buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329
Due to file name changes, this PR is expected to change the license files.
We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
RasterCacheResult::draw constructs the device target rectangle by
calling SkRect::roundOut, which rounds down the left/top coordinates
and rounds up the right/bottom coordinates. The rounding can produce
a device rect whose width and/or height differs from the cache result
image's width/height by one pixel.
This lets us measure stats on when the frame was
scheduled to be rendered vs when it finished rasterizing.
Note: This isn't propagated to the FrameTimings struct yet,
that is to be followed.
* [fuchsia] Add labels to Scenic nodes.
* [fuchsia] Skip creating Scenic nodes for identity Transforms.
* [fuchsia] Assign elevation to Scenic nodes based on paint order.
* [fuchsia] Create Scenic OpacityNodes at leaf nodes.
* [fuchsia] Composite PhysicalShapeLayers using Skia, except when they need to float above child views.
In that case, they will still need to be pulled
into separate Scenic nodes to be composited on top
of the child view[s].
* [fuchsia] Add tests for Fuchsia-specific layer behavior.
Inspect commands going to Scenic and make sure
they match what is expected.
Also, restructure code to need less member variables,
and other cleanups based on review feedback.
This moves the Metal `GrContext` creation utilities from `GPUSurfaceMetal` into
a separate `IOSContext` object subclass. An analogue of this object was used in
the GL regime for the management of onscreen and offscreen contexts that were
not tied to the lifecycle of the `GPUSurface`. This pattern has now been
generalized for use with all backends that need a resource context
(`IOSContextGL` and `IOContextMetal`).
The platform views controller management in the `ExternalViewEmbedder` interface
implementation was repeated three times for [Metal][metal], [OpenGL](opengl) and
[Software](software) rendering. This repetition has been removed and a single
implementation present in the base `IOSSurface` and used on all platforms.
Addition of new client rendering APIs should not affect how the engine renders
into the platform view interleaving levels.
All rendering API selection logic has been moved into a single set of utilities
in `rendering_api_selection.h`. This enables the removal of a lot of code blocks
guarded by `FLUTTER_SHELL_ENABLE_METAL`. The remaining uses of this will be
removed when unified builds are enabled.
The Metal backend now also adds traces similar to the GL backend.
The `IOGLContext` has been renamed to `IOContextGL` to be more in line with the
convention used in this library.
Fixes https://github.com/flutter/flutter/issues/41827
Adds https://github.com/flutter/flutter/issues/52150
[metal]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_metal.mm (L55)
[opengl]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_gl.mm (L95)
[software]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_software.mm (L146)
This caused regression in several benchmarks, including:
animated_placeholder_perf. Regression tracked in
https://github.com/flutter/flutter/issues/51776.
This reverts commit ac4e9832c910a031bf2dfb36605edbc834397c2b.
If Rasterization fails, i.e. image.is_valid() is false, the cache might try rasterizing the image again on the next frame. Not only is this wasteful put might also prevent other pictures to be cached within the current frame budget.
RasterCache::Get() methods were not updating the RasterCache::Entry
access_count and used_this_frame fields, as is done in
RasterCache::Prepare(). This can result in onscreen images being evicted
from the cache as new entries are created (e.g. as new elements scroll
onscreen).
There are two issues in the test as written:
* There is a race on the first check to dtor_task_queue_id which might be
encountered if the calling thread is de-scheduled and the unref queue manages
to collect the object before the end of the scope.
* Two threads were owning a shared object but we relied on the object to be
collected on the unref queue.
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
A previous version of this change also removed
system compositing of PhysicalShapeLayers on
Fuchsia. In this reland, keep using system
composting for PhysicalShapeLayers.
Co-authored-by: David Worsham <arbreng@gmail.com>
This reverts commit 6919709e47661c5cd48d9b0d3bfde986b9c1af84.
On top of the revert, it reverted a commit in the PR:
https://github.com/flutter/engine/pull/14024
This reverts commit ea67e5b0b930ebf552bc7dbd678a35ee6a129c39.
Prerolling a layer can have side effects. In particular, PlatformViewLayer::Preroll
will call view_embedder->PrerollCompositeEmbeddedView.
Clip layers will check whether the layer's children are all clipped and if so
will skip calling Preroll on the children. However, the Paint implementation in
these layers was always calling Paint on their children.
This could result in a call to PlatformViewLayer::Paint without a corresponding
call to PlatformViewLayer::Preroll. This translates to a CompositeEmbeddedView
call without a PrerollCompositeEmbeddedView call on the affected view_id.
The EmbedderExternalViewEmbedder implementation does not allow that.
With this change, clip layers will only call PaintChildren if the preroll
called PrerollChildren.
See https://github.com/flutter/flutter/issues/46111
* Revert "Add flow test fixtures and tests (#13986)"
This reverts commit 32915132bacdfd0d631421b23bb6a6d5db1095ab.
* Revert "Dynamically determine whether to use offscreen surface based on need (#13976)"
This reverts commit a13401ce86b3019c39154d56644b7b9eb4a5bbe5.