Bug 602428, part 7: Enable GL shadow layers. r=tn a=blocking-fennec

This commit is contained in:
Chris Jones 2010-10-13 17:55:45 -05:00
Родитель d4ed6c86d2
Коммит 5fa9d9565b
1 изменённых файлов: 14 добавлений и 6 удалений

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

@ -41,6 +41,7 @@
#include "mozilla/layers/ShadowLayersParent.h"
#include "BasicLayers.h"
#include "LayerManagerOGL.h"
#include "RenderFrameParent.h"
#include "gfx3DMatrix.h"
@ -294,13 +295,20 @@ PLayersParent*
RenderFrameParent::AllocPLayers()
{
LayerManager* lm = GetLayerManager();
if (LayerManager::LAYERS_BASIC != lm->GetBackendType()) {
NS_WARNING("shadow layers no sprechen GL backend yet");
return nsnull;
}
switch (lm->GetBackendType()) {
case LayerManager::LAYERS_BASIC: {
BasicShadowLayerManager* bslm = static_cast<BasicShadowLayerManager*>(lm);
return new ShadowLayersParent(bslm);
}
case LayerManager::LAYERS_OPENGL: {
LayerManagerOGL* lmo = static_cast<LayerManagerOGL*>(lm);
return new ShadowLayersParent(lmo);
}
default: {
NS_WARNING("shadow layers no sprechen D3D backend yet");
return nsnull;
}
}
}
bool