Bug 1894498 - Remove unused method gfxASurface::CopyToARGB32ImageSurface. r=gfx-reviewers,lsalzman

According to searchfox, there are no callers.

Differential Revision: https://phabricator.services.mozilla.com/D209142
This commit is contained in:
Jonathan Kew 2024-05-01 21:05:05 +00:00
Родитель 5686155143
Коммит 7fd08efe72
2 изменённых файлов: 0 добавлений и 25 удалений

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

@ -248,25 +248,6 @@ void gfxASurface::Finish() {
cairo_surface_finish(mSurface);
}
already_AddRefed<gfxImageSurface> gfxASurface::CopyToARGB32ImageSurface() {
if (!mSurface || !mSurfaceValid) {
return nullptr;
}
const IntSize size = GetSize();
RefPtr<gfxImageSurface> imgSurface =
new gfxImageSurface(size, SurfaceFormat::A8R8G8B8_UINT32);
RefPtr<DrawTarget> dt = gfxPlatform::CreateDrawTargetForSurface(
imgSurface, IntSize(size.width, size.height));
RefPtr<SourceSurface> source =
gfxPlatform::GetSourceSurfaceForSurface(dt, this);
dt->CopySurface(source, IntRect(0, 0, size.width, size.height), IntPoint());
return imgSurface.forget();
}
int gfxASurface::CairoStatus() {
if (!mSurfaceValid) return -1;

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

@ -80,12 +80,6 @@ class gfxASurface {
*/
virtual already_AddRefed<gfxImageSurface> GetAsImageSurface();
/**
* Creates a new ARGB32 image surface with the same contents as this surface.
* Returns null on error.
*/
already_AddRefed<gfxImageSurface> CopyToARGB32ImageSurface();
int CairoStatus();
static gfxContentType ContentFromFormat(gfxImageFormat format);