Bug 952235 - Handle device offset when applying pattern transform. r=bas
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 07 Jan 2014 10:25:05 +0900
changeset 162299 e21f81181a4165a49bf117c898f8d1850f7bb2e4
parent 162298 b8f1b1cfc9e224a8af168603fb1e34ad51e1729d
child 162300 2cb3e4d522cc95356636dd9c5fa1ff66c74ab9c5
push idunknown
push userunknown
push dateunknown
reviewersbas
bugs952235
milestone29.0a1
Bug 952235 - Handle device offset when applying pattern transform. r=bas
gfx/thebes/gfxContext.cpp
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -48,17 +48,17 @@ public:
     gfxContext::AzureState &state = mContext->CurrentState();
 
     if (state.pattern) {
       return *state.pattern->GetPattern(mContext->mDT, state.patternTransformChanged ? &state.patternTransform : nullptr);
     } else if (state.sourceSurface) {
       Matrix transform = state.surfTransform;
 
       if (state.patternTransformChanged) {
-        Matrix mat = mContext->mTransform;
+        Matrix mat = mContext->GetDTTransform();
         mat.Invert();
 
         transform = transform * state.patternTransform * mat;
       }
 
       mPattern = new (mSurfacePattern.addr())
         SurfacePattern(state.sourceSurface, EXTEND_CLAMP, transform);
       return *mPattern;