OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GL_GL_CONTEXT_H_ | 5 #ifndef UI_GL_GL_CONTEXT_H_ |
6 #define UI_GL_GL_CONTEXT_H_ | 6 #define UI_GL_GL_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 protected: | 191 protected: |
192 ~GLContextReal() override; | 192 ~GLContextReal() override; |
193 | 193 |
194 void SetCurrent(GLSurface* surface) override; | 194 void SetCurrent(GLSurface* surface) override; |
195 | 195 |
196 private: | 196 private: |
197 std::unique_ptr<GPUTiming> gpu_timing_; | 197 std::unique_ptr<GPUTiming> gpu_timing_; |
198 DISALLOW_COPY_AND_ASSIGN(GLContextReal); | 198 DISALLOW_COPY_AND_ASSIGN(GLContextReal); |
199 }; | 199 }; |
200 | 200 |
| 201 // Wraps GLContext in scoped_refptr and tries to initializes it. Returns a |
| 202 // scoped_refptr containing the initialized GLContext or nullptr if |
| 203 // initialization fails. |
| 204 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( |
| 205 scoped_refptr<GLContext> context, |
| 206 GLSurface* compatible_surface, |
| 207 GpuPreference gpu_preference); |
| 208 |
201 } // namespace gl | 209 } // namespace gl |
202 | 210 |
203 #endif // UI_GL_GL_CONTEXT_H_ | 211 #endif // UI_GL_GL_CONTEXT_H_ |
OLD | NEW |