| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #include "ui/gl/init/gl_initializer.h" | 5 #include "ui/gl/init/gl_initializer.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 InitializeStaticGLBindingsEGL(); | 51 InitializeStaticGLBindingsEGL(); |
| 52 | 52 |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace | 56 } // namespace |
| 57 | 57 |
| 58 bool InitializeGLOneOffPlatform() { | 58 bool InitializeGLOneOffPlatform() { |
| 59 switch (GetGLImplementation()) { | 59 switch (GetGLImplementation()) { |
| 60 case kGLImplementationEGLGLES2: | 60 case kGLImplementationEGLGLES2: |
| 61 GLSurfaceEGL::SetNativeDisplay(EGL_DEFAULT_DISPLAY); |
| 61 if (!GLSurfaceEGL::InitializeOneOff()) { | 62 if (!GLSurfaceEGL::InitializeOneOff()) { |
| 62 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; | 63 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; |
| 63 return false; | 64 return false; |
| 64 } | 65 } |
| 65 return true; | 66 return true; |
| 66 default: | 67 default: |
| 67 return true; | 68 return true; |
| 68 } | 69 } |
| 69 } | 70 } |
| 70 | 71 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 97 } | 98 } |
| 98 | 99 |
| 99 void ClearGLBindingsPlatform() { | 100 void ClearGLBindingsPlatform() { |
| 100 ClearGLBindingsEGL(); | 101 ClearGLBindingsEGL(); |
| 101 ClearGLBindingsGL(); | 102 ClearGLBindingsGL(); |
| 102 ClearGLBindingsOSMESA(); | 103 ClearGLBindingsOSMESA(); |
| 103 } | 104 } |
| 104 | 105 |
| 105 } // namespace init | 106 } // namespace init |
| 106 } // namespace gl | 107 } // namespace gl |
| OLD | NEW |