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
Родитель 574eb0b89d
Коммит e08a350b0d
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -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;