Bug 797797: Get the new device offset after pushing the new DT. r=roc

This commit is contained in:
Bas Schouten 2012-10-04 14:54:57 +02:00
parent 3f6cca789a
commit e56c9a0c28

View File

@ -1528,8 +1528,9 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content)
RefPtr<SourceSurface> source = mDT->Snapshot();
Point oldDeviceOffset = CurrentState().deviceOffset;
Point offset = CurrentState().deviceOffset - oldDeviceOffset;
PushNewDT(gfxASurface::CONTENT_COLOR);
Point offset = CurrentState().deviceOffset - oldDeviceOffset;
Rect surfRect(0, 0, Float(mDT->GetSize().width), Float(mDT->GetSize().height));
Rect sourceRect = surfRect;
sourceRect.x += offset.x;