Bug 613943 - [@ nsWindow::DoPaint] crashes when trying to access MWindow::orientationAngle r=romaxa a=npodb

This commit is contained in:
Oleg Romashin
2010-11-23 01:46:11 +02:00
parent 42eab62978
commit d9854d6e3a

View File

@@ -1054,14 +1054,17 @@ nsWindow::DoPaint(QPainter* aPainter, const QStyleOptionGraphicsItem* aOption, Q
}
#ifdef MOZ_ENABLE_MEEGOTOUCH
else if (renderMode == gfxQtPlatform::RENDER_DIRECT) {
MWindow* window = MApplication::activeWindow();
if (window) {
// This is needed for rotate transformation on Meego
// This will work very slow if pixman does not handle rotation very well
gfxMatrix matr;
M::OrientationAngle angle = MApplication::activeWindow()->orientationAngle();
M::OrientationAngle angle = window->orientationAngle();
matr.Translate(gfxPoint(aPainter->transform().dx(), aPainter->transform().dy()));
matr.Rotate((M_PI/180)*angle);
ctx->SetMatrix(matr);
NS_ASSERTION(PIXMAN_VERSION < PIXMAN_VERSION_ENCODE(0, 21, 2) && angle, "Old pixman and rotate transform, it is going to be slow");
}
}
#endif