Bug 846132 (Part 3) - Remove imgIContainer::CopyFrame. r=jdm

This commit is contained in:
Seth Fowler 2013-03-05 15:39:48 -08:00
Родитель 4e91a14346
Коммит b4b99568d2
4 изменённых файлов: 18 добавлений и 44 удалений

Просмотреть файл

@ -58,7 +58,7 @@ native nsSize(nsSize);
*
* Internally, imgIContainer also manages animation of images.
*/
[scriptable, builtinclass, uuid(585f4087-5148-478a-862c-5e90cc61413d)]
[scriptable, builtinclass, uuid(01c4f92f-f883-4837-a127-d8f30920e374)]
interface imgIContainer : nsISupports
{
/**
@ -154,7 +154,9 @@ interface imgIContainer : nsISupports
/**
* Get a surface for the given frame. This may be a platform-native,
* optimized surface, so you cannot inspect its pixel data.
* optimized surface, so you cannot inspect its pixel data. If you
* need that, use gfxASurface::GetAsReadableARGB32ImageSurface or
* gfxASurface::CopyToARGB32ImageSurface.
*
* @param aWhichFrame Frame specifier of the FRAME_* variety.
* @param aFlags Flags of the FLAG_* variety
@ -176,16 +178,6 @@ interface imgIContainer : nsISupports
*/
[noscript] ImageContainer getImageContainer(in LayerManager aManager);
/**
* Create and return a new copy of the given frame that you can write to
* and otherwise inspect the pixels of.
*
* @param aWhichFrame Frame specifier of the FRAME_* variety.
* @param aFlags Flags of the FLAG_* variety
*/
[noscript] gfxImageSurface copyFrame(in uint32_t aWhichFrame,
in uint32_t aFlags);
/**
* Create a new imgContainer that contains only a single frame, which itself
* contains a subregion of the given frame.

Просмотреть файл

@ -986,11 +986,7 @@ RasterImage::GetAnimated(bool *aAnimated)
return NS_OK;
}
//******************************************************************************
/* [noscript] gfxImageSurface copyFrame(in uint32_t aWhichFrame,
* in uint32_t aFlags); */
NS_IMETHODIMP
nsresult
RasterImage::CopyFrame(uint32_t aWhichFrame,
uint32_t aFlags,
gfxImageSurface **_retval)

Просмотреть файл

@ -491,6 +491,9 @@ private:
const gfxRect &aFill,
const nsIntRect &aSubimage);
nsresult CopyFrame(uint32_t aWhichFrame,
uint32_t aFlags,
gfxImageSurface **_retval);
/**
* Advances the animation. Typically, this will advance a single frame, but it
* may advance multiple frames. This may happen if we have infrequently

Просмотреть файл

@ -570,33 +570,6 @@ NS_IMETHODIMP
VectorImage::GetFrame(uint32_t aWhichFrame,
uint32_t aFlags,
gfxASurface** _retval)
{
NS_ENSURE_ARG_POINTER(_retval);
nsRefPtr<gfxImageSurface> surface;
nsresult rv = CopyFrame(aWhichFrame, aFlags, getter_AddRefs(surface));
if (NS_SUCCEEDED(rv)) {
*_retval = surface.forget().get();
}
return rv;
}
//******************************************************************************
/* [noscript] ImageContainer getImageContainer(); */
NS_IMETHODIMP
VectorImage::GetImageContainer(LayerManager* aManager,
mozilla::layers::ImageContainer** _retval)
{
*_retval = nullptr;
return NS_OK;
}
//******************************************************************************
/* [noscript] gfxImageSurface copyFrame(in uint32_t aWhichFrame,
* in uint32_t aFlags); */
NS_IMETHODIMP
VectorImage::CopyFrame(uint32_t aWhichFrame,
uint32_t aFlags,
gfxImageSurface** _retval)
{
NS_ENSURE_ARG_POINTER(_retval);
// XXXdholbert NOTE: Currently assuming FRAME_CURRENT for simplicity.
@ -650,6 +623,16 @@ VectorImage::CopyFrame(uint32_t aWhichFrame,
return rv;
}
//******************************************************************************
/* [noscript] ImageContainer getImageContainer(); */
NS_IMETHODIMP
VectorImage::GetImageContainer(LayerManager* aManager,
mozilla::layers::ImageContainer** _retval)
{
*_retval = nullptr;
return NS_OK;
}
//******************************************************************************
/* [noscript] imgIContainer extractFrame(uint32_t aWhichFrame,
* [const] in nsIntRect aRegion,