if (aIsFixed) { viewportView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_BITBLT); } else { viewportView->ClearViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_BITBLT); }
nsCOMPtr<nsIViewManager> vm; aPresShell->GetViewManager(getter_AddRefs(vm)); vm->SetViewBitBltEnabled(viewportView, !aIsFixed);
HandleFixedBackground(nsIPresContext* aPresContext,                       nsIPresShell *aPresShell,                       PRBool aIsFixed){  // we have to tell the canvas' view if we want to bitblt on scroll or not  // - if we have a fixed background we cannot bitblt when we scroll,  //   otherewise we can  nsIView*      viewportView = nsnull;  nsIFrame*     canvasFrame = nsnull;  nsCOMPtr<nsIFrameManager> manager;  nsresult rv = aPresShell->GetFrameManager(getter_AddRefs(manager));  if (NS_SUCCEEDED(rv) && manager) {    manager->GetCanvasFrame(aPresContext, &canvasFrame);  }  if (canvasFrame) {    canvasFrame->GetView(aPresContext, (nsIView**)&viewportView);  }  if (viewportView) {    if (aIsFixed) {      viewportView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);    } else {      viewportView->ClearViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);    }  }}