зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5686155143
Коммит
7fd08efe72
|
@ -248,25 +248,6 @@ void gfxASurface::Finish() {
|
||||||
cairo_surface_finish(mSurface);
|
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() {
|
int gfxASurface::CairoStatus() {
|
||||||
if (!mSurfaceValid) return -1;
|
if (!mSurfaceValid) return -1;
|
||||||
|
|
||||||
|
|
|
@ -80,12 +80,6 @@ class gfxASurface {
|
||||||
*/
|
*/
|
||||||
virtual already_AddRefed<gfxImageSurface> GetAsImageSurface();
|
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();
|
int CairoStatus();
|
||||||
|
|
||||||
static gfxContentType ContentFromFormat(gfxImageFormat format);
|
static gfxContentType ContentFromFormat(gfxImageFormat format);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче