Bug 959154 - Part 6: Move away from DeprecatedDirectUpdate and remove them. r=nical

This commit is contained in:
Andreas Pehrson
2014-02-13 17:27:19 +01:00
parent 5c8e32ff38
commit 0a48396e48
5 changed files with 13 additions and 59 deletions

View File

@@ -740,11 +740,18 @@ TextureImageDeprecatedTextureHostOGL::UpdateImpl(const SurfaceDescriptor& aImage
} else {
updateRegion = *aRegion;
}
nsIntPoint offset;
gfx::IntPoint offset;
if (aOffset) {
offset = *aOffset;
offset.x = aOffset->x;
offset.y = aOffset->y;
}
mTexture->DeprecatedDirectUpdate(surf.Get(), updateRegion, offset);
nsRefPtr<gfxImageSurface> thebesSurf = surf.GetAsImage();
RefPtr<DataSourceSurface> sourceSurf =
gfx::Factory::CreateWrappingDataSourceSurface(thebesSurf->Data(),
thebesSurf->Stride(),
ToIntSize(thebesSurf->GetSize()),
ImageFormatToSurfaceFormat(thebesSurf->Format()));
mTexture->DirectUpdate(sourceSurf, updateRegion, offset);
mFormat = mTexture->GetTextureFormat();
if (mTexture->InUpdate()) {