This change also adds TimeRecorder which records time at the start
of each frame to capture the latest vsync target display time and
wires it in to the rasterizer to add trace events when there is a lag.
The JSON codec is awkward to use in the wrapper (since the client has to build and link one of the JSON libraries to do so). Since it would be very cumbersome to wrap in a C API, and there's essentially no reason to use it instead of the standard codec, this removes it from the wrapper entirely.
Since some system channels (internal to the engine) still use it, it's moved into common/cpp instead of being eliminated entirely. Internally we always use RapidJSON though, so the jsoncpp implementation is removed. Also adds some unit test coverage, since there wasn't any.
Fixes#30669
* "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
The following issues have been filed to track the handling of these enum values:
* Handle the UITouchTypeIndirectPointer enum value. https://github.com/flutter/flutter/issues/53696
* Handle the UITouchPhaseRegion enum values. https://github.com/flutter/flutter/issues/53695
No change in functionality. Only makes the iOS engine build on the latest
versions of Xcode and iOS SDK. The enum values cannot be used with the
API_AVAILABLE macro because the buildbots have not been updated yet.
Since the trace provider hasn't been created yet, it is not possible to
trace the creation of a trace provider using a TRACE_DURATION event (the
trace enabled and category check will always fail). While this isn't
causing any urgent problems, remove it to set a good example for other
clients of tracing that might happen to reference this code.
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`.
close() returns a nonzero in case of an error. Old code had it log
only when *no* error happens on close, which is exactly the opposite
of what we want.
On Fuchsia, we can now get executable VMOs from trusted backing
filesystems. This allows us to remove the use of replace_as_executable
in favor of opening files with `fdio_open_fd_at` with the
`OPEN_RIGHT_EXECUTABLE` flag and getting VMOs by calling
`fdio_get_vmo_exec`.
By moving the responsibility for executability into the filesystem, we
are able to remove `deprecated-ambient-replace-as-executable` from
component manifests for non-JIT runners (the JIT runners still call
replace_as_executable in Dart's allocator). It wasn't abundantly clear
whether .cmx files for tests were used purely in AOT runtime
environments or also saw JIT usage, so I left those as-is.
For context: this is a second attempt at #16690, which was reverted
because it broke the Dart JIT runner. The primary difference is that
this time around, we correctly handle absolute vs relative paths,
depending on whether library loading bottoms out in `fdio_open_fd` or
`fdio_open_fd_at`. I've added additional assertions to help ensure any
new usages use the correct shape of path.
Testing: I verified locally that the flutter product runner works on
Astro, and also successfully ran the Dart JIT example test (which was
the thing blocking the google3 roll with the previous attempt at this
patchset).
Co-authored-by: Drew Fisher <zarvox@google.com>
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 is a step toward aligning the API with macOS, and will make it easier to add the precompiled library later for release mode (since it can just be added to the project directory, without any code changes required for wrapper clients).
At the C API, uses a struct instead of individual arguments, mirroring a change that was already made on the Linux side to make the C API cleaner.
Functional changes in addition to the restructuring:
adds relative path support, as was recently added for GLFW
Uses wstring, rather than string, for paths; the conversion to UTF-8 is actually a potential problem on Windows, so pushing it into the embedding allows us the possibility of removing it later (if we can figure out a good solution at the embedder.h layer) without API breakage.
The old APIs used by the standard runner are left in place for now to avoid breaking the template on an engine roll. Once the framework template has been updated, the old API paths will be removed.