mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
b=352488, canvas drawWindow causes transform change in source window; also 324803, drawwindow sometimes fails on cairo builds, r=stuart
This commit is contained in:
parent
86622fa411
commit
5f16d02aa3
@ -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.
|
||||
|
@ -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<gfxWindowsFont> currentFont = mGroup->GetFontAt(0);
|
||||
currentFont->UpdateCTM(aContext->CurrentMatrix());
|
||||
|
||||
HFONT hfont = currentFont->GetHFONT();
|
||||
SelectObject(aDC, hfont);
|
||||
|
Loading…
Reference in New Issue
Block a user