mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
b=340750, don't rewrap surface needlessly in gfxContext::CurrentSurface(), r=stuart
This commit is contained in:
parent
ff23ccae41
commit
cecf1f2cd6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user