Bug 1216366: Ensure D3D11 uploads the entire surface the first time for component alpha textures. r=nical

This commit is contained in:
Bas Schouten 2015-11-24 17:04:13 +01:00
Родитель e0d8a174d7
Коммит 662684de75
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -1018,6 +1018,7 @@ DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
}
}
nsIntRegion *regionToUpdate = aDestRegion;
if (!mTexture) {
hr = mCompositor->GetDevice()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTexture));
mIsTiled = false;
@ -1025,6 +1026,10 @@ DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
Reset();
return false;
}
if (mFlags & TextureFlags::COMPONENT_ALPHA) {
regionToUpdate = nullptr;
}
}
DataSourceSurface::MappedSurface map;
@ -1034,8 +1039,8 @@ DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
return false;
}
if (aDestRegion) {
nsIntRegionRectIterator iter(*aDestRegion);
if (regionToUpdate) {
nsIntRegionRectIterator iter(*regionToUpdate);
const IntRect *iterRect;
while ((iterRect = iter.Next())) {
D3D11_BOX box;