mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 793719 - Fix for D2D error on shutdown with VS2012. r=bas
This commit is contained in:
parent
0e97b98462
commit
6247c94cd0
@ -926,6 +926,7 @@ public:
|
||||
|
||||
static uint64_t GetD2DVRAMUsageDrawTarget();
|
||||
static uint64_t GetD2DVRAMUsageSourceSurface();
|
||||
static void D2DCleanup();
|
||||
|
||||
private:
|
||||
static ID3D10Device1 *mD3D10Device;
|
||||
|
@ -2686,6 +2686,15 @@ DrawTargetD2D::factory()
|
||||
return mFactory;
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetD2D::CleanupD2D()
|
||||
{
|
||||
if (mFactory) {
|
||||
mFactory->Release();
|
||||
mFactory = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
IDWriteFactory*
|
||||
DrawTargetD2D::GetDWriteFactory()
|
||||
{
|
||||
|
@ -128,6 +128,7 @@ public:
|
||||
void PopCachedLayer(ID2D1RenderTarget *aRT);
|
||||
|
||||
static ID2D1Factory *factory();
|
||||
static void CleanupD2D();
|
||||
static TemporaryRef<ID2D1StrokeStyle> CreateStrokeStyleForOptions(const StrokeOptions &aStrokeOptions);
|
||||
static IDWriteFactory *GetDWriteFactory();
|
||||
|
||||
|
@ -441,6 +441,12 @@ Factory::GetD2DVRAMUsageSourceSurface()
|
||||
return DrawTargetD2D::mVRAMUsageSS;
|
||||
}
|
||||
|
||||
void
|
||||
Factory::D2DCleanup()
|
||||
{
|
||||
DrawTargetD2D::CleanupD2D();
|
||||
}
|
||||
|
||||
#endif // XP_WIN
|
||||
|
||||
TemporaryRef<DrawTarget>
|
||||
|
@ -385,6 +385,8 @@ gfxWindowsPlatform::~gfxWindowsPlatform()
|
||||
}
|
||||
#endif
|
||||
|
||||
mozilla::gfx::Factory::D2DCleanup();
|
||||
|
||||
/*
|
||||
* Uninitialize COM
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user