Bug 993428 - Fix masks with d3d9 component alpha layers. r=Bas

This commit is contained in:
Nicolas Silva 2014-04-09 19:17:13 +02:00
parent 63b3ea63c5
commit 51812be49e

View File

@ -433,9 +433,9 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
1);
SetSamplerForFilter(effectComponentAlpha->mFilter);
SetMask(aEffectChain, maskTexture);
maskTexture = mDeviceManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS1, maskType);
SetMask(aEffectChain, maskTexture);
d3d9Device->SetTexture(0, sourceOnBlack->GetD3D9Texture());
d3d9Device->SetTexture(1, sourceOnWhite->GetD3D9Texture());
d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
@ -443,6 +443,7 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
d3d9Device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
maskTexture = mDeviceManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS2, maskType);
SetMask(aEffectChain, maskTexture);
d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
d3d9Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);
d3d9Device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);