mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1305234 - Back out changeset f7aeb4b3ccb1 (bug 1279398) for causing top crashes. r=edwin DONTBUILD
--HG-- extra : rebase_source : 17ccf89223eeca1bc08c3e45ec7e22d3456c2d00 extra : source : 5285464565a804f3766f273b20fb7147f92db53e
This commit is contained in:
parent
99dc13308f
commit
d6dab74e60
@ -171,7 +171,7 @@ gfxASurface::Wrap (cairo_surface_t *csurf, const IntSize& aSize)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
MOZ_CRASH("Unknown cairo surface type");
|
||||
result = new gfxUnknownSurface(csurf, aSize);
|
||||
}
|
||||
|
||||
// fprintf(stderr, "New wrapper for %p -> %p\n", csurf, result);
|
||||
|
@ -183,4 +183,22 @@ 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 */
|
||||
|
Loading…
Reference in New Issue
Block a user