Bug 550680: RoundOut to snap correctly, and do so early enough to get a big enough surface. r=vlad

This commit is contained in:
Bas Schouten 2010-03-12 11:08:28 +01:00
Родитель 41977ad8e8
Коммит 2c21dc5996
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -116,6 +116,10 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
if (mRenderState == RENDER_STATE_INIT) {
mRenderState = RENDER_STATE_ALPHA_RECOVERY_BLACK;
// We round out our native rect here, that way the snapping will
// happen correctly.
mNativeRect.RoundOut();
// we only do the scale bit if we can do an axis aligned
// scale; otherwise we scale (if necessary) after
// rendering with cairo. Note that if we're doing alpha recovery,
@ -283,8 +287,6 @@ gfxWindowsNativeDrawing::PaintToContext()
nsRefPtr<gfxImageSurface> alphaSurface =
gfxAlphaRecovery::RecoverAlpha(black, white, mTempSurfaceSize);
mNativeRect.Round();
mContext->Save();
mContext->Translate(mNativeRect.pos);
mContext->NewPath();