author | Bas Schouten <bschouten@mozilla.com> |
Mon, 24 Nov 2014 19:44:48 +0000 | |
changeset 217171 | 49ec38b3777bdea5479f9a9ce5b46c90f0c7dc75 |
parent 217170 | f86a92a28ec9bc027a5b955a0cc7ec18ab84c0fc |
child 217172 | 017788319d00d50e94e88dcaaafb3263d3412252 |
push id | 52241 |
push user | bschouten@mozilla.com |
push date | Mon, 24 Nov 2014 19:45:03 +0000 |
treeherder | mozilla-inbound@2b63fa9da201 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | BenWa |
bugs | 1101248 |
milestone | 36.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/2d/DrawTargetD2D1.cpp +++ b/gfx/2d/DrawTargetD2D1.cpp @@ -811,27 +811,32 @@ DrawTargetD2D1::Init(const IntSize &aSiz } D2D1_BITMAP_PROPERTIES1 props; props.dpiX = 96; props.dpiY = 96; props.pixelFormat = D2DPixelFormat(aFormat); props.colorContext = nullptr; props.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET; - mDC->CreateBitmap(D2DIntSize(aSize), nullptr, 0, props, (ID2D1Bitmap1**)byRef(mBitmap)); + hr = mDC->CreateBitmap(D2DIntSize(aSize), nullptr, 0, props, (ID2D1Bitmap1**)byRef(mBitmap)); if (FAILED(hr)) { - gfxWarning() << *this << ": Error " << hexa(hr) << " failed to create new CommandList."; + gfxCriticalError() << *this << ": Error " << hexa(hr) << " failed to create new Bitmap. Size: " << aSize; return false; } props.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; props.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM; - mDC->CreateBitmap(D2DIntSize(aSize), nullptr, 0, props, (ID2D1Bitmap1**)byRef(mTempBitmap)); + hr = mDC->CreateBitmap(D2DIntSize(aSize), nullptr, 0, props, (ID2D1Bitmap1**)byRef(mTempBitmap)); + + if (FAILED(hr)) { + gfxCriticalError() << *this << ": Error " << hexa(hr) << " failed to create new TempBitmap. Size: " << aSize; + return false; + } mDC->SetTarget(mBitmap); mDC->BeginDraw(); mDC->Clear(); mFormat = aFormat;