Bug 828207: Wallpaper over not being able to find a layer manager on the main thread when initializing a remote render frame. That's OK, we'll find one on the compositor thread. r=cjones

This commit is contained in:
Robert O'Callahan 2013-01-10 11:02:21 +01:00
parent 0d4ba3807a
commit 444ff0d2b5
2 changed files with 10 additions and 3 deletions

View File

@ -495,7 +495,11 @@ public:
static PRLogModuleInfo* GetLog() { return sLog; }
bool IsCompositingCheap(LayersBackend aBackend)
{ return LAYERS_BASIC != aBackend; }
{
// LAYERS_NONE is an error state, but in that case we should try to
// avoid loading the compositor!
return LAYERS_BASIC != aBackend && LAYERS_NONE != aBackend;
}
virtual bool IsCompositingCheap() { return true; }

View File

@ -600,8 +600,11 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
*aId = 0;
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
*aBackendType = lm->GetBackendType();
*aMaxTextureSize = lm->GetMaxTextureSize();
// Perhaps the document containing this frame currently has no presentation?
if (lm) {
*aBackendType = lm->GetBackendType();
*aMaxTextureSize = lm->GetMaxTextureSize();
}
if (CompositorParent::CompositorLoop()) {
// Our remote frame will push layers updates to the compositor,