Bug 1279398 - Remove gfxUnknownSurface. r=eflores
authorJonathan Watt <jwatt@jwatt.org>
Mon, 13 Jun 2016 09:27:23 +0100
changeset 341722 f7aeb4b3ccb175a078f6f9670263010b50bdfb12
parent 341721 9de33d87195b83b73d5d1dc57dd62ee2da151f89
child 341723 acfaa398c6efd9fa66499721776e7e8db9203caa
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseflores
bugs1279398
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1279398 - Remove gfxUnknownSurface. r=eflores
gfx/thebes/gfxASurface.cpp
gfx/thebes/gfxASurface.h
--- a/gfx/thebes/gfxASurface.cpp
+++ b/gfx/thebes/gfxASurface.cpp
@@ -168,17 +168,17 @@ gfxASurface::Wrap (cairo_surface_t *csur
     }
 #endif
 #ifdef CAIRO_HAS_QUARTZ_SURFACE
     else if (stype == CAIRO_SURFACE_TYPE_QUARTZ) {
         result = new gfxQuartzSurface(csurf, aSize);
     }
 #endif
     else {
-        result = new gfxUnknownSurface(csurf, aSize);
+        MOZ_CRASH("Unknown cairo surface type");
     }
 
     // fprintf(stderr, "New wrapper for %p -> %p\n", csurf, result);
 
     return result.forget();
 }
 
 void
--- a/gfx/thebes/gfxASurface.h
+++ b/gfx/thebes/gfxASurface.h
@@ -178,27 +178,9 @@ private:
 
     int32_t mFloatingRefs;
     int32_t mBytesRecorded;
 
 protected:
     bool mSurfaceValid;
 };
 
-/**
- * An Unknown surface; used to wrap unknown cairo_surface_t returns from cairo
- */
-class gfxUnknownSurface : public gfxASurface {
-public:
-    gfxUnknownSurface(cairo_surface_t *surf, const mozilla::gfx::IntSize& aSize)
-        : mSize(aSize)
-    {
-        Init(surf, true);
-    }
-
-    virtual ~gfxUnknownSurface() { }
-    virtual const mozilla::gfx::IntSize GetSize() const override { return mSize; }
-
-private:
-    mozilla::gfx::IntSize mSize;
-};
-
 #endif /* GFX_ASURFACE_H */