Bug 1083635. Part 4.5: Avoid requesting PAINT_WIDGET_LAYERS if we're in a content process. r=mattwoodrow

--HG--
extra : rebase_source : 2559a0f44319264fe6395ef833269fb412f18502
This commit is contained in:
Robert O'Callahan 2014-10-24 12:20:01 +13:00
parent d0f1ae646e
commit c2d5639aae

View File

@ -4915,7 +4915,14 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
nsView* view = rootFrame->GetView();
if (view && view->GetWidget() &&
nsLayoutUtils::GetDisplayRootFrame(rootFrame) == rootFrame) {
flags |= nsLayoutUtils::PAINT_WIDGET_LAYERS;
LayerManager* layerManager = view->GetWidget()->GetLayerManager();
// ClientLayerManagers in content processes don't support
// taking snapshots.
if (layerManager &&
(!layerManager->AsClientLayerManager() ||
XRE_GetProcessType() == GeckoProcessType_Default)) {
flags |= nsLayoutUtils::PAINT_WIDGET_LAYERS;
}
}
}
if (!(aFlags & RENDER_CARET)) {