Bug 1383786 - Rename GetImageKey into GenerateImageKey. r=sotaro

This commit is contained in:
Nicolas Silva 2017-07-25 10:54:20 +02:00
Родитель 787dc04d52
Коммит 08bf19b694
7 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -83,7 +83,7 @@ WebRenderCanvasLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
Stringify(filter).c_str());
}
wr::WrImageKey key = GetImageKey();
wr::WrImageKey key = GenerateImageKey();
WrBridge()->AddWebRenderParentCommand(OpAddExternalImage(mExternalImageId.value(), key));
WrManager()->AddImageKeyForDiscard(key);

Просмотреть файл

@ -155,7 +155,7 @@ WebRenderCompositableHolder::UpdateAsyncImagePipeline(const wr::PipelineId& aPip
}
bool
WebRenderCompositableHolder::GetImageKeyForTextureHost(wr::WebRenderAPI* aApi, TextureHost* aTexture, nsTArray<wr::ImageKey>& aKeys)
WebRenderCompositableHolder::GenerateImageKeyForTextureHost(wr::WebRenderAPI* aApi, TextureHost* aTexture, nsTArray<wr::ImageKey>& aKeys)
{
MOZ_ASSERT(aKeys.IsEmpty());
MOZ_ASSERT(aTexture);
@ -163,7 +163,7 @@ WebRenderCompositableHolder::GetImageKeyForTextureHost(wr::WebRenderAPI* aApi, T
WebRenderTextureHost* wrTexture = aTexture->AsWebRenderTextureHost();
if (!gfxEnv::EnableWebRenderRecording() && wrTexture) {
wrTexture->GetWRImageKeys(aKeys, std::bind(&WebRenderCompositableHolder::GetImageKey, this));
wrTexture->GetWRImageKeys(aKeys, std::bind(&WebRenderCompositableHolder::GenerateImageKey, this));
MOZ_ASSERT(!aKeys.IsEmpty());
Range<const wr::ImageKey> keys(&aKeys[0], aKeys.Length());
wrTexture->AddWRImage(aApi, keys, wrTexture->GetExternalImageKey());
@ -183,7 +183,7 @@ WebRenderCompositableHolder::GetImageKeyForTextureHost(wr::WebRenderAPI* aApi, T
wr::ImageDescriptor descriptor(size, map.mStride, dSurf->GetFormat());
auto slice = Range<uint8_t>(map.mData, size.height * map.mStride);
wr::ImageKey key = GetImageKey();
wr::ImageKey key = GenerateImageKey();
aKeys.AppendElement(key);
aApi->AddImage(key, descriptor, slice);
dSurf->Unmap();
@ -231,7 +231,7 @@ WebRenderCompositableHolder::UpdateImageKeys(wr::WebRenderAPI* aApi,
return true;
}
aUseExternalImage = aHolder->mUseExternalImage = GetImageKeyForTextureHost(aApi, texture, aKeys);
aUseExternalImage = aHolder->mUseExternalImage = GenerateImageKeyForTextureHost(aApi, texture, aKeys);
MOZ_ASSERT(!aKeys.IsEmpty());
aHolder->mKeys.AppendElements(aKeys);
aHolder->mCurrentTexture = texture;

Просмотреть файл

@ -84,14 +84,14 @@ private:
uint32_t GetNextResourceId() { return ++mResourceId; }
uint32_t GetNamespace() { return mIdNamespace; }
wr::ImageKey GetImageKey()
wr::ImageKey GenerateImageKey()
{
wr::ImageKey key;
key.mNamespace = GetNamespace();
key.mHandle = GetNextResourceId();
return key;
}
bool GetImageKeyForTextureHost(wr::WebRenderAPI* aApi, TextureHost* aTexture, nsTArray<wr::ImageKey>& aKeys);
bool GenerateImageKeyForTextureHost(wr::WebRenderAPI* aApi, TextureHost* aTexture, nsTArray<wr::ImageKey>& aKeys);
struct ForwardingTextureHost {
ForwardingTextureHost(const wr::Epoch& aEpoch, TextureHost* aTexture)

Просмотреть файл

@ -32,7 +32,7 @@ WebRenderLayer::WrBridge()
}
wr::WrImageKey
WebRenderLayer::GetImageKey()
WebRenderLayer::GenerateImageKey()
{
wr::WrImageKey key;
key.mNamespace = WrBridge()->GetNamespace();
@ -111,7 +111,7 @@ WebRenderLayer::UpdateImageKey(ImageClientSingle* aImageClient,
WrManager()->AddImageKeyForDiscard(aOldKey.value());
}
wr::WrImageKey key = GetImageKey();
wr::WrImageKey key = GenerateImageKey();
WrBridge()->AddWebRenderParentCommand(OpAddExternalImage(aExternalImageId, key));
return Some(key);
}

Просмотреть файл

@ -47,7 +47,7 @@ public:
WebRenderLayerManager* WrManager();
WebRenderBridgeChild* WrBridge();
wr::WrImageKey GetImageKey();
wr::WrImageKey GenerateImageKey();
LayerRect Bounds();
LayerRect BoundsForStackingContext();

Просмотреть файл

@ -99,7 +99,7 @@ WebRenderPaintedLayer::CreateWebRenderDisplayList(wr::DisplayListBuilder& aBuild
LayerRect rect = Bounds();
DumpLayerInfo("PaintedLayer", rect);
wr::WrImageKey key = GetImageKey();
wr::WrImageKey key = GenerateImageKey();
WrBridge()->AddWebRenderParentCommand(OpAddExternalImage(mExternalImageId.value(), key));
WrManager()->AddImageKeyForDiscard(key);

Просмотреть файл

@ -78,7 +78,7 @@ WebRenderPaintedLayerBlob::RenderLayer(wr::DisplayListBuilder& aBuilder,
if (mImageKey.isSome()) {
WrManager()->AddImageKeyForDiscard(mImageKey.value());
}
mImageKey = Some(GetImageKey());
mImageKey = Some(GenerateImageKey());
WrBridge()->SendAddBlobImage(mImageKey.value(), imageSize, size.width * 4, dt->GetFormat(), bytes);
mImageBounds = visibleRegion.GetBounds();
}