Bug 1378476 - Label layers::DestroyTextureData. r=nical
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxPlatform.h" // for gfxPlatform
|
||||
#include "mozilla/Atomics.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc
|
||||
#include "mozilla/layers/CompositableForwarder.h"
|
||||
#include "mozilla/layers/ISurfaceAllocator.h"
|
||||
@@ -234,11 +235,11 @@ static void DestroyTextureData(TextureData* aTextureData, LayersIPCChannel* aAll
|
||||
|
||||
if (aMainThreadOnly && !NS_IsMainThread()) {
|
||||
RefPtr<LayersIPCChannel> allocatorRef = aAllocator;
|
||||
NS_DispatchToMainThread(NS_NewRunnableFunction(
|
||||
"layers::DestroyTextureData",
|
||||
[aTextureData, allocatorRef, aDeallocate]() -> void {
|
||||
DestroyTextureData(aTextureData, allocatorRef, aDeallocate, true);
|
||||
}));
|
||||
SystemGroup::Dispatch(nullptr, TaskCategory::Other, NS_NewRunnableFunction(
|
||||
"layers::DestroyTextureData",
|
||||
[aTextureData, allocatorRef, aDeallocate]() -> void {
|
||||
DestroyTextureData(aTextureData, allocatorRef, aDeallocate, true);
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user