зеркало из 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) {
|
||||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче