зеркало из https://github.com/mozilla/gecko-dev.git
Bug 969580 - Part 2: Discard everything in the surfacecache when Direct2D malfunctions. r=seth
This commit is contained in:
Родитель
b1744891e0
Коммит
10e49c16bd
|
@ -64,11 +64,13 @@
|
|||
#include <winternl.h>
|
||||
#include "d3dkmtQueryStatistics.h"
|
||||
|
||||
#include "SurfaceCache.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla::image;
|
||||
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
|
||||
|
@ -555,6 +557,10 @@ gfxWindowsPlatform::VerifyD2DDevice(bool aAttemptForce)
|
|||
return;
|
||||
}
|
||||
mD2DDevice = nullptr;
|
||||
|
||||
// Surface cache needs to be invalidated since it may contain vector
|
||||
// images rendered with our old, broken D2D device.
|
||||
SurfaceCache::DiscardAll();
|
||||
}
|
||||
|
||||
mozilla::ScopedGfxFeatureReporter reporter("D2D", aAttemptForce);
|
||||
|
|
Загрузка…
Ссылка в новой задаче