Bug 1312988 - Separate the recycling allocators for gpu and cpu textures. r=nical

This commit is contained in:
Sotaro Ikeda
2016-11-14 10:09:39 +01:00
parent c47651215f
commit 21e7de124c
3 changed files with 19 additions and 8 deletions

View File

@@ -3123,12 +3123,21 @@ PluginModuleParent::RecvReturnSitesWithData(nsTArray<nsCString>&& aSites,
}
layers::TextureClientRecycleAllocator*
PluginModuleParent::EnsureTextureAllocator()
PluginModuleParent::EnsureTextureAllocatorForDirectBitmap()
{
if (!mTextureAllocator) {
mTextureAllocator = new TextureClientRecycleAllocator(ImageBridgeChild::GetSingleton().get());
if (!mTextureAllocatorForDirectBitmap) {
mTextureAllocatorForDirectBitmap = new TextureClientRecycleAllocator(ImageBridgeChild::GetSingleton().get());
}
return mTextureAllocator;
return mTextureAllocatorForDirectBitmap;
}
layers::TextureClientRecycleAllocator*
PluginModuleParent::EnsureTextureAllocatorForDXGISurface()
{
if (!mTextureAllocatorForDXGISurface) {
mTextureAllocatorForDXGISurface = new TextureClientRecycleAllocator(ImageBridgeChild::GetSingleton().get());
}
return mTextureAllocatorForDXGISurface;
}