Bug 901722. Tweek to d3d9 compositor blend modes. r=bas

This commit is contained in:
Nicholas Cameron 2013-08-09 11:30:19 +12:00
Родитель 0d12b9587b
Коммит 3351ebf4f3
1 изменённых файлов: 0 добавлений и 4 удалений

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

@ -377,7 +377,6 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
device()->SetTexture(1, sourceOnWhite->GetD3D9Texture());
device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
device()->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, TRUE);
device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
maskTexture = mDeviceManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS2, maskType);
@ -388,7 +387,6 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
// Restore defaults
device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
device()->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
device()->SetTexture(1, NULL);
}
return;
@ -401,14 +399,12 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect, const gfx::Rect &aClipRect,
if (!isPremultiplied) {
device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
device()->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, TRUE);
}
HRESULT hr = device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
if (!isPremultiplied) {
device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
device()->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
}
}