| 608 | texture->loadOptions = options; |
| 609 | texture->path = name; |
| 610 | texture->mimeType = mimeType; |
| 611 | |
| 612 | threadPool.AddTask([this, texture, data, mimeType]() |
| 613 | { |
| 614 | if (FillTextureData(data, texture, "", mimeType)) |
| 615 | { |
| 616 | TextureLoaded(texture); |
| 617 | |
| 618 | std::lock_guard<std::mutex> guard(m_TexturesToFinalizeMutex); |
| 619 | |
| 620 | m_TexturesToFinalize.push(texture); |
| 621 | } |
| 622 | |
| 623 | ++m_TexturesLoaded; |
| 624 | }); |
| 625 | |
| 626 | return texture; |
| 627 | } |
| 628 | |
| 629 | std::shared_ptr<LoadedTexture> TextureCache::LoadTextureFromMemory( |
| 630 | const std::shared_ptr<vfs::IBlob>& data, |
| 631 | const std::string& name, |
| 632 | const std::string& mimeType, |
| 633 | const TextureLoadOptions& options, |
| 634 | CommonRenderPasses* passes, |
| 635 | nvrhi::ICommandList* commandList) |
| 636 | { |
| 637 | std::shared_ptr<TextureData> texture = CreateTextureData(); |
nothing calls this directly
no outgoing calls
no test coverage detected