Bug 1021973 - Remove gfxPlatform::OptimizeImage(). r=Bas

This commit is contained in:
Jonathan Watt 2014-06-10 07:02:21 +01:00
Родитель f782ee2f5a
Коммит 7608ba3c8a
2 изменённых файлов: 0 добавлений и 27 удалений

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

@ -539,30 +539,6 @@ gfxPlatform::PreferMemoryOverShmem() const {
return mLayersPreferMemoryOverShmem;
}
already_AddRefed<gfxASurface>
gfxPlatform::OptimizeImage(gfxImageSurface *aSurface,
gfxImageFormat format)
{
IntSize surfaceSize = aSurface->GetSize().ToIntSize();
#ifdef XP_WIN
if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() ==
gfxWindowsPlatform::RENDER_DIRECT2D) {
return nullptr;
}
#endif
nsRefPtr<gfxASurface> optSurface = CreateOffscreenSurface(surfaceSize, gfxASurface::ContentFromFormat(format));
if (!optSurface || optSurface->CairoStatus() != 0)
return nullptr;
gfxContext tmpCtx(optSurface);
tmpCtx.SetOperator(gfxContext::OPERATOR_SOURCE);
tmpCtx.SetSource(aSurface);
tmpCtx.Paint();
return optSurface.forget();
}
cairo_user_data_key_t kDrawTarget;
RefPtr<DrawTarget>

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

@ -178,9 +178,6 @@ public:
CreateOffscreenSurface(const IntSize& size,
gfxContentType contentType) = 0;
virtual already_AddRefed<gfxASurface> OptimizeImage(gfxImageSurface *aSurface,
gfxImageFormat format);
/**
* Beware that these methods may return DrawTargets which are not fully supported
* on the current platform and might fail silently in subtle ways. This is a massive