Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_GL_INIT_GL_INITIALIZER_H_ | |
| 6 #define UI_GL_INIT_GL_INITIALIZER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/gl/gl_implementation.h" | |
| 10 #include "ui/gl/init/gl_init_export.h" | |
| 11 | |
| 12 namespace gl { | |
| 13 namespace init { | |
| 14 | |
| 15 // Class to encapsulate code for GL initialization. To perform GL initialization | |
| 16 // you want to call gl::init::InitializeGLOneOff() or for tests possibly | |
| 17 // gl::init::GLInitializer::InitializeOneOffImplementation(...). | |
| 18 class GL_INIT_EXPORT GLInitializer { | |
|
piman
2016/06/03 00:47:05
nit: is a class needed at all? If it only has stat
kylechar
2016/06/03 13:41:21
Yep, it was just to hide InitializeOneOffPlatform
| |
| 19 public: | |
| 20 GLInitializer() = delete; | |
| 21 | |
| 22 // Performs generic one-off GL initialization, calling into the appropriate | |
| 23 // platform dependent initialization code. | |
| 24 static bool InitializeOneOffImplementation(GLImplementation impl, | |
| 25 bool fallback_to_osmesa, | |
| 26 bool gpu_service_logging, | |
| 27 bool disable_gl_drawing); | |
| 28 | |
| 29 private: | |
| 30 // Performs platform dependent one-off GL initialization, calling into the | |
| 31 // appropriate GLSurface code to initialize it. This is only called from | |
| 32 // InitializeOneOffImplementation(). | |
| 33 static bool InitializeOneOffPlatform(); | |
| 34 }; | |
| 35 | |
| 36 } // namespace init | |
| 37 } // namespace gl | |
| 38 | |
| 39 #endif // UI_GL_INIT_GL_INITIALIZER_H_ | |
| OLD | NEW |