mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Flush async paints before revoking device singletons. (bug 1380922 part 3, r=mchang)
--HG-- extra : rebase_source : 34d90c80b8cc99d0679db03cf2ac1ca21ffbc5d3
This commit is contained in:
parent
d91f1ac58c
commit
7db58ae2a1
@ -15,9 +15,11 @@
|
||||
#include "mozilla/gfx/GPUParent.h"
|
||||
#include "mozilla/gfx/GraphicsMessages.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||
#include "mozilla/layers/CompositorThread.h"
|
||||
#include "mozilla/layers/DeviceAttachmentsD3D11.h"
|
||||
#include "mozilla/layers/MLGDeviceD3D11.h"
|
||||
#include "mozilla/layers/PaintThread.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "nsString.h"
|
||||
#include <d3d11.h>
|
||||
@ -716,6 +718,14 @@ DeviceManagerDx::CreateMLGDevice()
|
||||
void
|
||||
DeviceManagerDx::ResetDevices()
|
||||
{
|
||||
// Flush the paint thread before revoking all these singletons. This
|
||||
// should ensure that the paint thread doesn't start mixing and matching
|
||||
// old and new objects together.
|
||||
if (PaintThread::Get()) {
|
||||
CompositorBridgeChild* cbc = CompositorBridgeChild::Get();
|
||||
cbc->FlushAsyncPaints();
|
||||
}
|
||||
|
||||
MutexAutoLock lock(mDeviceLock);
|
||||
|
||||
mAdapter = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user