Reland "graphite: avoid insert empty recording in Query::End"
This is a reland of commit c35d20f510250b7e18fe11364ba1e1c476f29156
What's changed:
The reland includes a fix in GraphiteSharedContext::SubmitImpl to wrap
the finished proc in a thread safe proc to ensure the original finish
proc is called on the original thread. This matches how
GraphiteSharedContext::InsertRecordingImpl handles the finished proc.
Original change's description:
> graphite: avoid insert empty recording in Query::End
>
> Avoid snapping and inserting an empty recording just to attach a finish
> proc. Inserting an empty recording is wasteful as Graphite would create
> an empty command buffer. The proper way is to pass the finish proc to
> submit(). If there is no new pending GPU work, submit() won't create
> any command buffer, but it will still correctly trigger the finish proc
> after all previously submitted GPU work completes.
>
> Bug: 491840505
> Change-Id: Id5805a8937df217727cbbb6964091283c931eebf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7683634
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Colin Blundell <blundell@chromium.org>
> Auto-Submit: Quyen Le <lehoangquyen@chromium.org>
> Reviewed-by: Colin Blundell <blundell@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1601944}
Bug: 491840505
Change-Id: I8f71e9739301fff68ba51719a5a34300d1cc2b5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7698540
Reviewed-by: Quyen Le <lehoangquyen@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@google.com>
Cr-Commit-Position: refs/heads/main@{#1605310}
NOKEYCHECK=True
GitOrigin-RevId: 258ea8e4653d99a7bd9db1ffc601567eebe05f77
3 files changed