[OS/2] Bug 371505: check in preliminary workarounds for Thebes repaint problems based on ideas from Andy Willis

This commit is contained in:
mozilla@weilbacher.org 2007-06-14 13:38:55 -07:00
parent ac5551e88a
commit 8af5b1515a
2 changed files with 11 additions and 3 deletions

View File

@ -55,7 +55,8 @@ gfxOS2Surface::gfxOS2Surface(HPS aPS, const gfxIntSize& aSize)
printf(" type(%#x)=%d (own=%d, h/w=%d/%d)\n", (unsigned int)surf,
cairo_surface_get_type(surf), mOwnsPS, mSize.width, mSize.height);
#endif
cairo_surface_mark_dirty(surf);
// XXX for now uncomment the mark_dirty function, see bug 371505
//cairo_surface_mark_dirty(surf);
Init(surf);
}
@ -85,7 +86,8 @@ gfxOS2Surface::gfxOS2Surface(HWND aWnd)
cairo_surface_get_type(surf), mOwnsPS, mSize.width, mSize.height);
#endif
cairo_os2_surface_set_hwnd(surf, aWnd); // XXX is this needed here??
cairo_surface_mark_dirty(surf);
// XXX for now uncomment the mark_dirty function, see bug 371505
//cairo_surface_mark_dirty(surf);
Init(surf);
}

View File

@ -3206,8 +3206,14 @@ PRBool nsWindow::OnPaint()
#endif // NS_DEBUG
#ifdef MOZ_CAIRO_GFX // Thebes code version, adapted from windows/nsWindow.cpp
// XXX as a preliminary solution for repaint problems of cairo-os2
// builds, repaint the whole window for each paint event
// see Bug 371505
SWP swp;
WinQueryWindowPos(mWnd, &swp);
nsRefPtr<gfxASurface> targetSurface =
new gfxOS2Surface(hPS, gfxIntSize(rect.width, rect.height));
new gfxOS2Surface(hPS, gfxIntSize(swp.cx, swp.cy));
//new gfxOS2Surface(hPS, gfxIntSize(rect.width, rect.height));
nsRefPtr<gfxContext> thebesContext = new gfxContext(targetSurface);
nsCOMPtr<nsIRenderingContext> context;