Bug 752640 - Allow PCompositor to work with Basic Layers backend. r=ajuma

This commit is contained in:
Oleg Romashin 2012-05-07 16:05:13 -07:00
parent def31fd7a2
commit 79c7b221c2

View File

@ -41,6 +41,7 @@
#include "CompositorParent.h"
#include "RenderTrace.h"
#include "ShadowLayersParent.h"
#include "BasicLayers.h"
#include "LayerManagerOGL.h"
#include "nsIWidget.h"
#include "nsGkAtoms.h"
@ -449,6 +450,16 @@ CompositorParent::AllocPLayers(const LayersBackend &backendType)
return NULL;
}
ShadowLayerManager* slm = layerManager->AsShadowManager();
if (!slm) {
return NULL;
}
return new ShadowLayersParent(slm, this);
} else if (backendType == LayerManager::LAYERS_BASIC) {
// This require Cairo to be thread-safe
nsRefPtr<LayerManager> layerManager = new BasicShadowLayerManager(mWidget);
mWidget = NULL;
mLayerManager = layerManager;
ShadowLayerManager* slm = layerManager->AsShadowManager();
if (!slm) {
return NULL;