diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index ce782961e53a..aded0a53e7d2 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -915,12 +915,6 @@ void gfxPlatform::Init() { MOZ_CRASH("Could not initialize gfxPlatformFontList"); } - gPlatform->mScreenReferenceSurface = gPlatform->CreateOffscreenSurface( - IntSize(1, 1), SurfaceFormat::A8R8G8B8_UINT32); - if (!gPlatform->mScreenReferenceSurface) { - MOZ_CRASH("Could not initialize mScreenReferenceSurface"); - } - gPlatform->mScreenReferenceDrawTarget = gPlatform->CreateOffscreenContentDrawTarget(IntSize(1, 1), SurfaceFormat::B8G8R8A8); diff --git a/gfx/thebes/gfxPlatform.h b/gfx/thebes/gfxPlatform.h index fd8a512b697c..14f7cff82a14 100644 --- a/gfx/thebes/gfxPlatform.h +++ b/gfx/thebes/gfxPlatform.h @@ -627,12 +627,6 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener { static void FlushFontAndWordCaches(); - /** - * Returns a 1x1 surface that can be used to create graphics contexts - * for measuring text etc as if they will be rendered to the screen - */ - gfxASurface* ScreenReferenceSurface() { return mScreenReferenceSurface; } - /** * Returns a 1x1 DrawTarget that can be used for measuring text etc. as * it would measure if rendered on-screen. Guaranteed to return a