Bug 969580 - Part 2: Discard everything in the surfacecache when Direct2D malfunctions. r=seth

This commit is contained in:
Bas Schouten 2014-02-08 19:37:39 +00:00
parent b1744891e0
commit 10e49c16bd

View File

@ -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);