mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1057222 - Avoid uploading the whole tile when it's new but only partially valid. r=BenWa
--HG-- extra : rebase_source : 8fe73f903f2917830f05fd82a865a5376ecab31c
This commit is contained in:
parent
b2547cbc6e
commit
75fab52064
@ -310,6 +310,16 @@ TextureImageTextureSourceOGL::Update(gfx::DataSourceSurface* aSurface,
|
||||
SurfaceFormatToImageFormat(aSurface->GetFormat()));
|
||||
}
|
||||
ClearCachedFilter();
|
||||
|
||||
if (aDestRegion &&
|
||||
!aSrcOffset &&
|
||||
!aDestRegion->IsEqual(nsIntRect(0, 0, size.width, size.height))) {
|
||||
// UpdateFromDataSource will ignore our specified aDestRegion since the texture
|
||||
// hasn't been allocated with glTexImage2D yet. Call Resize() to force the
|
||||
// allocation (full size, but no upload), and then we'll only upload the pixels
|
||||
// we care about below.
|
||||
mTexImage->Resize(size);
|
||||
}
|
||||
}
|
||||
|
||||
mTexImage->UpdateFromDataSource(aSurface, aDestRegion, aSrcOffset);
|
||||
|
Loading…
Reference in New Issue
Block a user