b=340750, don't rewrap surface needlessly in gfxContext::CurrentSurface(), r=stuart

git-svn-id: svn://10.0.0.236/trunk@199474 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
vladimir%pobox.com
2006-06-08 01:07:08 +00:00
parent 02e9e50ecd
commit 17c31b2f2f

View File

@@ -76,9 +76,9 @@ gfxASurface *gfxContext::OriginalSurface()
already_AddRefed<gfxASurface> gfxContext::CurrentSurface(gfxFloat *dx, gfxFloat *dy)
{
cairo_surface_t *s = cairo_get_group_target(mCairo);
if (!s) {
if (s == mSurface->CairoSurface()) {
if (dx && dy)
cairo_surface_get_device_offset (mSurface->CairoSurface(), dx, dy);
cairo_surface_get_device_offset (s, dx, dy);
gfxASurface *ret = mSurface;
NS_ADDREF(ret);
return ret;