diff options
Diffstat (limited to 'chromium/ui/gl/init/gl_factory_x11.cc')
-rw-r--r-- | chromium/ui/gl/init/gl_factory_x11.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/chromium/ui/gl/init/gl_factory_x11.cc b/chromium/ui/gl/init/gl_factory_x11.cc index 9b0f48174b0..b55fe76b197 100644 --- a/chromium/ui/gl/init/gl_factory_x11.cc +++ b/chromium/ui/gl/init/gl_factory_x11.cc @@ -124,5 +124,44 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( } } +void SetDisabledExtensionsPlatform(const std::string& disabled_extensions) { + GLImplementation implementation = GetGLImplementation(); + DCHECK_NE(kGLImplementationNone, implementation); + switch (implementation) { + case kGLImplementationDesktopGL: + SetDisabledExtensionsGLX(disabled_extensions); + break; + case kGLImplementationEGLGLES2: + SetDisabledExtensionsEGL(disabled_extensions); + break; + case kGLImplementationSwiftShaderGL: + case kGLImplementationOSMesaGL: + case kGLImplementationMockGL: + case kGLImplementationStubGL: + break; + default: + NOTREACHED(); + } +} + +bool InitializeExtensionSettingsOneOffPlatform() { + GLImplementation implementation = GetGLImplementation(); + DCHECK_NE(kGLImplementationNone, implementation); + switch (implementation) { + case kGLImplementationDesktopGL: + return InitializeExtensionSettingsOneOffGLX(); + case kGLImplementationEGLGLES2: + return InitializeExtensionSettingsOneOffEGL(); + case kGLImplementationSwiftShaderGL: + case kGLImplementationOSMesaGL: + case kGLImplementationMockGL: + case kGLImplementationStubGL: + return true; + default: + NOTREACHED(); + return false; + } +} + } // namespace init } // namespace gl |