Bug 1383786 - Simplify generating image keys for TextureHosts. r=sotaro

This commit is contained in:
Nicolas Silva
2017-09-26 15:30:46 +02:00
parent 55cc6bcd6c
commit 2d83e5c303
11 changed files with 37 additions and 99 deletions

View File

@@ -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());