зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216366: Ensure D3D11 uploads the entire surface the first time for component alpha textures. r=nical
This commit is contained in:
Родитель
e0d8a174d7
Коммит
662684de75
|
@ -1018,6 +1018,7 @@ DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsIntRegion *regionToUpdate = aDestRegion;
|
||||||
if (!mTexture) {
|
if (!mTexture) {
|
||||||
hr = mCompositor->GetDevice()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTexture));
|
hr = mCompositor->GetDevice()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTexture));
|
||||||
mIsTiled = false;
|
mIsTiled = false;
|
||||||
|
@ -1025,6 +1026,10 @@ DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
|
||||||
Reset();
|
Reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mFlags & TextureFlags::COMPONENT_ALPHA) {
|
||||||
|
regionToUpdate = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DataSourceSurface::MappedSurface map;
|
DataSourceSurface::MappedSurface map;
|
||||||
|
@ -1034,8 +1039,8 @@ DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aDestRegion) {
|
if (regionToUpdate) {
|
||||||
nsIntRegionRectIterator iter(*aDestRegion);
|
nsIntRegionRectIterator iter(*regionToUpdate);
|
||||||
const IntRect *iterRect;
|
const IntRect *iterRect;
|
||||||
while ((iterRect = iter.Next())) {
|
while ((iterRect = iter.Next())) {
|
||||||
D3D11_BOX box;
|
D3D11_BOX box;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче