mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1082553 - Remove gfxContext::OriginalSurface. r=Bas
This commit is contained in:
parent
c5b87ba504
commit
b411165881
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user