Bug 1034294 - Fix SharedBufferManagerParent r=jgilbert

This commit is contained in:
Sotaro Ikeda 2014-07-04 03:50:01 -07:00
parent 993f1ecfa8
commit 314fa06ff8

View File

@ -78,20 +78,18 @@ ClientCanvasLayer::Initialize(const Data& aData)
switch (ClientManager()->AsShadowForwarder()->GetCompositorBackendType()) {
case mozilla::layers::LayersBackend::LAYERS_OPENGL: {
if (mGLContext->GetContextType() == GLContextType::EGL) {
#ifdef MOZ_WIDGET_GONK
factory = new SurfaceFactory_Gralloc(mGLContext, caps, ClientManager()->AsShadowForwarder());
#else
bool isCrossProcess = !(XRE_GetProcessType() == GeckoProcessType_Default);
if (!isCrossProcess) {
// [Basic/OGL Layers, OMTC] WebGL layer init.
factory = SurfaceFactory_EGLImage::Create(mGLContext, caps);
} else {
// [Basic/OGL Layers, OOPC] WebGL layer init. (Out Of Process Compositing)
#ifdef MOZ_WIDGET_GONK
factory = new SurfaceFactory_Gralloc(mGLContext, caps, ClientManager()->AsShadowForwarder());
#else
// we could do readback here maybe
NS_NOTREACHED("isCrossProcess but not on native B2G!");
#endif
}
#endif
} else {
// [Basic Layers, OMTC] WebGL layer init.
// Well, this *should* work...