diff --git a/gfx/thebes/public/gfxMatrix.h b/gfx/thebes/public/gfxMatrix.h index 3c18ac4167a3..5d692af3ef6a 100644 --- a/gfx/thebes/public/gfxMatrix.h +++ b/gfx/thebes/public/gfxMatrix.h @@ -143,6 +143,13 @@ public: gfxFloat& x0() { return mat.x0; } gfxFloat& y0() { return mat.y0; } + const gfxFloat& xx() const { return mat.xx; } + const gfxFloat& xy() const { return mat.xy; } + const gfxFloat& yx() const { return mat.yx; } + const gfxFloat& yy() const { return mat.yy; } + const gfxFloat& x0() const { return mat.x0; } + const gfxFloat& y0() const { return mat.y0; } + // matrix operations /** * Resets this matrix to the identity matrix. diff --git a/gfx/thebes/src/gfxWindowsFonts.cpp b/gfx/thebes/src/gfxWindowsFonts.cpp index 41bd4063133b..d29aa7cd2c18 100644 --- a/gfx/thebes/src/gfxWindowsFonts.cpp +++ b/gfx/thebes/src/gfxWindowsFonts.cpp @@ -160,7 +160,10 @@ gfxWindowsFont::CairoScaledFont() void gfxWindowsFont::UpdateCTM(const gfxMatrix& aMatrix) { - if (aMatrix.ToCairoMatrix().yy == mCTM.ToCairoMatrix().yy) + if (aMatrix.yy() == mCTM.yy() && + aMatrix.xx() == mCTM.xx() && + aMatrix.xy() == mCTM.xy() && + aMatrix.yx() == mCTM.yx()) return; Destroy(); @@ -553,6 +556,7 @@ gfxWindowsTextRun::MeasureOrDrawReallyFast(gfxContext *aContext, NS_ASSERTION(aDC, "No DC"); nsRefPtr currentFont = mGroup->GetFontAt(0); + currentFont->UpdateCTM(aContext->CurrentMatrix()); HFONT hfont = currentFont->GetHFONT(); SelectObject(aDC, hfont);