This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Implements canvas recorder with trace serializer #46376
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
Here's an example trace from the current state: https://gist.github.com/gaaclarke/5f4895273e59a6846964cd8ca7e13b14 |
matanlurey
approved these changes
Sep 28, 2023
Contributor
matanlurey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks super useful and I have no notes!
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Sep 29, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Sep 29, 2023
…135755) flutter/engine@c52251a...d5fcd78 2023-09-29 [email protected] Roll Skia from a80c164ffb8a to 9f8242377455 (1 revision) (flutter/engine#46406) 2023-09-29 [email protected] [Impeller] Implements canvas recorder with trace serializer (flutter/engine#46376) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
8 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Oct 4, 2023
…s not set. (#46476) Internal bug: b/303067268 #46376 is causing a breakage to the internal engine build because of https://github.com/flutter/engine/blob/150d1b6ab51f34c07e21fc32ef76e4842edd4d04/impeller/aiks/canvas_recorder.h#L58-L62. Internally, we do not set `IMPELLER_TRACE_CANVAS`. It looks like the cause is that the internal toolchain causes the `static_assert` to be compiled even though the template is not instantiated. @chingjun helped me to figure out the following: https://stackoverflow.com/questions/5246049/c11-static-assert-and-template-instantiation points us to the spec. In the later version (ISO/IEC 14882:2017(E)): > The program is ill-formed, no diagnostic required, if ... no valid specialization can be generated for a template or a substatement of a constexpr if statement (9.4.1) within a template and the template is not instantiated, <details> <summary>The relevant section</summary>  </details> Interpretation: the compiler can either choose to emit the error caused by the `static_assert` or not. Currently the compiler used by the build here on LUCI does not; internally it does. For example, the following links shows that simply changing the Clang version affects whether the error appears or not for a minimal template. - ok: https://godbolt.org/z/n9nYrcvcP - not ok: https://godbolt.org/z/fWcvdcn35 Hence, `#ifdef` out the class instead of using a `static_assert` for more consistent behavior across these two toolchains. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Mairramer
pushed a commit
to Mairramer/flutter
that referenced
this pull request
Oct 10, 2023
…lutter#135755) flutter/engine@c52251a...d5fcd78 2023-09-29 [email protected] Roll Skia from a80c164ffb8a to 9f8242377455 (1 revision) (flutter/engine#46406) 2023-09-29 [email protected] [Impeller] Implements canvas recorder with trace serializer (flutter/engine#46376) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
harryterkelsen
pushed a commit
that referenced
this pull request
Oct 23, 2023
This implements a portion of impeller canvas recorder that just prints log statements to understand what is getting rendered in impeller when executing code from the framework. Eventually this should get moved to the displaylist layer when we have golden and interactive tests at that layer. This was useful for me to debug a fidelity issue, the hope is that others will find it useful and can expand it as necessary. Eventually the recordings can be used to generate tests. design doc: [go/impeller-canvas-recorder](http://goto.google.com/impeller-canvas-recorder) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
harryterkelsen
pushed a commit
that referenced
this pull request
Oct 23, 2023
…s not set. (#46476) Internal bug: b/303067268 #46376 is causing a breakage to the internal engine build because of https://github.com/flutter/engine/blob/150d1b6ab51f34c07e21fc32ef76e4842edd4d04/impeller/aiks/canvas_recorder.h#L58-L62. Internally, we do not set `IMPELLER_TRACE_CANVAS`. It looks like the cause is that the internal toolchain causes the `static_assert` to be compiled even though the template is not instantiated. @chingjun helped me to figure out the following: https://stackoverflow.com/questions/5246049/c11-static-assert-and-template-instantiation points us to the spec. In the later version (ISO/IEC 14882:2017(E)): > The program is ill-formed, no diagnostic required, if ... no valid specialization can be generated for a template or a substatement of a constexpr if statement (9.4.1) within a template and the template is not instantiated, <details> <summary>The relevant section</summary>  </details> Interpretation: the compiler can either choose to emit the error caused by the `static_assert` or not. Currently the compiler used by the build here on LUCI does not; internally it does. For example, the following links shows that simply changing the Clang version affects whether the error appears or not for a minimal template. - ok: https://godbolt.org/z/n9nYrcvcP - not ok: https://godbolt.org/z/fWcvdcn35 Hence, `#ifdef` out the class instead of using a `static_assert` for more consistent behavior across these two toolchains. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements a portion of impeller canvas recorder that just prints log statements to understand what is getting rendered in impeller when executing code from the framework. Eventually this should get moved to the displaylist layer when we have golden and interactive tests at that layer.
This was useful for me to debug a fidelity issue, the hope is that others will find it useful and can expand it as necessary. Eventually the recordings can be used to generate tests.
design doc: go/impeller-canvas-recorder
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.