Bug 596410: Use BasicShadowLayerManager when there might be content processes. r=vlad

This commit is contained in:
Chris Jones 2010-09-14 18:40:23 -05:00
parent 2b12976c51
commit ff8567c854
4 changed files with 16 additions and 9 deletions

View File

@ -591,7 +591,7 @@ nsWindow::GetLayerManager()
if (!topWindow) {
printf_stderr(" -- no topwindow\n");
mLayerManager = new BasicLayerManager(this);
mLayerManager = CreateBasicLayerManager();
return mLayerManager;
}
@ -601,7 +601,7 @@ nsWindow::GetLayerManager()
sFailedToCreateGLContext)
{
printf_stderr(" -- creating basic, not accelerated\n");
mLayerManager = new BasicLayerManager(this);
mLayerManager = CreateBasicLayerManager();
return mLayerManager;
}
@ -622,7 +622,7 @@ nsWindow::GetLayerManager()
sGLContext = nsnull;
sFailedToCreateGLContext = PR_TRUE;
mLayerManager = new BasicLayerManager(this);
mLayerManager = CreateBasicLayerManager();
}
return mLayerManager;

View File

@ -3244,7 +3244,7 @@ nsWindow::GetLayerManager()
// Fall back to software if we couldn't use any hardware backends.
if (!mLayerManager)
mLayerManager = new BasicLayerManager(this);
mLayerManager = CreateBasicLayerManager();
}
#endif

View File

@ -816,16 +816,21 @@ LayerManager* nsBaseWidget::GetLayerManager()
}
}
if (!mLayerManager) {
#if !defined(MOZ_IPC)
mLayerManager = new BasicLayerManager(this);
#else
mLayerManager = new BasicShadowLayerManager(this);
#endif
mLayerManager = CreateBasicLayerManager();
}
}
return mLayerManager;
}
BasicLayerManager* nsBaseWidget::CreateBasicLayerManager()
{
#if !defined(MOZ_IPC)
return new BasicLayerManager(this);
#else
return new BasicShadowLayerManager(this);
#endif
}
//-------------------------------------------------------------------------
//
// Return the toolkit this widget was created on

View File

@ -243,6 +243,8 @@ protected:
return widget.forget();
}
BasicLayerManager* CreateBasicLayerManager();
protected:
void* mClientData;
ViewWrapper* mViewWrapperPtr;