Repository navigation
Conversation
…lure Some backends report kError for a failed submission before returning the failure, so the callback ran twice, and the second run used a consumed Dart handle.
Texture.fromImage built an AiksContext on the calling thread to read an image's texture, which created the content context and its pipelines there. It now reads the texture the image already holds.
The target was built in CI but never run.
There was a problem hiding this comment.
Code Review
This pull request introduces GetResolvedTexture to retrieve backing textures without a renderer, replacing the previous GetImpellerTexture path that relied on AiksContext. It also adds performance tracing, ensures command buffer completion callbacks run at most once using an atomic flag, and includes new unit tests. Feedback raises a concern that switching to GetResolvedTexture in GetTextureFromImage will cause a regression by returning nullptr for CPU-backed images, and suggests exploring a lighter resolution path using impeller::Context instead.
gaaclarke
left a comment
There was a problem hiding this comment.
lgtm, just a minor nit to make the getter return a ref to the shared_ptr to avoid atomic refcounts when we can.
| return texture_; | ||
| } | ||
|
|
||
| std::shared_ptr<impeller::Texture> DlImageImpellerTexture::GetResolvedTexture() |
There was a problem hiding this comment.
| std::shared_ptr<impeller::Texture> DlImageImpellerTexture::GetResolvedTexture() | |
| const std::shared_ptr<impeller::Texture>& DlImageImpellerTexture::GetResolvedTexture() |
There was a problem hiding this comment.
This overrides a virtual that returns by value, and the deferred image types can't hand out a reference because their texture is filled in later on the raster thread. The one caller copies it into its own return value either way.
Related to #193745. Split out of #196621.
gpu_unittestswas built in CI but never run, so it now runs with the host engine tests. Three small fixes come along with it.kErrorand then also returns failure. The second run used a consumed Dart handle.Texture.fromImagereads the texture the image already holds instead of building anAiksContext, with its content context and pipelines, on the calling thread.Pre-launch Checklist
///).