зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1021973 - Remove gfxPlatform::OptimizeImage(). r=Bas
This commit is contained in:
Родитель
f782ee2f5a
Коммит
7608ba3c8a
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче