mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Bug 1019690 - Remove gfxPlatform::CreateOffscreenImageSurface(). r=Bas
--HG-- extra : rebase_source : 3c79945a1179d7b7bb128278eae0642156460df0
This commit is contained in:
parent
13680dbe8c
commit
dd0a3a7c18
@ -536,16 +536,6 @@ gfxPlatform::PreferMemoryOverShmem() const {
|
||||
return mLayersPreferMemoryOverShmem;
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxPlatform::CreateOffscreenImageSurface(const gfxIntSize& aSize,
|
||||
gfxContentType aContentType)
|
||||
{
|
||||
nsRefPtr<gfxASurface> newSurface;
|
||||
newSurface = new gfxImageSurface(aSize, OptimalFormatForContent(aContentType));
|
||||
|
||||
return newSurface.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxPlatform::OptimizeImage(gfxImageSurface *aSurface,
|
||||
gfxImageFormat format)
|
||||
|
@ -180,18 +180,6 @@ public:
|
||||
CreateOffscreenSurface(const IntSize& size,
|
||||
gfxContentType contentType) = 0;
|
||||
|
||||
/**
|
||||
* Create an offscreen surface of the given dimensions and image format which
|
||||
* can be converted to a gfxImageSurface without copying. If we can provide
|
||||
* a platform-hosted surface, then we will return that instead of an actual
|
||||
* gfxImageSurface.
|
||||
* Sub-classes should override this method if CreateOffscreenSurface returns a
|
||||
* surface which implements GetAsImageSurface
|
||||
*/
|
||||
virtual already_AddRefed<gfxASurface>
|
||||
CreateOffscreenImageSurface(const gfxIntSize& aSize,
|
||||
gfxContentType aContentType);
|
||||
|
||||
virtual already_AddRefed<gfxASurface> OptimizeImage(gfxImageSurface *aSurface,
|
||||
gfxImageFormat format);
|
||||
|
||||
|
@ -105,20 +105,6 @@ gfxPlatformMac::CreateOffscreenSurface(const IntSize& size,
|
||||
return newSurface.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxPlatformMac::CreateOffscreenImageSurface(const gfxIntSize& aSize,
|
||||
gfxContentType aContentType)
|
||||
{
|
||||
nsRefPtr<gfxASurface> surface =
|
||||
CreateOffscreenSurface(aSize.ToIntSize(), aContentType);
|
||||
#ifdef DEBUG
|
||||
nsRefPtr<gfxImageSurface> imageSurface = surface->GetAsImageSurface();
|
||||
NS_ASSERTION(imageSurface, "Surface cannot be converted to a gfxImageSurface");
|
||||
#endif
|
||||
return surface.forget();
|
||||
}
|
||||
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxPlatformMac::OptimizeImage(gfxImageSurface *aSurface,
|
||||
gfxImageFormat format)
|
||||
|
@ -29,10 +29,6 @@ public:
|
||||
CreateOffscreenSurface(const IntSize& size,
|
||||
gfxContentType contentType) MOZ_OVERRIDE;
|
||||
|
||||
virtual already_AddRefed<gfxASurface>
|
||||
CreateOffscreenImageSurface(const gfxIntSize& aSize,
|
||||
gfxContentType aContentType);
|
||||
|
||||
already_AddRefed<gfxASurface> OptimizeImage(gfxImageSurface *aSurface,
|
||||
gfxImageFormat format);
|
||||
|
||||
|
@ -617,27 +617,6 @@ gfxWindowsPlatform::CreateOffscreenSurface(const IntSize& size,
|
||||
return surf.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
gfxWindowsPlatform::CreateOffscreenImageSurface(const gfxIntSize& aSize,
|
||||
gfxContentType aContentType)
|
||||
{
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
if (mRenderMode == RENDER_DIRECT2D) {
|
||||
nsRefPtr<gfxASurface> surface =
|
||||
new gfxImageSurface(aSize, OptimalFormatForContent(aContentType));
|
||||
return surface.forget();
|
||||
}
|
||||
#endif
|
||||
|
||||
nsRefPtr<gfxASurface> surface = CreateOffscreenSurface(aSize.ToIntSize(),
|
||||
aContentType);
|
||||
#ifdef DEBUG
|
||||
nsRefPtr<gfxImageSurface> imageSurface = surface->GetAsImageSurface();
|
||||
NS_ASSERTION(imageSurface, "Surface cannot be converted to a gfxImageSurface");
|
||||
#endif
|
||||
return surface.forget();
|
||||
}
|
||||
|
||||
TemporaryRef<ScaledFont>
|
||||
gfxWindowsPlatform::GetScaledFontForFont(DrawTarget* aTarget, gfxFont *aFont)
|
||||
{
|
||||
|
@ -128,9 +128,6 @@ public:
|
||||
virtual already_AddRefed<gfxASurface>
|
||||
CreateOffscreenSurface(const IntSize& size,
|
||||
gfxContentType contentType) MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<gfxASurface>
|
||||
CreateOffscreenImageSurface(const gfxIntSize& aSize,
|
||||
gfxContentType aContentType);
|
||||
|
||||
virtual mozilla::TemporaryRef<mozilla::gfx::ScaledFont>
|
||||
GetScaledFontForFont(mozilla::gfx::DrawTarget* aTarget, gfxFont *aFont);
|
||||
|
Loading…
Reference in New Issue
Block a user