Bug 959154 - Part 4: Deprecate thebes version of GLTextureImage::DirectUpdate. r=nical

This commit is contained in:
Andreas Pehrson 2014-02-13 17:25:36 +01:00
parent 78c073378b
commit 7969de45f2
5 changed files with 10 additions and 10 deletions

View File

@ -97,7 +97,7 @@ TextureImage::UpdateFromDataSource(gfx::DataSourceSurface *aSurface,
ThebesIntSize(aSurface->GetSize()),
aSurface->Stride(),
SurfaceFormatToImageFormat(aSurface->GetFormat()));
return DirectUpdate(thebesSurf, destRegion, thebesSrcPoint);
return DeprecatedDirectUpdate(thebesSurf, destRegion, thebesSrcPoint);
}
gfx::IntRect TextureImage::GetTileRect() {
@ -225,7 +225,7 @@ BasicTextureImage::FinishedSurfaceUpload()
}
bool
BasicTextureImage::DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */)
BasicTextureImage::DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */)
{
nsIntRect bounds = aRegion.GetBounds();
nsIntRegion region;
@ -360,7 +360,7 @@ TiledTextureImage::~TiledTextureImage()
}
bool
TiledTextureImage::DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */)
TiledTextureImage::DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */)
{
if (mSize.width == 0 || mSize.height == 0) {
return true;
@ -398,7 +398,7 @@ TiledTextureImage::DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion,
}
result &= mImages[mCurrentImage]->
DirectUpdate(aSurf, tileRegion, aFrom + nsIntPoint(xPos, yPos));
DeprecatedDirectUpdate(aSurf, tileRegion, aFrom + nsIntPoint(xPos, yPos));
if (mCurrentImage == mImages.Length() - 1) {
// We know we're done, but we still need to ensure that the callback

View File

@ -176,7 +176,7 @@ public:
* aRegion - the region in this image to update
* aFrom - offset in the source to update from
*/
virtual bool DirectUpdate(gfxASurface *aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom = nsIntPoint(0,0)) = 0;
virtual bool DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom = nsIntPoint(0,0)) = 0;
// Moz2D equivalent
bool UpdateFromDataSource(gfx::DataSourceSurface *aSurf,
const nsIntRegion* aDstRegion = nullptr,
@ -282,7 +282,7 @@ public:
virtual gfxASurface* BeginUpdate(nsIntRegion& aRegion);
virtual void GetUpdateRegion(nsIntRegion& aForRegion);
virtual void EndUpdate();
virtual bool DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom = nsIntPoint(0,0));
virtual bool DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom = nsIntPoint(0,0));
virtual GLuint GetTextureID() { return mTexture; }
// Returns a surface to draw into
virtual already_AddRefed<gfxASurface>
@ -342,7 +342,7 @@ public:
virtual GLuint GetTextureID() {
return mImages[mCurrentImage]->GetTextureID();
}
virtual bool DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom = nsIntPoint(0,0));
virtual bool DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom = nsIntPoint(0,0));
virtual bool InUpdate() const { return mInUpdate; }
virtual void BindTexture(GLenum);

View File

@ -204,7 +204,7 @@ TextureImageEGL::EndUpdate()
}
bool
TextureImageEGL::DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */)
TextureImageEGL::DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */)
{
nsIntRect bounds = aRegion.GetBounds();

View File

@ -32,7 +32,7 @@ public:
virtual void EndUpdate();
virtual bool DirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */);
virtual bool DeprecatedDirectUpdate(gfxASurface* aSurf, const nsIntRegion& aRegion, const nsIntPoint& aFrom /* = nsIntPoint(0, 0) */);
virtual void BindTexture(GLenum aTextureUnit);

View File

@ -744,7 +744,7 @@ TextureImageDeprecatedTextureHostOGL::UpdateImpl(const SurfaceDescriptor& aImage
if (aOffset) {
offset = *aOffset;
}
mTexture->DirectUpdate(surf.Get(), updateRegion, offset);
mTexture->DeprecatedDirectUpdate(surf.Get(), updateRegion, offset);
mFormat = mTexture->GetTextureFormat();
if (mTexture->InUpdate()) {