Bug 1235613: Make gfxCriticalError/Note strings in gfx/ unique. r?jrmuizel
--- a/gfx/2d/DrawTargetD2D1.cpp
+++ b/gfx/2d/DrawTargetD2D1.cpp
@@ -869,17 +869,17 @@ DrawTargetD2D1::Init(ID3D11Texture2D* aT
// This single solid color brush system is not very 'threadsafe', however,
// issueing multiple drawing commands simultaneously to a single drawtarget
// from multiple threads is unexpected since there's no way to guarantee
// ordering in that situation anyway.
hr = mDC->CreateSolidColorBrush(D2D1::ColorF(0, 0), getter_AddRefs(mSolidColorBrush));
if (FAILED(hr)) {
- gfxCriticalError() << "[D2D1.1] Failure creating solid color brush.";
+ gfxCriticalError() << "[D2D1.1] Failure creating solid color brush (I1).";
return false;
}
mDC->SetTarget(mBitmap);
mDC->BeginDraw();
return true;
@@ -922,17 +922,17 @@ DrawTargetD2D1::Init(const IntSize &aSiz
return false;
}
mDC->SetTarget(mBitmap);
hr = mDC->CreateSolidColorBrush(D2D1::ColorF(0, 0), getter_AddRefs(mSolidColorBrush));
if (FAILED(hr)) {
- gfxCriticalError() << "[D2D1.1] Failure creating solid color brush.";
+ gfxCriticalError() << "[D2D1.1] Failure creating solid color brush (I2).";
return false;
}
mDC->BeginDraw();
mDC->Clear();
mFormat = aFormat;
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -321,17 +321,17 @@ Factory::CheckSurfaceSize(const IntSize
return true;
}
already_AddRefed<DrawTarget>
Factory::CreateDrawTarget(BackendType aBackend, const IntSize &aSize, SurfaceFormat aFormat)
{
if (!AllowedSurfaceSize(aSize)) {
- gfxCriticalError(LoggerOptionsBasedOnSize(aSize)) << "Failed to allocate a surface due to invalid size " << aSize;
+ gfxCriticalError(LoggerOptionsBasedOnSize(aSize)) << "Failed to allocate a surface due to invalid size (CDT) " << aSize;
return nullptr;
}
RefPtr<DrawTarget> retVal;
switch (aBackend) {
#ifdef WIN32
case BackendType::DIRECT2D:
{
@@ -412,17 +412,17 @@ already_AddRefed<DrawTarget>
Factory::CreateDrawTargetForData(BackendType aBackend,
unsigned char *aData,
const IntSize &aSize,
int32_t aStride,
SurfaceFormat aFormat)
{
MOZ_ASSERT(aData);
if (!AllowedSurfaceSize(aSize)) {
- gfxCriticalError(LoggerOptionsBasedOnSize(aSize)) << "Failed to allocate a surface due to invalid size " << aSize;
+ gfxCriticalError(LoggerOptionsBasedOnSize(aSize)) << "Failed to allocate a surface due to invalid size (DTD) " << aSize;
return nullptr;
}
RefPtr<DrawTarget> retVal;
switch (aBackend) {
#ifdef USE_SKIA
case BackendType::SKIA:
@@ -887,17 +887,17 @@ Factory::CreateWrappingDataSourceSurface
}
already_AddRefed<DataSourceSurface>
Factory::CreateDataSourceSurface(const IntSize &aSize,
SurfaceFormat aFormat,
bool aZero)
{
if (!AllowedSurfaceSize(aSize)) {
- gfxCriticalError(LoggerOptionsBasedOnSize(aSize)) << "Failed to allocate a surface due to invalid size " << aSize;
+ gfxCriticalError(LoggerOptionsBasedOnSize(aSize)) << "Failed to allocate a surface due to invalid size (DSS) " << aSize;
return nullptr;
}
RefPtr<SourceSurfaceAlignedRawData> newSurf = new SourceSurfaceAlignedRawData();
if (newSurf->Init(aSize, aFormat, aZero)) {
return newSurf.forget();
}
--- a/gfx/2d/SourceSurfaceD2D1.cpp
+++ b/gfx/2d/SourceSurfaceD2D1.cpp
@@ -190,17 +190,17 @@ DataSourceSurfaceD2D1::Map(MapType aMapT
options = D2D1_MAP_OPTIONS_READ;
} else {
gfxDevCrash(LogReason::D2D1NoWriteMap) << "No support for Write maps on D2D1 DataSourceSurfaces yet!";
return false;
}
D2D1_MAPPED_RECT map;
if (FAILED(mBitmap->Map(D2D1_MAP_OPTIONS_READ, &map))) {
- gfxCriticalError() << "Failed to map bitmap.";
+ gfxCriticalError() << "Failed to map bitmap (M).";
return false;
}
aMappedSurface->mData = map.bits;
aMappedSurface->mStride = map.pitch;
mIsMapped = !!aMappedSurface->mData;
return mIsMapped;
}
@@ -226,16 +226,16 @@ void
DataSourceSurfaceD2D1::EnsureMapped()
{
// Do not use GetData() after having used Map!
MOZ_ASSERT(!mIsMapped);
if (mMapped) {
return;
}
if (FAILED(mBitmap->Map(D2D1_MAP_OPTIONS_READ, &mMap))) {
- gfxCriticalError() << "Failed to map bitmap.";
+ gfxCriticalError() << "Failed to map bitmap (EM).";
return;
}
mMapped = true;
}
}
}
--- a/gfx/2d/SourceSurfaceD2DTarget.cpp
+++ b/gfx/2d/SourceSurfaceD2DTarget.cpp
@@ -60,17 +60,17 @@ SourceSurfaceD2DTarget::GetDataSurface()
mTexture->GetDesc(&desc);
desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;
desc.Usage = D3D10_USAGE_STAGING;
desc.BindFlags = 0;
desc.MiscFlags = 0;
if (!Factory::GetDirect3D10Device()) {
- gfxCriticalError() << "Invalid D3D10 device in D2D target surface";
+ gfxCriticalError() << "Invalid D3D10 device in D2D target surface (GDS)";
return nullptr;
}
HRESULT hr = Factory::GetDirect3D10Device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(dataSurf->mTexture));
if (FAILED(hr)) {
gfxDebug() << "Failed to create staging texture for SourceSurface. Code: " << hexa(hr);
return nullptr;
@@ -92,17 +92,17 @@ SourceSurfaceD2DTarget::GetNativeSurface
ID3D10ShaderResourceView*
SourceSurfaceD2DTarget::GetSRView()
{
if (mSRView) {
return mSRView;
}
if (!Factory::GetDirect3D10Device()) {
- gfxCriticalError() << "Invalid D3D10 device in D2D target surface";
+ gfxCriticalError() << "Invalid D3D10 device in D2D target surface (SRV)";
return nullptr;
}
HRESULT hr = Factory::GetDirect3D10Device()->CreateShaderResourceView(mTexture, nullptr, getter_AddRefs(mSRView));
if (FAILED(hr)) {
gfxWarning() << "Failed to create ShaderResourceView. Code: " << hexa(hr);
}
--- a/gfx/layers/BufferTexture.cpp
+++ b/gfx/layers/BufferTexture.cpp
@@ -298,29 +298,29 @@ BufferTextureData::UpdateFromSurface(gfx
if (!surface) {
gfxCriticalError() << "Failed to get serializer as surface!";
return false;
}
RefPtr<gfx::DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (BT).";
return false;
}
if (surface->GetSize() != srcSurf->GetSize() || surface->GetFormat() != srcSurf->GetFormat()) {
- gfxCriticalError() << "Attempt to update texture client from a surface with a different size or format! This: " << surface->GetSize() << " " << surface->GetFormat() << " Other: " << aSurface->GetSize() << " " << aSurface->GetFormat();
+ gfxCriticalError() << "Attempt to update texture client from a surface with a different size or format (BT)! This: " << surface->GetSize() << " " << surface->GetFormat() << " Other: " << aSurface->GetSize() << " " << aSurface->GetFormat();
return false;
}
gfx::DataSourceSurface::MappedSurface sourceMap;
gfx::DataSourceSurface::MappedSurface destMap;
if (!srcSurf->Map(gfx::DataSourceSurface::READ, &sourceMap)) {
- gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
+ gfxCriticalError() << "Failed to map source surface for UpdateFromSurface (BT).";
return false;
}
if (!surface->Map(gfx::DataSourceSurface::WRITE, &destMap)) {
srcSurf->Unmap();
gfxCriticalError() << "Failed to map destination surface for UpdateFromSurface.";
return false;
}
--- a/gfx/layers/TextureDIB.cpp
+++ b/gfx/layers/TextureDIB.cpp
@@ -178,17 +178,17 @@ MemoryDIBTextureData::Create(gfx::IntSiz
bool
MemoryDIBTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
{
RefPtr<gfxImageSurface> imgSurf = mSurface->GetAsImageSurface();
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (DIB).";
return false;
}
DataSourceSurface::MappedSurface sourceMap;
if (!srcSurf->Map(gfx::DataSourceSurface::READ, &sourceMap)) {
gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
return false;
}
@@ -216,17 +216,17 @@ ShmemDIBTextureData::CreateSimilar(ISurf
bool
ShmemDIBTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
{
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (DTD).";
return false;
}
DataSourceSurface::MappedSurface sourceMap;
if (!srcSurf->Map(gfx::DataSourceSurface::READ, &sourceMap)) {
gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
return false;
}
--- a/gfx/layers/client/TiledContentClient.cpp
+++ b/gfx/layers/client/TiledContentClient.cpp
@@ -765,25 +765,25 @@ TileClient::GetBackBuffer(const nsIntReg
}
if (mBackBufferOnWhite) {
mAllocator->ReportClientLost();
mBackBufferOnWhite = nullptr;
}
mBackBuffer.Set(this, mAllocator->GetTextureClient());
if (!mBackBuffer) {
- gfxCriticalError() << "[Tiling:Client] Failed to allocate a TextureClient";
+ gfxCriticalError() << "[Tiling:Client] Failed to allocate a TextureClient (B)";
return nullptr;
}
if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) {
mBackBufferOnWhite = mAllocator->GetTextureClient();
if (!mBackBufferOnWhite) {
mBackBuffer.Set(this, nullptr);
- gfxCriticalError() << "[Tiling:Client] Failed to allocate a TextureClient";
+ gfxCriticalError() << "[Tiling:Client] Failed to allocate a TextureClient (W)";
return nullptr;
}
}
// Create a lock for our newly created back-buffer.
if (mManager->AsShadowForwarder()->IsSameProcess()) {
// If our compositor is in the same process, we can save some cycles by not
// using shared memory.
@@ -798,26 +798,26 @@ TileClient::GetBackBuffer(const nsIntReg
mInvalidBack = IntRect(0, 0, mBackBuffer->GetSize().width, mBackBuffer->GetSize().height);
}
ValidateBackBufferFromFront(aDirtyRegion, aAddPaintedRegion);
}
if (!mBackBuffer->IsLocked()) {
if (!mBackBuffer->Lock(OpenMode::OPEN_READ_WRITE)) {
- gfxCriticalError() << "[Tiling:Client] Failed to lock a tile";
+ gfxCriticalError() << "[Tiling:Client] Failed to lock a tile (B)";
DiscardBackBuffer();
DiscardFrontBuffer();
return nullptr;
}
}
if (mBackBufferOnWhite && !mBackBufferOnWhite->IsLocked()) {
if (!mBackBufferOnWhite->Lock(OpenMode::OPEN_READ_WRITE)) {
- gfxCriticalError() << "[Tiling:Client] Failed to lock a tile";
+ gfxCriticalError() << "[Tiling:Client] Failed to lock a tile (W)";
DiscardBackBuffer();
DiscardFrontBuffer();
return nullptr;
}
}
if (createdTextureClient) {
if (!mCompositableClient->AddTextureClient(mBackBuffer)) {
--- a/gfx/layers/d3d11/TextureD3D11.cpp
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -721,23 +721,23 @@ D3D10TextureData::BorrowDrawTarget()
}
bool
D3D11TextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
{
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (D3D11).";
return false;
}
DataSourceSurface::MappedSurface sourceMap;
if (!srcSurf->Map(DataSourceSurface::READ, &sourceMap)) {
- gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
+ gfxCriticalError() << "Failed to map source surface for UpdateFromSurface (D3D11).";
return false;
}
RefPtr<ID3D11Device> device;
mTexture->GetDevice(getter_AddRefs(device));
RefPtr<ID3D11DeviceContext> ctx;
device->GetImmediateContext(getter_AddRefs(ctx));
@@ -754,23 +754,23 @@ D3D11TextureData::UpdateFromSurface(gfx:
}
bool
D3D10TextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
{
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (D3D10).";
return false;
}
DataSourceSurface::MappedSurface sourceMap;
if (!srcSurf->Map(DataSourceSurface::READ, &sourceMap)) {
- gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
+ gfxCriticalError() << "Failed to map source surface for UpdateFromSurface (D3D10).";
return false;
}
RefPtr<ID3D10Device> device;
mTexture->GetDevice(getter_AddRefs(device));
D3D10_BOX box;
box.front = 0;
@@ -1244,17 +1244,17 @@ SyncObjectD3D11::FinalizeFrame()
// test QI
RefPtr<IDXGIKeyedMutex> mutex;
hr = mD3D10Texture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
if (FAILED(hr) || !mutex) {
// Leave both the critical error and MOZ_CRASH for now; the critical error lets
// us "save" the hr value. We will probably eventuall replace this with gfxDevCrash.
- gfxCriticalError() << "Failed to get KeyedMutex: " << hexa(hr);
+ gfxCriticalError() << "Failed to get KeyedMutex (1): " << hexa(hr);
MOZ_CRASH("GFX: Cannot get D3D10 KeyedMutex");
}
}
if (!mD3D11Texture && mD3D11SyncedTextures.size()) {
ID3D11Device* device = gfxWindowsPlatform::GetPlatform()->GetD3D11ContentDevice();
hr = device->OpenSharedResource(mHandle, __uuidof(ID3D11Texture2D), (void**)(ID3D11Texture2D**)getter_AddRefs(mD3D11Texture));
@@ -1271,17 +1271,17 @@ SyncObjectD3D11::FinalizeFrame()
// test QI
RefPtr<IDXGIKeyedMutex> mutex;
hr = mD3D11Texture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
if (FAILED(hr) || !mutex) {
// Leave both the critical error and MOZ_CRASH for now; the critical error lets
// us "save" the hr value. We will probably eventuall replace this with gfxDevCrash.
- gfxCriticalError() << "Failed to get KeyedMutex: " << hexa(hr);
+ gfxCriticalError() << "Failed to get KeyedMutex (2): " << hexa(hr);
MOZ_CRASH("GFX: Cannot get D3D11 KeyedMutex");
}
}
if (mD3D10SyncedTextures.size()) {
RefPtr<IDXGIKeyedMutex> mutex;
hr = mD3D10Texture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
hr = mutex->AcquireSync(0, 20000);
--- a/gfx/layers/d3d9/DeviceManagerD3D9.cpp
+++ b/gfx/layers/d3d9/DeviceManagerD3D9.cpp
@@ -326,142 +326,142 @@ DeviceManagerD3D9::Init()
if (mNv3DVUtils) {
IUnknown* devUnknown = nullptr;
if (mDevice) {
mDevice->QueryInterface(IID_IUnknown, (void **)&devUnknown);
}
mNv3DVUtils->SetDeviceInfo(devUnknown);
}
- auto failCreateShaderMsg = "[D3D9] failed to create a critical resource (shader) code: ";
+ auto failCreateShaderMsg = "[D3D9] failed to create a critical resource (shader) code";
hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVS,
getter_AddRefs(mLayerVS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "LayerQuadVS: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)RGBShaderPS,
getter_AddRefs(mRGBPS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "RGBShaderPS: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)RGBAShaderPS,
getter_AddRefs(mRGBAPS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPS: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)ComponentPass1ShaderPS,
getter_AddRefs(mComponentPass1PS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "ComponentPass1ShaderPS: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)ComponentPass2ShaderPS,
getter_AddRefs(mComponentPass2PS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "ComponentPass2ShaderPS: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)YCbCrShaderPS,
getter_AddRefs(mYCbCrPS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "YCbCrShaderPS: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)SolidColorShaderPS,
getter_AddRefs(mSolidColorPS));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg;
+ gfxCriticalError() << failCreateShaderMsg << "SolidColorShaderPS" << gfx::hexa(hr);
return false;
}
hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVSMask,
getter_AddRefs(mLayerVSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "LayerQuadVSMask: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVSMask3D,
getter_AddRefs(mLayerVSMask3D));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "LayerQuadVSMask3D: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)RGBShaderPSMask,
getter_AddRefs(mRGBPSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "RGBShaderPSMask " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)RGBAShaderPSMask,
getter_AddRefs(mRGBAPSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPSMask: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)RGBAShaderPSMask3D,
getter_AddRefs(mRGBAPSMask3D));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPSMask3D: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)ComponentPass1ShaderPSMask,
getter_AddRefs(mComponentPass1PSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "ComponentPass1ShaderPSMask: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)ComponentPass2ShaderPSMask,
getter_AddRefs(mComponentPass2PSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg;
+ gfxCriticalError() << failCreateShaderMsg << "ComponentPass2ShaderPSMask: ";
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)YCbCrShaderPSMask,
getter_AddRefs(mYCbCrPSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "YCbCrShaderPSMask: " << gfx::hexa(hr);
return false;
}
hr = mDevice->CreatePixelShader((DWORD*)SolidColorShaderPSMask,
getter_AddRefs(mSolidColorPSMask));
if (FAILED(hr)) {
- gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
+ gfxCriticalError() << failCreateShaderMsg << "SolidColorShaderPSMask: " << gfx::hexa(hr);
return false;
}
if (!CreateVertexBuffer()) {
gfxCriticalError() << "[D3D9] Failed to create a critical resource (vbo)";
return false;
}
--- a/gfx/layers/d3d9/TextureD3D9.cpp
+++ b/gfx/layers/d3d9/TextureD3D9.cpp
@@ -543,17 +543,17 @@ D3D9TextureData::BorrowDrawTarget()
}
} else {
// gfxWindowsSurface don't support transparency so we can't use the d3d9
// windows surface optimization.
// Instead we have to use a gfxImageSurface and fallback for font drawing.
D3DLOCKED_RECT rect;
HRESULT hr = mD3D9Surface->LockRect(&rect, nullptr, 0);
if (FAILED(hr) || !rect.pBits) {
- gfxCriticalError() << "Failed to lock rect borrowing the target in D3D9 " << hexa(hr);
+ gfxCriticalError() << "Failed to lock rect borrowing the target in D3D9 (BDT) " << hexa(hr);
return nullptr;
}
dt = gfxPlatform::GetPlatform()->CreateDrawTargetForData((uint8_t*)rect.pBits, mSize,
rect.Pitch, mFormat);
if (!dt) {
return nullptr;
}
@@ -578,31 +578,31 @@ D3D9TextureData::UpdateFromSurface(gfx::
MOZ_ASSERT(mD3D9Surface);
// gfxWindowsSurface don't support transparency so we can't use the d3d9
// windows surface optimization.
// Instead we have to use a gfxImageSurface and fallback for font drawing.
D3DLOCKED_RECT rect;
HRESULT hr = mD3D9Surface->LockRect(&rect, nullptr, 0);
if (FAILED(hr) || !rect.pBits) {
- gfxCriticalError() << "Failed to lock rect borrowing the target in D3D9 " << hexa(hr);
+ gfxCriticalError() << "Failed to lock rect borrowing the target in D3D9 (UFS) " << hexa(hr);
return false;
}
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (D3D9).";
mD3D9Surface->UnlockRect();
return false;
}
DataSourceSurface::MappedSurface sourceMap;
if (!srcSurf->Map(DataSourceSurface::READ, &sourceMap)) {
- gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
+ gfxCriticalError() << "Failed to map source surface for UpdateFromSurface (D3D9).";
return false;
}
for (int y = 0; y < srcSurf->GetSize().height; y++) {
memcpy((uint8_t*)rect.pBits + rect.Pitch * y,
sourceMap.mData + sourceMap.mStride * y,
srcSurf->GetSize().width * BytesPerPixel(srcSurf->GetFormat()));
}
--- a/gfx/layers/opengl/GrallocTextureClient.cpp
+++ b/gfx/layers/opengl/GrallocTextureClient.cpp
@@ -237,33 +237,33 @@ GrallocTextureData::UpdateFromSurface(gf
if (!mMappedBuffer) {
return false;
}
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
- gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
+ gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (GTC).";
return false;
}
gfx::SurfaceFormat format = SurfaceFormatForPixelFormat(mGraphicBuffer->getPixelFormat());
if (mSize != srcSurf->GetSize() || mFormat != srcSurf->GetFormat()) {
gfxCriticalError() << "Attempt to update texture client from a surface with a different size or format! This: " << mSize << " " << format << " Other: " << srcSurf->GetSize() << " " << srcSurf->GetFormat();
return false;
}
long pixelStride = mGraphicBuffer->getStride();
long byteStride = pixelStride * BytesPerPixel(format);
DataSourceSurface::MappedSurface sourceMap;
if (!srcSurf->Map(DataSourceSurface::READ, &sourceMap)) {
- gfxCriticalError() << "Failed to map source surface for UpdateFromSurface.";
+ gfxCriticalError() << "Failed to map source surface for UpdateFromSurface (GTC).";
return false;
}
for (int y = 0; y < srcSurf->GetSize().height; y++) {
memcpy(mMappedBuffer + byteStride * y,
sourceMap.mData + sourceMap.mStride * y,
srcSurf->GetSize().width * BytesPerPixel(srcSurf->GetFormat()));
}
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1775,17 +1775,17 @@ CheckForAdapterMismatch(ID3D11Device *de
GetDxgiDesc(device, &desc);
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
nsString vendorID;
gfxInfo->GetAdapterVendorID(vendorID);
nsresult ec;
int32_t vendor = vendorID.ToInteger(&ec, 16);
if (vendor != desc.VendorId) {
- gfxCriticalNote << "VendorIDMismatch " << hexa(vendor) << " " << hexa(desc.VendorId);
+ gfxCriticalNote << "VendorIDMismatch V " << hexa(vendor) << " " << hexa(desc.VendorId);
}
}
bool DoesRenderTargetViewNeedsRecreating(ID3D11Device *device)
{
bool result = false;
// CreateTexture2D is known to crash on lower feature levels, see bugs
// 1170211 and 1089413.
@@ -2263,17 +2263,17 @@ gfxWindowsPlatform::ContentAdapterIsPare
const DxgiAdapterDesc& parent = GetParentDevicePrefs().adapter();
if (desc.VendorId != parent.VendorId ||
desc.DeviceId != parent.DeviceId ||
desc.SubSysId != parent.SubSysId ||
desc.AdapterLuid.HighPart != parent.AdapterLuid.HighPart ||
desc.AdapterLuid.LowPart != parent.AdapterLuid.LowPart)
{
- gfxCriticalNote << "VendorIDMismatch " << hexa(parent.VendorId) << " " << hexa(desc.VendorId);
+ gfxCriticalNote << "VendorIDMismatch P " << hexa(parent.VendorId) << " " << hexa(desc.VendorId);
return false;
}
return true;
}
bool
gfxWindowsPlatform::AttemptD3D11ContentDeviceCreationHelper(