Clear the backbuffer to white before rendering to it and copying forward b=34283 r=attinasi@netscape.com

This commit is contained in:
kmcclusk%netscape.com 2000-08-22 04:20:40 +00:00
Родитель 2d62b60d0c
Коммит 3f34406c57
1 изменённых файлов: 17 добавлений и 0 удалений

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

@ -654,6 +654,23 @@ void nsViewManager2::Refresh(nsIView *aView, nsIRenderingContext *aContext, cons
localcx->SetClipRect(trect, nsClipCombine_kReplace, result);
if ((aUpdateFlags & NS_VMREFRESH_DOUBLE_BUFFER) && ds)
{
// XXX: This should not be needed. The frames should
// paint the background for the area cleared, but when the
// document is empty there aren't any frames to clear the
// background. In addition, frames sometimes
// do not paint the entire extent of the damaged rect.
// However, this should be fixed in the frame's not here.
// Clear the background of the area about to be rendered to.
// If this is not done, garbage (stale bits) from the backbuffer
// are copied forward.
nscolor col = NS_RGB(255,255, 255);
localcx->SetColor(col);
localcx->FillRect(trect);
}
RenderViews(aView, *localcx, trect, result);
if ((aUpdateFlags & NS_VMREFRESH_DOUBLE_BUFFER) && ds)