summaryrefslogtreecommitdiffstats
path: root/gfx/gl/SharedSurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/SharedSurface.cpp')
-rw-r--r--gfx/gl/SharedSurface.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/gfx/gl/SharedSurface.cpp b/gfx/gl/SharedSurface.cpp
index 2fbfd3f625..0465926521 100644
--- a/gfx/gl/SharedSurface.cpp
+++ b/gfx/gl/SharedSurface.cpp
@@ -89,13 +89,13 @@ UniquePtr<SurfaceFactory> SurfaceFactory::Create(
return SurfaceFactory_D3D11Interop::Create(gl);
}
#endif
- return nullptr;
+ break;
case layers::TextureType::MacIOSurface:
#ifdef XP_MACOSX
return MakeUnique<SurfaceFactory_IOSurface>(gl);
#else
- return nullptr;
+ break;
#endif
case layers::TextureType::DMABUF:
@@ -105,13 +105,13 @@ UniquePtr<SurfaceFactory> SurfaceFactory::Create(
return SurfaceFactory_DMABUF::Create(gl);
}
#endif
- return nullptr;
+ break;
case layers::TextureType::AndroidNativeWindow:
#ifdef MOZ_WIDGET_ANDROID
return MakeUnique<SurfaceFactory_SurfaceTexture>(gl);
#else
- return nullptr;
+ break;
#endif
case layers::TextureType::AndroidHardwareBuffer:
@@ -121,7 +121,7 @@ UniquePtr<SurfaceFactory> SurfaceFactory::Create(
return SurfaceFactory_AndroidHardwareBuffer::Create(gl);
}
#endif
- return nullptr;
+ break;
case layers::TextureType::EGLImage:
#ifdef MOZ_WIDGET_ANDROID
@@ -129,17 +129,15 @@ UniquePtr<SurfaceFactory> SurfaceFactory::Create(
return SurfaceFactory_EGLImage::Create(gl);
}
#endif
- return nullptr;
+ break;
case layers::TextureType::Unknown:
case layers::TextureType::Last:
break;
}
-#ifdef MOZ_X11
// Silence a warning.
Unused << gl;
-#endif
return nullptr;
}