diff --git a/gfx/thebes/gfxSVGGlyphs.h b/gfx/thebes/gfxSVGGlyphs.h index 0350ee448e01..01d7a9c33298 100644 --- a/gfx/thebes/gfxSVGGlyphs.h +++ b/gfx/thebes/gfxSVGGlyphs.h @@ -17,10 +17,10 @@ #include "nsRefreshDriver.h" class nsIContentViewer; -class nsIPresShell; class gfxSVGGlyphs; namespace mozilla { +class PresShell; class SVGContextPaint; namespace dom { class Document; diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp index 546ae1375b99..c9debcc497bc 100644 --- a/gfx/thebes/gfxUtils.cpp +++ b/gfx/thebes/gfxUtils.cpp @@ -38,7 +38,6 @@ #include "nsIClipboardHelper.h" #include "nsIFile.h" #include "nsIGfxInfo.h" -#include "nsIPresShell.h" #include "nsMimeTypes.h" #include "nsPresContext.h" #include "nsRegion.h" @@ -1228,24 +1227,6 @@ void gfxUtils::WriteAsPNG(DrawTarget* aDT, const char* aFile) { } } -/* static */ -void gfxUtils::WriteAsPNG(nsIPresShell* aShell, const char* aFile) { - int32_t width = 1000, height = 1000; - nsRect r(0, 0, aShell->GetPresContext()->DevPixelsToAppUnits(width), - aShell->GetPresContext()->DevPixelsToAppUnits(height)); - - RefPtr dt = - gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget( - IntSize(width, height), SurfaceFormat::B8G8R8A8); - NS_ENSURE_TRUE(dt && dt->IsValid(), /*void*/); - - RefPtr context = gfxContext::CreateOrNull(dt); - MOZ_ASSERT(context); // already checked the draw target above - aShell->RenderDocument(r, RenderDocumentFlags::None, NS_RGB(255, 255, 0), - context); - WriteAsPNG(dt.get(), aFile); -} - /* static */ void gfxUtils::DumpAsDataURI(SourceSurface* aSurface, FILE* aFile) { EncodeSourceSurface(aSurface, ImageType::PNG, EmptyString(), eDataURIEncode, diff --git a/gfx/thebes/gfxUtils.h b/gfx/thebes/gfxUtils.h index d72941790fdc..99ed067a2e05 100644 --- a/gfx/thebes/gfxUtils.h +++ b/gfx/thebes/gfxUtils.h @@ -24,7 +24,6 @@ class gfxDrawable; struct gfxQuad; class nsIInputStream; class nsIGfxInfo; -class nsIPresShell; namespace mozilla { namespace dom { @@ -267,7 +266,6 @@ class gfxUtils { static void WriteAsPNG(SourceSurface* aSurface, const char* aFile); static void WriteAsPNG(DrawTarget* aDT, const nsAString& aFile); static void WriteAsPNG(DrawTarget* aDT, const char* aFile); - static void WriteAsPNG(nsIPresShell* aShell, const char* aFile); /** * Dump as a PNG encoded Data URL to a FILE stream (using stdout by