From 3022f3b91ff8d9b512c8408913a9f907bfccb1ec Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 19 Sep 2014 00:01:25 +0200 Subject: [PATCH] Bug 1069592: Annotate several more Direct2D errors. r=jrmuizel --- gfx/2d/DrawTargetD2D.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gfx/2d/DrawTargetD2D.cpp b/gfx/2d/DrawTargetD2D.cpp index b6b816b37db2..8a649382d08d 100644 --- a/gfx/2d/DrawTargetD2D.cpp +++ b/gfx/2d/DrawTargetD2D.cpp @@ -1348,7 +1348,7 @@ DrawTargetD2D::Init(const IntSize &aSize, SurfaceFormat aFormat) mFormat = aFormat; if (!Factory::GetDirect3D10Device()) { - gfxDebug() << "Failed to Init Direct2D DrawTarget (No D3D10 Device set.)"; + gfxCriticalError() << "Failed to Init Direct2D DrawTarget (No D3D10 Device set.)"; return false; } mDevice = Factory::GetDirect3D10Device(); @@ -1362,7 +1362,7 @@ DrawTargetD2D::Init(const IntSize &aSize, SurfaceFormat aFormat) hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(mTexture)); if (FAILED(hr)) { - gfxDebug() << "Failed to init Direct2D DrawTarget. Size: " << mSize << " Code: " << hr; + gfxCriticalError() << "Failed to init Direct2D DrawTarget. Size: " << mSize << " Code: " << hr; return false; } @@ -1393,7 +1393,7 @@ DrawTargetD2D::Init(ID3D10Texture2D *aTexture, SurfaceFormat aFormat) hr = device->QueryInterface((ID3D10Device1**)byRef(mDevice)); if (FAILED(hr)) { - gfxWarning() << "Failed to get D3D10 device from texture."; + gfxCriticalError() << "Failed to get D3D10 device from texture."; return false; } @@ -1512,6 +1512,7 @@ bool DrawTargetD2D::InitD2DRenderTarget() { if (!factory()) { + gfxCriticalError() << "No valid D2D factory available."; return false; } @@ -1960,7 +1961,7 @@ DrawTargetD2D::CreateRTForTexture(ID3D10Texture2D *aTexture, SurfaceFormat aForm hr = aTexture->QueryInterface((IDXGISurface**)byRef(surface)); if (FAILED(hr)) { - gfxWarning() << "Failed to QI texture to surface."; + gfxCriticalError() << "Failed to QI texture to surface."; return nullptr; } @@ -1978,7 +1979,7 @@ DrawTargetD2D::CreateRTForTexture(ID3D10Texture2D *aTexture, SurfaceFormat aForm hr = factory()->CreateDxgiSurfaceRenderTarget(surface, props, byRef(rt)); if (FAILED(hr)) { - gfxWarning() << "Failed to create D2D render target for texture."; + gfxCriticalError() << "Failed to create D2D render target for texture."; return nullptr; }