зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1066254: Make the temporary surface used in DrawTargetD2D1 always be transparent. r=jrmuizel
This commit is contained in:
Родитель
13a84d0119
Коммит
4ba13663b0
|
@ -733,8 +733,11 @@ DrawTargetD2D1::Init(ID3D11Texture2D* aTexture, SurfaceFormat aFormat)
|
|||
mFormat = aFormat;
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
aTexture->GetDesc(&desc);
|
||||
desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
mSize.width = desc.Width;
|
||||
mSize.height = desc.Height;
|
||||
props.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
|
||||
props.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
|
||||
mDC->CreateBitmap(D2DIntSize(mSize), nullptr, 0, props, (ID2D1Bitmap1**)byRef(mTempBitmap));
|
||||
|
||||
|
@ -776,6 +779,9 @@ DrawTargetD2D1::Init(const IntSize &aSize, SurfaceFormat aFormat)
|
|||
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));
|
||||
|
||||
mDC->SetTarget(mBitmap);
|
||||
|
|
Загрузка…
Ссылка в новой задаче