Bug 1082553 - Remove gfxContext::OriginalSurface. r=Bas

This commit is contained in:
Jonathan Watt 2014-10-16 10:51:13 +01:00
parent c5b87ba504
commit b411165881
2 changed files with 1 additions and 29 deletions

View File

@ -88,7 +88,6 @@ gfxContext::gfxContext(DrawTarget *aTarget, const Point& aDeviceOffset)
: mPathIsRect(false)
, mTransformChanged(false)
, mRefCairo(nullptr)
, mSurface(nullptr)
, mFlags(0)
, mDT(aTarget)
, mOriginalDT(aTarget)
@ -130,24 +129,6 @@ gfxContext::~gfxContext()
MOZ_COUNT_DTOR(gfxContext);
}
gfxASurface *
gfxContext::OriginalSurface()
{
if (mSurface) {
return mSurface;
}
if (mOriginalDT && mOriginalDT->GetBackendType() == BackendType::CAIRO) {
cairo_surface_t *s =
(cairo_surface_t*)mOriginalDT->GetNativeSurface(NativeSurfaceType::CAIRO_SURFACE);
if (s) {
mSurface = gfxASurface::Wrap(s);
return mSurface;
}
}
return nullptr;
}
already_AddRefed<gfxASurface>
gfxContext::CurrentSurface(gfxFloat *dx, gfxFloat *dy)
{

View File

@ -60,11 +60,6 @@ public:
*/
static already_AddRefed<gfxContext> ContextForDrawTarget(mozilla::gfx::DrawTarget* aTarget);
/**
* Return the surface that this gfxContext was created with
*/
gfxASurface *OriginalSurface();
/**
* Return the current transparency group target, if any, along
* with its device offsets from the top. If no group is
@ -708,7 +703,6 @@ private:
const AzureState &CurrentState() const { return mStateStack[mStateStack.Length() - 1]; }
cairo_t *mRefCairo;
nsRefPtr<gfxASurface> mSurface;
int32_t mFlags;
mozilla::RefPtr<DrawTarget> mDT;
@ -882,15 +876,12 @@ public:
}
~gfxContextAutoDisableSubpixelAntialiasing()
{
if (mSurface) {
mSurface->SetSubpixelAntialiasingEnabled(mSubpixelAntialiasingEnabled);
} else if (mDT) {
if (mDT) {
mDT->SetPermitSubpixelAA(mSubpixelAntialiasingEnabled);
}
}
private:
nsRefPtr<gfxASurface> mSurface;
mozilla::RefPtr<mozilla::gfx::DrawTarget> mDT;
bool mSubpixelAntialiasingEnabled;
};