mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716439; using masks in each of the dx9 backend layers. r-Bas
This commit is contained in:
parent
08cb3dff93
commit
1ab21b5f10
@ -246,9 +246,9 @@ CanvasLayerD3D9::RenderLayer()
|
||||
SetShaderTransformAndOpacity();
|
||||
|
||||
if (mHasAlpha) {
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER, GetMaskLayer());
|
||||
} else {
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBLAYER);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBLAYER, GetMaskLayer());
|
||||
}
|
||||
|
||||
if (mFilter == gfxPattern::FILTER_NEAREST) {
|
||||
|
@ -78,7 +78,8 @@ RenderColorLayerD3D9(ColorLayer* aLayer, LayerManagerD3D9 *aManager)
|
||||
|
||||
aManager->device()->SetPixelShaderConstantF(0, color, 1);
|
||||
|
||||
aManager->SetShaderMode(DeviceManagerD3D9::SOLIDCOLORLAYER);
|
||||
aManager->SetShaderMode(DeviceManagerD3D9::SOLIDCOLORLAYER,
|
||||
aLayer->GetMaskLayer());
|
||||
|
||||
aManager->device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
|
||||
}
|
||||
|
@ -302,7 +302,9 @@ ContainerRender(Container* aContainer,
|
||||
|
||||
aContainer->SetShaderTransformAndOpacity();
|
||||
|
||||
aManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER);
|
||||
aManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER,
|
||||
aContainer->GetMaskLayer(),
|
||||
aContainer->GetTransform().CanDraw2D());
|
||||
|
||||
aManager->device()->SetTexture(0, renderTexture);
|
||||
aManager->device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
|
||||
|
@ -445,7 +445,7 @@ ImageLayerD3D9::RenderLayer()
|
||||
),
|
||||
1);
|
||||
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::YCBCRLAYER);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::YCBCRLAYER, GetMaskLayer());
|
||||
|
||||
/*
|
||||
* Send 3d control data and metadata
|
||||
@ -611,7 +611,7 @@ ShadowImageLayerD3D9::RenderLayer()
|
||||
mYCbCrImage->mSize.height),
|
||||
1);
|
||||
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::YCBCRLAYER);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::YCBCRLAYER, GetMaskLayer());
|
||||
|
||||
/*
|
||||
* Send 3d control data and metadata
|
||||
|
@ -94,7 +94,8 @@ ShadowBufferD3D9::RenderTo(LayerManagerD3D9 *aD3DManager,
|
||||
{
|
||||
mLayer->SetShaderTransformAndOpacity();
|
||||
|
||||
aD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER);
|
||||
aD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER,
|
||||
mLayer->GetLayer()->GetMaskLayer());
|
||||
mLayer->device()->SetTexture(0, mTexture);
|
||||
|
||||
nsIntRegionRectIterator iter(aVisibleRegion);
|
||||
|
@ -271,14 +271,16 @@ ThebesLayerD3D9::RenderThebesLayer(ReadbackProcessor* aReadback)
|
||||
SetShaderTransformAndOpacity();
|
||||
|
||||
if (mode == SURFACE_COMPONENT_ALPHA) {
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS1);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS1,
|
||||
GetMaskLayer());
|
||||
device()->SetTexture(0, mTexture);
|
||||
device()->SetTexture(1, mTextureOnWhite);
|
||||
device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
|
||||
device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
|
||||
RenderRegion(neededRegion);
|
||||
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS2);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS2,
|
||||
GetMaskLayer());
|
||||
device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
|
||||
device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);
|
||||
RenderRegion(neededRegion);
|
||||
@ -288,7 +290,8 @@ ThebesLayerD3D9::RenderThebesLayer(ReadbackProcessor* aReadback)
|
||||
device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
device()->SetTexture(1, NULL);
|
||||
} else {
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER);
|
||||
mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER,
|
||||
GetMaskLayer());
|
||||
device()->SetTexture(0, mTexture);
|
||||
RenderRegion(neededRegion);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user