[Impeller] Make DoMakeRasterSnapshot output timeline event. (flutter/engine#41197)

In Skia, there is such a timeline event in `SnapshotControllerSkia::DoMakeRasterSnapshot`. Therefore, since Impeller wants to mimic Skia and this event does take a long time sometimes, it seems reasonable to add this.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
fzyzcjy
2023-04-18 04:44:19 +08:00
committed by GitHub
parent 930283bd83
commit 6b6f725d6d

View File

@@ -33,6 +33,7 @@ sk_sp<DlImage> SnapshotControllerImpeller::MakeRasterSnapshot(
sk_sp<DlImage> SnapshotControllerImpeller::DoMakeRasterSnapshot(
const sk_sp<DisplayList>& display_list,
SkISize size) {
TRACE_EVENT0("flutter", __FUNCTION__);
impeller::DisplayListDispatcher dispatcher;
display_list->Dispatch(dispatcher);
impeller::Picture picture = dispatcher.EndRecordingAsPicture();