Bug 1235613 - Make gfxCriticalError/Note strings in gfx/ unique. r=jrmuizel

--HG--
extra : transplant_source : %8F%1DcB%3A%25%94%95G%EF%B4U%CE%B9%10%E1%A3%BC%E2%3D
This commit is contained in:
Milan Sreckovic 2015-12-29 14:03:58 -05:00
Родитель 8861594248
Коммит ac84b221c9
12 изменённых файлов: 49 добавлений и 49 удалений

Просмотреть файл

@ -874,7 +874,7 @@ DrawTargetD2D1::Init(ID3D11Texture2D* aTexture, SurfaceFormat aFormat)
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;
}
@ -927,7 +927,7 @@ DrawTargetD2D1::Init(const IntSize &aSize, SurfaceFormat aFormat)
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;
}

Просмотреть файл

@ -326,7 +326,7 @@ 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;
}
@ -417,7 +417,7 @@ Factory::CreateDrawTargetForData(BackendType aBackend,
{
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;
}
@ -892,7 +892,7 @@ Factory::CreateDataSourceSurface(const IntSize &aSize,
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;
}

Просмотреть файл

@ -195,7 +195,7 @@ DataSourceSurfaceD2D1::Map(MapType aMapType, MappedSurface *aMappedSurface)
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;
@ -231,7 +231,7 @@ DataSourceSurfaceD2D1::EnsureMapped()
return;
}
if (FAILED(mBitmap->Map(D2D1_MAP_OPTIONS_READ, &mMap))) {
gfxCriticalError() << "Failed to map bitmap.";
gfxCriticalError() << "Failed to map bitmap (EM).";
return;
}
mMapped = true;

Просмотреть файл

@ -65,7 +65,7 @@ SourceSurfaceD2DTarget::GetDataSurface()
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;
}
@ -97,7 +97,7 @@ SourceSurfaceD2DTarget::GetSRView()
}
if (!Factory::GetDirect3D10Device()) {
gfxCriticalError() << "Invalid D3D10 device in D2D target surface";
gfxCriticalError() << "Invalid D3D10 device in D2D target surface (SRV)";
return nullptr;
}

Просмотреть файл

@ -303,19 +303,19 @@ BufferTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
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;
}

Просмотреть файл

@ -183,7 +183,7 @@ MemoryDIBTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (DIB).";
return false;
}
@ -221,7 +221,7 @@ 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;
}

Просмотреть файл

@ -770,7 +770,7 @@ TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion,
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;
}
@ -778,7 +778,7 @@ TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion,
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;
}
}
@ -803,7 +803,7 @@ TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion,
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;
@ -812,7 +812,7 @@ TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion,
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;

Просмотреть файл

@ -726,13 +726,13 @@ 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;
}
@ -759,13 +759,13 @@ 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;
}
@ -1250,7 +1250,7 @@ SyncObjectD3D11::FinalizeFrame()
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");
}
}
@ -1277,7 +1277,7 @@ SyncObjectD3D11::FinalizeFrame()
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");
}
}

Просмотреть файл

@ -331,13 +331,13 @@ DeviceManagerD3D9::Init()
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;
}
@ -345,7 +345,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mRGBPS));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "RGBShaderPS: " << gfx::hexa(hr);
return false;
}
@ -353,7 +353,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mRGBAPS));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPS: " << gfx::hexa(hr);
return false;
}
@ -361,7 +361,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mComponentPass1PS));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "ComponentPass1ShaderPS: " << gfx::hexa(hr);
return false;
}
@ -369,7 +369,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mComponentPass2PS));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "ComponentPass2ShaderPS: " << gfx::hexa(hr);
return false;
}
@ -377,7 +377,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mYCbCrPS));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "YCbCrShaderPS: " << gfx::hexa(hr);
return false;
}
@ -385,7 +385,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mSolidColorPS));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg;
gfxCriticalError() << failCreateShaderMsg << "SolidColorShaderPS" << gfx::hexa(hr);
return false;
}
@ -393,14 +393,14 @@ DeviceManagerD3D9::Init()
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;
}
@ -408,7 +408,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mRGBPSMask));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "RGBShaderPSMask " << gfx::hexa(hr);
return false;
}
@ -416,7 +416,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mRGBAPSMask));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPSMask: " << gfx::hexa(hr);
return false;
}
@ -424,7 +424,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mRGBAPSMask3D));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPSMask3D: " << gfx::hexa(hr);
return false;
}
@ -432,7 +432,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mComponentPass1PSMask));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "ComponentPass1ShaderPSMask: " << gfx::hexa(hr);
return false;
}
@ -440,7 +440,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mComponentPass2PSMask));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg;
gfxCriticalError() << failCreateShaderMsg << "ComponentPass2ShaderPSMask: ";
return false;
}
@ -448,7 +448,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mYCbCrPSMask));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "YCbCrShaderPSMask: " << gfx::hexa(hr);
return false;
}
@ -456,7 +456,7 @@ DeviceManagerD3D9::Init()
getter_AddRefs(mSolidColorPSMask));
if (FAILED(hr)) {
gfxCriticalError() << failCreateShaderMsg << gfx::hexa(hr);
gfxCriticalError() << failCreateShaderMsg << "SolidColorShaderPSMask: " << gfx::hexa(hr);
return false;
}

Просмотреть файл

@ -548,7 +548,7 @@ D3D9TextureData::BorrowDrawTarget()
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,
@ -583,21 +583,21 @@ D3D9TextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
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;
}

Просмотреть файл

@ -242,7 +242,7 @@ GrallocTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
if (!srcSurf) {
gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface.";
gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (GTC).";
return false;
}
@ -258,7 +258,7 @@ GrallocTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
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;
}

Просмотреть файл

@ -1789,7 +1789,7 @@ CheckForAdapterMismatch(ID3D11Device *device)
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);
}
}
@ -2277,7 +2277,7 @@ gfxWindowsPlatform::ContentAdapterIsParentAdapter(ID3D11Device* device)
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;
}