Bug 1383786 - Simplify generating image keys for TextureHosts. r=sotaro
This commit is contained in:
@@ -173,7 +173,10 @@ AsyncImagePipelineManager::GenerateImageKeyForTextureHost(wr::ResourceUpdateQueu
|
||||
WebRenderTextureHost* wrTexture = aTexture->AsWebRenderTextureHost();
|
||||
|
||||
if (!gfxEnv::EnableWebRenderRecording() && wrTexture) {
|
||||
wrTexture->GetWRImageKeys(aKeys, std::bind(&AsyncImagePipelineManager::GenerateImageKey, this));
|
||||
auto numKeys = wrTexture->NumSubTextures();
|
||||
for (uint32_t i = 0; i < numKeys; ++i) {
|
||||
aKeys.AppendElement(GenerateImageKey());
|
||||
}
|
||||
MOZ_ASSERT(!aKeys.IsEmpty());
|
||||
Range<const wr::ImageKey> keys(&aKeys[0], aKeys.Length());
|
||||
wrTexture->AddWRImage(aResources, keys, wrTexture->GetExternalImageKey());
|
||||
|
||||
Reference in New Issue
Block a user